/* Landing Pages Specific Styles */

/* Override hero overlay for landing pages to prevent blue overlay issue */
.property-hero .hero-overlay,
.landing-hero .hero-overlay,
.american-hero .hero-overlay,
.canadian-hero .hero-overlay,
.mexican-usa-hero .hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(30, 60, 114, 0.3) 0%,
        rgba(42, 82, 152, 0.2) 50%,
        rgba(30, 60, 114, 0.3) 100%
    ) !important;
    transition: background 0.5s ease;
}

/* Ensure slideshow images are visible */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: transparent !important;
}

.slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: block !important;
    background-color: transparent !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.slideshow-container .slide.active {
    opacity: 1 !important;
    z-index: 2;
}

.slideshow-container .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 1 !important;
    background-color: transparent;
}

/* Slideshow Navigation Styles */
.slideshow-nav {
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
}

.prev-btn,
.next-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: scale(1.1);
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Mobile Touch Support */
@media (max-width: 768px) {
    .slideshow-container {
        touch-action: pan-y pinch-zoom;
    }
    
    .prev-btn,
    .next-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
        opacity: 0.9;
    }
    
    .slide-indicators {
        bottom: 20px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    /* Prevent blue flash on mobile */
    .hero-background {
        background-color: #f8f9fa;
    }
    
    /* Ensure at least one slide is always visible */
    .slideshow-container .slide:first-child {
        opacity: 1;
        z-index: 1;
    }
    
    .slideshow-container .slide.active {
        z-index: 3;
    }
}

/* Fix header overlap issue */
.hero {
    margin-top: 0;
    padding-top: 180px !important; /* Add padding to account for fixed header */
    background: #f8f9fa !important; /* Light background to prevent dark flash */
}

/* Ensure section anchors account for fixed header */
section[id] {
    scroll-margin-top: 120px;
}

.landing-header, .canadian-header, .mexican-usa-header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100% !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.american-hero, .canadian-hero, .mexican-usa-hero {
    padding-top: 200px !important;
}

/* American Buyers Page */
.american-hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 50, 100, 0.6));
}

.hero-flag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.flag-icon {
    font-size: 2rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-guarantees {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 0, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.guarantee-icon {
    font-size: 1.2rem;
}

.hero-trust-indicators {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.trust-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-item strong {
    display: block;
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 5px;
}

.trust-item span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Fideicomiso Section */
.fideicomiso-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 80px 0;
}

.myth-vs-reality {
    display: grid;
    gap: 40px;
    margin: 50px 0;
}

.myth-reality-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.myth, .reality {
    padding: 30px;
}

.myth {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.reality {
    background: linear-gradient(135deg, #51cf66, #37b24d);
    color: white;
}

.myth h3, .reality h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.benefit-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.benefit-item h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

/* Properties Section */
.american-properties {
    background: #f8f9fa;
    padding: 80px 0;
}

.property-card.featured {
    position: relative;
    border: 3px solid #FFD700;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.property-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #FFD700;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    z-index: 2;
}

.property-highlights {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
}

.property-highlights span {
    font-size: 0.9rem;
    color: #666;
}

.property-pricing {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.price-comparison {
    display: block;
    font-size: 0.9rem;
    color: #666;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.mexico-price {
    display: block;
    font-weight: bold;
    color: #2c5aa0;
    font-size: 1.1rem;
}

/* Why Marce Section */
.why-marce {
    padding: 80px 0;
    background: white;
}

.american-focused .about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: start;
}

.certifications-visual {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.cert-badge {
    background: #2c5aa0;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.american-specialties {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
}

.specialty-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.specialty-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.specialty-item h4 {
    color: #2c5aa0;
    margin-bottom: 10px;
}

.american-testimonial {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 4px solid #2c5aa0;
}

.american-testimonial blockquote {
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.american-testimonial cite {
    font-weight: bold;
    color: #2c5aa0;
}

.cta-marce {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* American Testimonials */
.american-testimonials {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 80px 0;
}

.testimonials-grid.american-focused {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.testimonial-item {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial-item::before {
    content: "🇺🇸";
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
}

.testimonial-content p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author strong {
    color: #2c5aa0;
    display: block;
    margin-bottom: 5px;
}

.testimonial-author span {
    color: #666;
    font-size: 0.9rem;
}

.testimonial-property {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #2c5aa0;
    margin-top: 10px;
    display: inline-block;
}

.testimonial-cta {
    text-align: center;
    margin-top: 50px;
}

.testimonial-cta h3 {
    margin-bottom: 20px;
    color: #2c5aa0;
}

/* Contact Section */
.american-contact {
    background: linear-gradient(135deg, #2c5aa0, #1e3d72);
    color: white;
    padding: 80px 0;
}

.contact-offer {
    margin: 40px 0;
    text-align: center;
}

.offer-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    text-align: left;
}

.offer-box h4 {
    color: #FFD700;
    margin-bottom: 20px;
    text-align: center;
}

.offer-box ul {
    list-style: none;
    padding: 0;
}

.offer-box li {
    margin-bottom: 10px;
    font-weight: 500;
}

.contact-methods.american-focused {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.contact-item.primary {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid #FFD700;
    position: relative;
}

.contact-item.primary::before {
    content: "PREFERRED";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFD700;
    color: #333;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
}

.urgency-note {
    background: rgba(255, 193, 7, 0.2);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #FFD700;
    margin-top: 40px;
}

.urgency-note p {
    margin: 0;
    font-weight: 500;
}

/* Footer */
.american-footer {
    background: #1a252f;
    color: white;
    padding: 50px 0 30px;
}

.footer-specialization {
    color: #FFD700;
    font-weight: bold;
    margin: 10px 0;
}

.footer-credentials h4 {
    color: #FFD700;
    margin-bottom: 15px;
}

.footer-credentials ul {
    list-style: none;
    padding: 0;
}

.footer-credentials li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* CTA Sections */
.cta-section {
    background: linear-gradient(135deg, #2c5aa0, #1e3d72);
    color: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin: 50px 0;
}

.cta-section h3 {
    margin-bottom: 15px;
    color: #FFD700;
}

.cta-section p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Enhanced mobile optimization for hero buttons and badges */
@media (max-width: 480px) {
    .hero .container {
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.5rem !important;
    }
    
    .hero p {
        font-size: 1.2rem !important;
    }
    
    /* Ensure feature badges are readable on small screens */
    .hero div[style*="background: rgba(255,255,255,0.95)"] {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        margin: 5px !important;
    }
    
    /* Optimize hero button sizing for mobile */
    .hero a[style*="border-radius: 50px"] {
        padding: 15px 30px !important;
        font-size: 1rem !important;
        margin: 10px 0 !important;
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
    }
    
    /* Optimize highlight boxes for mobile */
    .hero div[style*="background: rgba(255,215,0,0.95)"] {
        padding: 20px !important;
        margin: 30px auto !important;
        max-width: 95% !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .myth-reality-item {
        grid-template-columns: 1fr;
    }
    
    .hero-guarantees {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-trust-indicators {
        justify-content: center;
        gap: 15px;
    }
    
    .american-focused .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .specialty-item {
        text-align: left;
    }
    
    .cta-marce {
        justify-content: center;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Additional mobile optimizations */
    .hero div[style*="display: flex; flex-wrap: wrap"] {
        gap: 15px !important;
        justify-content: center !important;
    }
}

/* Lead Popup Styles - Designed to avoid popup blockers */
.lead-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.lead-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lead-popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.lead-popup-overlay.show .lead-popup-container {
    transform: translate(-50%, -50%) scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

.popup-content {
    padding: 50px 40px 40px;
    text-align: center;
}

.popup-content h2 {
    font-size: 28px;
    color: #1e3c72;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.popup-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popup-form input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.popup-form input:focus {
    outline: none;
    border-color: #1e3c72;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.popup-form .btn {
    margin-top: 10px;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 60, 114, 0.3);
}

#popup-form-status {
    margin-top: 15px;
    font-size: 14px;
}

#popup-form-status p {
    margin: 0;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
}

/* Mobile Responsive for Popup */
@media (max-width: 768px) {
    .lead-popup-container {
        width: 95%;
        max-width: 400px;
    }
    
    .popup-content {
        padding: 40px 25px 30px;
    }
    
    .popup-content h2 {
        font-size: 24px;
    }
    
    .popup-content p {
        font-size: 14px;
    }
    
    .popup-form input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .popup-form .btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}