/* css/navigation-style.css - Styles for Site Header, Desktop & Mobile Navigation */

/* -------------------------------------------------------------------------
    1. Header Styles (Main Site Header)
   ------------------------------------------------------------------------- */
.site-header-v3 { 
    background-color: rgba(10, 15, 20, 0.9); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    padding: calc(var(--spacing-unit-futuristic) * 1) 0; 
    border-bottom: 1px solid var(--futuristic-border); 
    position: sticky; 
    top: 0; 
    z-index: 1000; /* Lower than mobile menu and promo bar */
    width: 100%;
}
.header-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.site-logo a { 
    display: inline-block; 
}

/* Hero H1 Highlight (if specific to header context, otherwise move to main CSS if used elsewhere) */
.hero-highlight-warm { 
    color: var(--futuristic-warm-accent) !important; /* Ensure it overrides other span styles if any */
}


/* -------------------------------------------------------------------------
    2. Desktop Navigation Styles (Visible on larger screens)
   ------------------------------------------------------------------------- */
.main-navigation { 
    display: flex; 
    align-items: center; 
    gap: calc(var(--spacing-unit-futuristic) * 1.2); 
}
.nav-link { 
    font-family: var(--font-body-futuristic); 
    font-size: calc(var(--spacing-unit-futuristic) * 0.85); 
    color: var(--futuristic-text-primary); 
    text-decoration: none; 
    padding: calc(var(--spacing-unit-futuristic) * 0.5) 0; 
    position: relative; 
    transition: color 0.25s ease; 
    letter-spacing: 0.4px; 
}
.nav-link::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background-color: var(--futuristic-primary); 
    transition: width 0.3s ease-out; 
}
.nav-link:hover, .nav-link:focus { 
    color: var(--futuristic-primary-hover); 
}
.nav-link:hover::after, .nav-link:focus::after { 
    width: 100%; 
}

.nav-link.active-link {
    color: var(--futuristic-primary) !important; 
    font-weight: 600; 
}
.nav-link.active-link::after {
    width: 100%; 
    background-color: var(--futuristic-primary);
}

.main-navigation .header-cta.cta-button { 
    font-size: calc(var(--spacing-unit-futuristic) * 0.8); 
    padding: calc(var(--spacing-unit-futuristic) * 0.7) calc(var(--spacing-unit-futuristic) * 1.6); 
    margin-left: calc(var(--spacing-unit-futuristic) * 0.5); 
}


/* -------------------------------------------------------------------------
    3. Hamburger Menu & Mobile Overlay Styles - ENHANCED
   ------------------------------------------------------------------------- */
.hamburger-button {
    display: none; 
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 15px; 
    z-index: 1070; /* Ensure hamburger is above overlay when closing, but JS handles actual open state */
    position: relative; 
}

.hamburger-button__bar {
    display: block;
    width: 30px; 
    height: 3px;
    background-color: var(--futuristic-primary); /* Ensure this is visible on your header */
    margin: 6px 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); 
    border-radius: 1px;
}

/* Hamburger animation to 'X' when .is-active class is added by JS */
.hamburger-button.is-active .hamburger-button__bar:nth-child(1) {
    transform: translateY(9px) rotate(135deg); 
}
.hamburger-button.is-active .hamburger-button__bar:nth-child(2) {
    transform: scale(0); 
}
.hamburger-button.is-active .hamburger-button__bar:nth-child(3) {
    transform: translateY(-9px) rotate(-135deg); 
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0; 
    width: 100%;
    height: 100%; /* Full viewport height */
    background: linear-gradient(-45deg, var(--futuristic-bg-dark), var(--futuristic-bg-medium), #10121c, var(--futuristic-bg-dark));
    background-size: 200% 200%; 
    animation: gradientBG 10s ease infinite;

    z-index: 1060; /* HIGHER than promo bar (1050), but potentially lower than hamburger if it needs to be above the closing animation */
    
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start; /* CHANGED: Align content to the top of the padded area */
    
    /* Base padding. JS will dynamically adjust padding-top if promo bar is visible. */
    padding: calc(var(--spacing-unit-futuristic) * 1.5); /* Applies to left, right, bottom */
    padding-top: calc(var(--spacing-unit-futuristic) * 1.5); /* Base top padding */
    box-sizing: border-box; /* Critical for padding to work with height: 100% */

    opacity: 0;
    visibility: hidden;
    clip-path: circle(0% at calc(100% - 40px) 40px); /* Your existing animation */
    transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1), 
                opacity 0.5s linear, 
                visibility 0s linear 0.6s, /* Make visibility transition instant after opacity */
                padding-top 0.3s ease-in-out; /* Transition for dynamic padding-top */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    clip-path: circle(150% at calc(100% - 40px) 40px); 
    transition: clip-path 0.6s cubic-bezier(0.77, 0, 0.175, 1), 
                opacity 0.3s linear,  /* Faster fade in */
                visibility 0s linear 0s, /* Instantly visible when opening */
                padding-top 0.3s ease-in-out;
}

.mobile-menu-header {
    /* REMOVED: position: absolute; and top property */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Will respect parent's padding */
    margin-bottom: calc(var(--spacing-unit-futuristic) * 2); 
    flex-shrink: 0; /* Prevent this from shrinking if nav is long */
}

.mobile-menu-logo img { 
    filter: brightness(0) invert(1) sepia(1) hue-rotate(130deg) saturate(1000%) brightness(1.2);
}

.close-menu-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1071; /* Ensure close button is clickable above other menu content if needed */
}
.close-menu-button svg {
    transition: transform 0.3s ease;
    fill: var(--futuristic-primary); 
}
.close-menu-button:hover svg {
    transform: rotate(90deg) scale(1.1);
    fill: var(--futuristic-primary-hover);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    /* REMOVED: margin-top: calc(var(--spacing-unit-futuristic) * -2); as it might conflict with new layout */
    flex-grow: 1; /* Allows nav to take available space */
    overflow-y: auto; /* If link list is very long */
}

.mobile-menu-link {
    font-family: var(--font-heading-futuristic);
    font-size: calc(var(--spacing-unit-futuristic) * 2); 
    color: var(--futuristic-text-heading);
    text-decoration: none;
    padding: calc(var(--spacing-unit-futuristic) * 1.2) 0; 
    margin-bottom: calc(var(--spacing-unit-futuristic) * 0.8);
    opacity: 0;
    transform: scale(0.9) translateY(30px); 
    transition: color 0.3s ease, opacity 0.6s cubic-bezier(0.215, 0.610, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1);
    letter-spacing: 1.5px; 
    position: relative;
    font-weight: 600;
}
.mobile-menu-link::after { 
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: calc(var(--spacing-unit-futuristic) * 0.8); 
    left: 0;
    background: var(--futuristic-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
.mobile-menu-link:hover::after,
.mobile-menu-link:focus::after {
    transform: scaleX(0.6); 
}

.mobile-menu-link:hover,
.mobile-menu-link:focus {
    color: var(--futuristic-primary-hover); 
    transform: scale(1.05); 
}

.mobile-menu-link.active-link {
    color: var(--futuristic-primary) !important;
    font-weight: 700; 
}
.mobile-menu-link.active-link::after {
    transform: scaleX(0.8); 
    background-color: var(--futuristic-primary);
}

/* Staggered animation for links when menu opens */
.mobile-menu-overlay.is-open .mobile-menu-link {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.mobile-menu-overlay.is-open .mobile-menu-link:nth-child(1) { transition-delay: 0.3s; }
.mobile-menu-overlay.is-open .mobile-menu-link:nth-child(2) { transition-delay: 0.38s; } 
.mobile-menu-overlay.is-open .mobile-menu-link:nth-child(3) { transition-delay: 0.46s; }
.mobile-menu-overlay.is-open .mobile-menu-link:nth-child(4) { transition-delay: 0.54s; }
.mobile-menu-overlay.is-open .mobile-menu-link:nth-child(5) { transition-delay: 0.62s; } /* Added for 'About Us' */
.mobile-menu-overlay.is-open .mobile-menu-link.mobile-menu-cta { transition-delay: 0.7s; } /* Delay for CTA button */


.mobile-menu-link.mobile-menu-cta { 
    margin-top: calc(var(--spacing-unit-futuristic) * 2); 
    padding: calc(var(--spacing-unit-futuristic) * 1) calc(var(--spacing-unit-futuristic) * 2.5);
    font-size: calc(var(--spacing-unit-futuristic) * 1.3);
    border-radius: 50px; 
    background-color: transparent; 
    color: var(--futuristic-primary) !important; 
    border: 2px solid var(--futuristic-primary); 
    box-shadow: none; 
    transition-property: background-color, color, transform, box-shadow, border-color; 
    transition-duration: 0.3s;
    transition-timing-function: ease;
    display: inline-block; 
}
.mobile-menu-link.mobile-menu-cta:hover,
.mobile-menu-link.mobile-menu-cta:focus {
    background-color: var(--futuristic-primary); 
    color: var(--futuristic-text-on-accent) !important;
    border-color: var(--futuristic-primary); 
    box-shadow: 0 0 20px var(--futuristic-glow); 
    transform: scale(1.05) translateY(-2px); 
}
.mobile-menu-link.mobile-menu-cta::after { 
    display: none; 
}

.mobile-menu-footer {
    /* REMOVED: position: absolute; and bottom property */
    margin-top: auto; /* Pushes footer to the bottom of the flex container */
    padding-top: calc(var(--spacing-unit-futuristic) * 1); /* Add some space above footer */
    width: 100%; /* Ensure it spans width for text-align */
    text-align: center; /* Center the text */
    font-size: calc(var(--spacing-unit-futuristic) * 0.8);
    color: var(--futuristic-text-secondary);
    opacity: 0;
    transition: opacity 0.5s ease 0.8s; 
    flex-shrink: 0; /* Prevent footer from shrinking */
}
.mobile-menu-overlay.is-open .mobile-menu-footer {
    opacity: 1;
}

/* This class is added to body by JS to prevent scrolling when menu is open */
body.mobile-menu-active {
    overflow: hidden;
}

/* This rule is applied by the browser when the 'hidden' attribute is present on the overlay */
/* Your JS also sets hidden=true after the closing animation for accessibility */
.mobile-menu-overlay[hidden] {
    display: none !important; /* Ensures it's fully hidden and out of flow */
}


/* -------------------------------------------------------------------------
    4. Responsive Navigation Control
   ------------------------------------------------------------------------- */
@media (max-width: 991.98px) { 
    .main-navigation#main-desktop-nav {
        display: none; 
    }
    .hamburger-button {
        display: inline-flex; 
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 767.98px) { 
    .site-header-v3 .site-logo img { 
        width: 180px !important; 
    }
    .mobile-menu-link { 
        font-size: calc(var(--spacing-unit-futuristic) * 1.8);
    }
}