/* --- Base Navbar Styles (Option One) --- */
#gtd-main-nav-option-one {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2147483647; /* Highest z-index to be above everything by default */
    background-color: transparent; /* Always transparent by default */
    padding: 1rem 1.5rem; /* Default padding for all screens */
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-sizing: border-box; /* Include padding in width calculation */
    box-shadow: none; /* No shadow when transparent by default */
}

/* Styles for when the navbar is active after scrolling */
#gtd-main-nav-option-one.scrolled-active {
    background-color: #f6f7f8; /* Your desired background color when visible after scroll */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Subtle shadow when background is visible */
}

/* Class to hide the navbar when scrolling down (applied by JS) */
#gtd-main-nav-option-one.navbar-hidden {
    transform: translateY(-100%); /* Moves the navbar completely out of view */
    background-color: transparent; /* Ensure background is transparent when hidden */
    box-shadow: none; /* Ensure no shadow when hidden */
}

/* Inner container for content to center it on larger screens and handle mobile layout */
#gtd-main-nav-option-one .gtd-navbar-inner-container {
    max-width: 1280px; /* Max width for content */
    margin-left: auto;
    margin-right: auto;
    height: 4rem; /* Fixed height for the main navbar area */
    
    /* Desktop layout: Logo left, Menu right */
    display: flex; /* Default for desktop */
    justify-content: space-between;
    align-items: center;
}

/* Mobile Layout for Inner Container (Small screens) */
@media (max-width: 767px) {
    #gtd-main-nav-option-one .gtd-navbar-inner-container {
        display: grid !important; /* Force grid layout for mobile */
        grid-template-columns: 1fr auto 1fr !important; /* Left empty, Center logo, Right hamburger */
        align-items: center; /* Vertically center items */
        justify-items: center; /* Horizontally center items within their grid cells */
    }
}

/* --- Logo Styling --- */
/* Desktop Logo (Full version) */
#gtd-main-nav-option-one .gtd-logo-wrapper {
    display: block; /* Visible by default on desktop */
}
#gtd-main-nav-option-one .gtd-logo-img { /* Corrected typo: gtd-main-option-one -> gtd-main-nav-option-one */
    height: 3rem; /* Height for the logo */
    width: auto; /* Maintain aspect ratio */
    display: block;
}
/* Hide desktop logo on mobile */
@media (max-width: 767px) {
    #gtd-main-nav-option-one .gtd-logo-wrapper {
        display: none !important; /* Force hide desktop logo on mobile */
    }
}

/* --- Mobile-Specific Centered Logo --- */
#gtd-main-nav-option-one .gtd-mobile-center-logo-wrapper {
    display: none; /* Hidden by default on desktop */
}
@media (max-width: 767px) {
    #gtd-main-nav-option-one .gtd-mobile-center-logo-wrapper {
        display: flex !important; /* Force show on mobile */
        justify-content: center; /* Center horizontally within its grid cell */
        align-items: center; /* Center vertically */
        grid-column: 2; /* Place in the middle column of the grid */
    }
}
#gtd-main-nav-option-one .gtd-mobile-center-logo-img {
    height: 3.5rem !important; /* Force smaller size for mobile logo */
    width: auto !important; /* Maintain aspect ratio */
    display: block !important; /* Ensure it's explicitly displayed */
}

/* --- Hamburger Menu Toggle Button (Right Side on Mobile) --- */
#gtd-main-nav-option-one .gtd-mobile-toggle-area {
    display: none; /* Hidden by default on desktop */
    /* On mobile, its position is absolute relative to #gtd-main-nav-option-one (which is fixed) */
    position: absolute;
    top: 2rem!important; /* Aligned with padding of main nav */
    right: 1.5rem; /* Aligned with padding of main nav */
    z-index: 2147483648; /* Always higher than main nav and full-screen menu */
}
@media (max-width: 767px) {
    #gtd-main-nav-option-one .gtd-mobile-toggle-area {
        display: block !important; /* Force visible on mobile */
        /* Note: its fixed positioning when menu is open is now handled by JS for utmost reliability */
    }
}

/* Hamburger Button itself */
#gtd-mobile-toggle-one {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
}
#gtd-mobile-toggle-one:focus {
    /*box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);*/ /* Blue focus ring */
}

/* Custom styles for the hamburger icon lines */
#gtd-mobile-toggle-one .gtd-hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333; /* Dark grey lines for visibility */
    border-radius: 9999px;
    transition: all 0.3s ease-in-out;
}
#gtd-mobile-toggle-one .gtd-hamburger-line.gtd-middle-line {
    margin-top: 6px;
    margin-bottom: 6px;
}
#gtd-mobile-toggle-one .gtd-hamburger-line.gtd-bottom-line {
    margin-top: 6px;
}

/* Transform hamburger to 'X' when open */
#gtd-mobile-toggle-one.open .gtd-top-line {
    transform: rotate(45deg) translate(5px, 5px);
}
#gtd-mobile-toggle-one.open .gtd-middle-line {
    opacity: 0;
}
#gtd-mobile-toggle-one.open .gtd-bottom-line {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* --- Desktop Menu & Collapsible Mobile Menu Wrapper --- */
/* Default (mobile) state - hidden */
#gtd-menu-links-one {
    display: none; /* Hidden by default on mobile (controlled by JS toggle) */
}

/* Display menu as flex row on desktop */
@media (min-width: 768px) { /* Standard breakpoint for desktop (laptop screens and up) */
    #gtd-menu-links-one {
        display: flex; /* Ensure buttons are visible on desktop */
        flex-direction: row;
        align-items: center;
        margin-top: 0; /* Remove mobile margin on desktop */
        width: auto; /* Width adapts to content on desktop */
        gap: 0.5rem; /* Spacing between desktop menu items */
    }
}

/* Mobile Fullscreen Menu Styles when active (on small screens) */
@media (max-width: 767px) {
    #gtd-menu-links-one.gtd-mobile-fullscreen-menu:not(.hidden) {
        position: fixed; /* Fixed to viewport */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Full viewport height */
        background-color: #f6f7f8; /* Your desired background for fullscreen menu */
        z-index: 2147483647; /* Set Z-index for the menu itself, one lower than the close button's static value */
        display: flex; /* Use flexbox for centering */
        flex-direction: column; /* Stack logo and menu vertically */
        justify-content: center; /* Center content vertically */
        align-items: center; /* Center content horizontally */
        overflow-y: auto; /* Allow scrolling if menu content exceeds screen height */
        padding: 2rem 1rem; /* Padding for the fullscreen menu */
        box-sizing: border-box;
    }
    /* Hide the main navbar logo and mobile-centered logo when fullscreen menu is open */
    #gtd-main-nav-option-one .gtd-logo-wrapper,
    #gtd-main-nav-option-one .gtd-mobile-center-logo-wrapper {
        display: none !important; /* Force hide both logos when fullscreen menu is open */
    }
    /* The hamburger button's display and z-index are handled in its own rule above and by JS */
}


/* Menu List (ul) Styling */
#gtd-menu-links-one .gtd-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Default for mobile (will be overridden for desktop) */
    gap: 1.5rem; /* Vertical spacing for mobile menu items */
    width: 100%; /* Full width for mobile menu items */
    text-align: center; /* Center text within list items for mobile */
}

/* Desktop menu list layout */
@media (min-width: 768px) {
    #gtd-menu-links-one .gtd-menu-list {
        flex-direction: row; /* Horizontal on desktop */
        gap: 0.5rem; /* Spacing between desktop menu items */
        margin-right: 0;
        width: auto; /* Width adapts to content on desktop */
        text-align: left; /* Reset text align for desktop */
    }
}

/* Menu Item (li) Styling */
#gtd-menu-links-one .gtd-menu-list li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%; /* Each button in a new row for mobile */
}
@media (min-width: 768px) {
    #gtd-menu-links-one .gtd-menu-list li {
        width: auto; /* Revert width for desktop */
    }
}

/* --- Menu Link (a) Styling --- */
#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list a {
    color: #333333; /* Dark grey for contrast on transparent background / mobile menu */
    font-family: 'Gabarito', sans-serif; /* Your custom font */
    font-weight: 500;
    font-size: 1.5rem; /* Larger font size for fullscreen mobile menu */
    padding: 1rem 1.5rem; /* Generous padding around links */
    border-radius: 0.5rem; /* Rounded corners */
    transition: all 0.2s ease-in-out;
    text-decoration: none; /* No underline */
    display: block; /* Make links fill their container */
    line-height: normal;
    box-sizing: border-box;
    text-transform: uppercase; /* Convert text to uppercase */
    letter-spacing: 1px; /* Add letter spacing */
}
@media (min-width: 768px) { /* Adjust font size for desktop */
    #gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list a {
        font-size: 1.05rem; /* Revert to smaller size for desktop */
        padding: 0.75rem 1rem;
    }
}


#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list a:hover,
#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list a:focus {
    opacity: 0.65; /* Fade effect on hover/focus */
}

/* Active menu item styles */
#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list .current-menu-item a,
#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list .current_page_item a,
#gtd-main-nav-option-one #gtd-menu-links-one .gtd-menu-list .current-menu-ancestor a {
    color: #EA93A6 !important; /* Consistent blue for active state, forced with !important */
}

@media (max-width: 767px) {
    #gtd-main-nav-option-one .gtd-mobile-center-logo-wrapper {
        display: unset!important;
    }
}