/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    /* Tablet mantiene el layout horizontal como desktop */
    .stats-grid {
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-text {
        font-size: 0.85rem;
    }

    .stat-divider {
        height: 45px;
    }
}

@media (max-width: 968px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    /* About Section Tablet */
    .about-content {
        gap: 3rem;
    }

    .about-text h2 {
        font-size: 2.2rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .about-image img {
        min-height: 400px;
    }

    /* Promotions Section Tablet */
    .promo-content h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 1024px) {

    /* Navbar Mobile */
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 74px;
        /* Adjust based on actual header height (padding + logo) */
        left: 0;
        width: 100%;
        height: auto;
        /* Allow flexible height */
        bottom: 0;
        /* Anchor to bottom ensuring full coverage */
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        /* Start from top */
        align-items: center;
        /* box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); */
        transition: var(--transition);
        padding: 3rem 2rem;
        z-index: 1000;
        transform: translateX(100%);
        /* Slide in from right, or obscure? User said "cubra toda la pantalla" */
        /* Let's use opacity/visibility or translate */
        opacity: 0;
        visibility: hidden;
        overflow-y: auto;
        /* Enable vertical scroll inside menu */
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
    }

    .nav-menu.active {
        /* right: 0; */
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
        /* Half of gap (5px) + Half height (1.5px) = 6.5px */
    }

    .hamburger.active .bar:nth-child(2) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    /* Ensure no gap issue during rotation */
    .hamburger.active {
        gap: 0;
        /* Collapse gap for X intersection */
    }

    .nav-menu .nav-item {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        /* Subtle separator line */
    }

    .nav-menu .nav-item:last-child {
        border-bottom: none;
        /* No border for last item */
    }

    .nav-link {
        font-size: 1.2rem;
        justify-content: space-between;
        /* Text left, Icon right */
        width: 100%;
        /* Full width click area */
        padding: 1.5rem 1rem;
        /* Comfortable touch target with side padding */
        text-align: left;
    }

    /* Disable hover rotation on mobile */
    .nav-item:hover .nav-link i {
        transform: rotate(0deg);
    }

    /* Mobile Accordion Styles */
    .dropdown-menu {
        position: static;
        /* Flow with document */
        width: 100%;
        box-shadow: none;
        background-color: transparent;
        /* Or light gray active background */
        border: none;
        padding-left: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        /* Hidden by default */
        text-align: left;
        /* Align dropdown text left */
    }

    /* Disable Desktop Hover behavior on Mobile */
    .nav-item:hover .dropdown-menu {
        display: none;
    }

    /* Show on Click (Active class) */
    .nav-item.active .dropdown-menu {
        display: block;
        /* animation: slideDown 0.3s ease;  Removed animation as requested */
    }

    .nav-item.active .nav-link {
        color: var(--primary-color);
    }

    /* Only rotate when ACTIVE (opened), not on hover */
    .nav-item.active .nav-link i {
        transform: rotate(180deg);
    }

    .dropdown-item {
        padding: 12px 0 12px 2rem;
        /* Indent dropdown items */
        color: #666;
        font-size: 1rem;
        text-align: left;
    }

    .dropdown-item:hover {
        background: transparent;
        color: var(--primary-color);
        padding-left: 2rem;
        /* Keep same padding, NO movement */
    }

    /* @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    } */

    /* Mobile Actions inside Menu */
    .mobile-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 2rem;
        width: 100%;
        border-top: 1px solid var(--border-color);
        padding-top: 1.5rem;
    }

    .btn-whatsapp-mobile {
        background-color: var(--primary-color);
        color: var(--white);
        padding: 10px 20px;
        border-radius: 50px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .lang-selector-mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 500;
        cursor: pointer;
    }

    /* Hide desktop actions on mobile? NO, we want them visible now */
    .nav-actions {
        display: flex;
        gap: 1.2rem;
        /* Increased gap for "separacion ligera" */
        align-items: center;
    }

    /* Prevent body scroll when menu is open */
    body.no-scroll {
        overflow: hidden;
    }

    /* Ensure Language and WhatsApp are VISIBLE */
    .nav-actions .lang-selector,
    .nav-actions .btn-whatsapp {
        display: flex;
        /* Force display */
    }

    /* Adjust sizes for mobile/tablet header row */
    .btn-whatsapp {
        padding: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.2rem;
    }

    .btn-whatsapp .btn-text {
        display: none;
    }

    .logo-img {
        height: 32px;
        /* Slightly larger logo */
    }

    .lang-selector .current-lang {
        font-size: 0.9rem;
    }

    /* Custom 2-bar Hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        /* Increased space between bars */
        cursor: pointer;
        width: 30px;
        height: 30px;
        padding: 0;
        background: transparent;
        border: none;
        position: relative;
        /* Context for absolute bars */
    }

    .hamburger .bar {
        display: block;
        width: 100%;
        height: 3px;
        /* Thickness of bars */
        background-color: var(--dark-color);
        border-radius: 3px;
        /* Rounded ends */
        transition: all 0.3s ease;
        position: relative;
        /* Default relative for flex layout */
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active .bar {
        position: absolute;
        top: 50%;
        left: 0;
        transition: all 0.3s ease;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(-50%) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        transform: translateY(-50%) rotate(-45deg);
    }

    /* Remove gap effect when active since bars are absolute */
    .hamburger.active {
        gap: 0;
    }

    /* Hide the DUPLICATE mobile actions inside the menu */
    .mobile-actions {
        display: none !important;
    }

    /* Hero Mobile */
    .hero {
        margin-top: 74px;
        /* Matches header height */
        height: calc(100svh - 74px) !important;
        /* Force svh stability */
        min-height: unset !important;
        text-align: center;
        justify-content: center;
        padding: 0;
        overflow: hidden;
        background-attachment: scroll !important;
    }

    .hero-content {
        padding: 0 1.5rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* Revert to center */
        text-align: center;
        /* Revert to center */
    }

    .hero-text-wrapper {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* Revert to center */
        width: 100%;
        text-align: center;
        /* Revert to center */
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-left: auto;
        /* Revert to auto */
        margin-right: auto;
    }

    .hero-content p {
        margin-left: auto;
        /* Revert to auto */
        margin-right: auto;
    }

    /* Stats Mobile - 2 columnas */
    .stats-bar {
        padding: 1.5rem 0;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 1.5rem 1rem;
        padding: 0 1rem;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Ocultar divisores en móvil */
    .stat-divider {
        display: none;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        width: 100%;
    }

    .stat-item:hover {
        transform: scale(1.02);
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-text {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .awards {
        font-size: 1.5rem;
        gap: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .awards i {
        font-size: 1.5rem;
    }

    /* About Section Mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-text h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .about-description {
        font-size: 1rem;
        text-align: center;
    }

    .about-features {
        gap: 1.2rem;
    }

    .about-feature {
        gap: 1rem;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 1.3rem;
    }

    .feature-text h3 {
        font-size: 1rem;
    }

    .feature-text p {
        font-size: 0.9rem;
    }

    .about-image img {
        min-height: 300px;
    }

    .about-text .btn-gold {
        display: block;
        text-align: center;
        margin: 0 auto;
    }

    /* Promotions Section Mobile */
    .promo-card {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
    }

    .promo-content h2 {
        font-size: 2.2rem;
    }

    .promo-content p {
        font-size: 1rem;
    }

    /* FAQ Section Mobile */
    .faq-question h3 {
        font-size: 1rem;
    }

    /* General */
    .section-header h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .social-links a {
        margin: 0 0.75rem;
    }

    /* Tour Page Mobile */
    .tour-hero {
        margin-top: 74px;
        /* Matches header height */
        height: calc(100svh - 74px) !important;
        /* Force svh with priority */
        min-height: unset !important;
        padding-bottom: 1rem;
        overflow: hidden;
        /* Crucial: Cut off slider overflow */
        background-attachment: scroll !important;
        /* Fix for mobile zoom effect */
    }

    .tour-hero .hero-content {
        padding-top: 1rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Let wrapper grow */
    }

    /* Fix Zoom Effect on Mobile Backgrounds */
    .hero-slide {
        background-attachment: scroll !important;
        background-position: center !important;
        background-size: cover !important;
        /* Ensure cover is locked */
        height: 100% !important;
        width: 100% !important;
        transform: none !important;
        /* Disable any transform logic */
        will-change: auto !important;
        /* reset optimization hints */
    }

    .hero-text-wrapper {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .tour-hero h1 {
        font-size: 2.2rem;
        margin: 0 auto 0.5rem;
        text-align: center;
    }

    .tour-hero p {
        margin: 0 auto 1rem;
        text-align: center;
        max-width: 90%;
        display: block;
    }

    /* Mobile Stats Overlay */
    .tour-stats-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        margin-top: 0;
        /* Removed margin-top: auto, handled by wrapper flex-grow */
        width: 100%;
        flex-wrap: wrap;
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }

    .stat-item-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--white);
        text-align: center;
    }

    .stat-item-mobile .stat-number {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--secondary-color);
    }

    .stat-item-mobile .stat-text {
        font-size: 0.8rem;
        line-height: 1.2;
        color: var(--white);
    }

    .stat-divider-mobile {
        width: 1px;
        height: 30px;
        background-color: rgba(255, 255, 255, 0.5);
    }

    /* Hide Desktop Stats on Mobile */
    .tour-stats-desktop {
        display: none;
    }
}

/* Hide mobile actions on desktop */
@media (min-width: 1025px) {
    .mobile-actions {
        display: none;
    }
}

/* Tablet Specific Typography - Gentle Increase */
@media (min-width: 768px) and (max-width: 1024px) {
    .tour-hero h1 {
        font-size: 3rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Home Hero H1 Tablet */
    .hero-content h1 {
        font-size: 2rem;
    }

    .tour-badge-text {
        font-size: 1.4rem;
    }

    .tour-hero p {
        font-size: 1.2rem;
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {

    /* Home Stats Mobile - Overlay inside Hero */
    .home-stats-bar {
        display: none;
        /* Hide the section below hero */
    }

    /* Show Mobile Stats Overlay */
    .home-stats-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        width: 100%;
        flex-wrap: wrap;
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        margin-top: auto;
    }

    .home-stat-item-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--white);
        text-align: center;
    }

    .home-stat-item-mobile .stat-number {
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--secondary-color);
    }

    .home-stat-item-mobile .stat-text {
        font-size: 0.8rem;
        line-height: 1.2;
        color: var(--white);
    }

    .home-stat-divider-mobile {
        width: 1px;
        height: 30px;
        background-color: rgba(255, 255, 255, 0.5);
    }

    /* Fix Footer Links Underline on Mobile (iOS auto-linking) */
    .footer-contact-item a,
    .footer-contact-item span a {
        text-decoration: none !important;
        color: inherit !important;
    }
}

/* Specific Fix for iPhone 6, 7, 8, SE and smaller (375px width and below) */
@media (max-width: 376px) {

    .hero,
    .tour-hero {
        /* Flexible height */
        height: auto !important;
        /* User Requirement: standard full height minus header for iPhone 6/7/8/X/Mini */
        min-height: calc(100svh - 74px) !important;

        /* Flex setup for container */
        display: flex !important;
        flex-direction: column !important;
        /* Padding bottom to ensure stats aren't glued to screen edge if content overflows */
        padding-bottom: 1rem !important;
        overflow: visible !important;
    }

    /* Make .hero-content also a flex column that fills height */
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        flex-grow: 1 !important;
        /* Grow to fill the hero */
        min-height: 100% !important;
        width: 100%;
        padding-bottom: 0 !important;
        /* Handled by parent or margin */
        margin: 0 !important;
        /* Reset auto margins */
    }

    /* 
       THE MAGIC: Text Wrapper Grows 
       This pushes the stats (sibling) to the bottom, 
       while centering the text inside itself.
    */
    .hero-text-wrapper {
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        /* Vertical center text */
        margin-bottom: 1rem !important;
        /* Small gap before stats */
    }

    /* Stats sit naturally at the bottom due to above flex-grow */
    .home-stats-mobile,
    .tour-stats-mobile {
        flex-grow: 0 !important;
        margin-top: 0 !important;
        /* Reset margin */
        position: relative;
        width: 100%;
        padding-bottom: 1rem !important;
        /* Extra bottom breathing room */
    }

    /* Keep H1 size as agreed */
    .hero-content h1 {
        font-size: 2.2rem !important;
    }
}

/* Specific Fix for iPhone 5, 5S, SE (1st Gen) and very small screens (320px) */
@media (max-width: 321px) {

    .hero,
    .tour-hero {
        /* User Requirement: "Mas" altura (More height) */
        height: auto !important;
        /* Significantly taller than screen for maximum breathing room */
        min-height: 130svh !important;
        overflow-y: visible !important;
        padding-bottom: 2rem !important;
    }

    /* Adjust stats margin to fit better in this tiny vertical space */
    .home-stats-mobile,
    .tour-stats-mobile {
        margin-top: 1rem !important;
        /* Looking good with flex layout */
        flex-grow: 0 !important;
    }

    /* FIX: Standardize Header for Inner Pages on Tiny Screens */
    /* Override removed at user request.
       Falling back to standard styles. */
}