/* ====================================
   INDEX.HTML SPECIFIC STYLES
   Scoped to .home class only
   ==================================== */

/* Desktop Layout: Logo left, Nav/Lang/Toggle right */
.home header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home header .logo {
    margin-right: auto;
}

.home header .nav-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.home header .header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: 2rem;
}

/* Ensure language selector is visible on desktop */
.home header .lang-selector {
    display: block;
}

/* Mobile Overrides - Fix white on white issue */
@media (max-width: 768px) {

    /* Fix header layout on mobile */
    .home header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    /* Logo stays on the left */
    .home header .logo {
        order: 1;
        z-index: 102;
    }

    /* Header actions (lang + toggle) on the right */
    .home header .header-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-left: auto;
        z-index: 102;
    }

    /* Language selector visible next to hamburger */
    .home header .lang-selector {
        display: block;
        position: relative;
    }

    /* CRITICAL FIX: Mobile menu gets DARK text on WHITE background */
    .home header .nav-menu {
        order: 3;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white !important;
        flex-direction: column;
        justify-content: center;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 100;
    }

    .home header .nav-menu.active {
        transform: translateY(0);
    }

    /* Override nav--white styles for mobile menu items */
    .home header .nav-menu .nav-link {
        color: var(--color-text-main) !important;
        text-shadow: none !important;
        font-size: 1.2rem;
        font-weight: 400;
    }

    /* Ensure Contact button is visible in mobile menu */
    .home header .nav-menu .nav-link.btn-primary {
        background: var(--color-text-main) !important;
        color: white !important;
        border: 1px solid var(--color-text-main) !important;
    }

    /* Language selector styling on mobile - white text when header is transparent */
    .home header.nav--white .lang-selector .custom-select__trigger {
        color: white !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .home header.nav--white .lang-selector .custom-select__trigger .arrow::before {
        border-color: white !important;
    }

    /* Language selector styling on mobile - dark text when scrolled */
    .home header.nav--dark .lang-selector .custom-select__trigger {
        color: var(--color-text-main) !important;
        text-shadow: none;
    }

    .home header.nav--dark .lang-selector .custom-select__trigger .arrow::before {
        border-color: var(--color-text-main) !important;
    }

    /* Mobile toggle button visibility */
    .home header.nav--white .mobile-toggle {
        color: white !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .home header.nav--dark .mobile-toggle {
        color: var(--color-text-main) !important;
        text-shadow: none;
    }

    /* Ensure minimum tap area for mobile */
    .home header .lang-selector .custom-select__trigger {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem;
    }

    /* Ensure header is always visible on mobile */
    .home header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 101;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-top: calc(1rem + env(safe-area-inset-top));
    }

    /* Add padding to body to prevent content from being hidden under fixed header */
    .home body {
        padding-top: env(safe-area-inset-top);
    }

    /* FIX (REVISED): Disable flex centering and push content down manually */
    .landing-hero {
        align-items: flex-start !important;
        /* Stop centering */
        padding-top: 140px !important;
        /* Push content down below header */
        padding-bottom: 2rem;
        height: 100vh;
        /* Keep full screen */
    }

    /* Additional safety for the title */
    .landing-content {
        margin-top: 0;
        /* Let padding handle spacing */
    }

    /* Hide hero text when mobile menu is open to prevent overlap */
    body.menu-open .landing-content {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
}

/* Ensure dropdown z-index is high enough */
.home .custom-options {
    z-index: 200;
}

/* ====================================
   INTRO ANIMATION
   ==================================== */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0b0d15;
    /* Deep dark blue/black matching the night vibe */
    z-index: 2000;
    /* High, but below text/header */
    animation: introFadeOut 1.2s ease-out forwards;
    pointer-events: none;
    /* Allows clicking through even if opacity is slightly non-zero */
}

/* Ensure text and header stay ABOVE the overlay */
.home header {
    z-index: 2001;
}

.landing-content {
    position: relative;
    z-index: 2001;
    color: white;
    /* Force white text during animation */
}

@keyframes introFadeOut {
    0% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/*
   Delayed Nav Animation
   The logo stays visible, but menu/actions fade in after intro
*/

/* ANIMATE HEADER ACTIONS Globablly (Lang + Toggle visible on mobile) */
.home header .header-actions {
    opacity: 0;
    animation: navFadeIn 1s ease-out forwards;
    animation-delay: 1.2s;
    /* Wait for intro to finish */
}

/* ANIMATE NAV MENU - DESKTOP ONLY (Prevents auto-opening mobile menu) */
@media (min-width: 769px) {
    .home header .nav-menu {
        opacity: 0;
        animation: navFadeIn 1s ease-out forwards;
        animation-delay: 1.2s;
    }
}

/* Safe Fade In (Opacity Only - No Transform to avoid conflicts) */
@keyframes navFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}