/* --- 1. BASE STYLES --- */
html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}


/* --- 2. HEADER CONTAINER --- */
.site-header {
    width: 100%;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: 100px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    /* more transparent */
    backdrop-filter: blur(8px);
    /* subtle glass effect (optional) */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);

    /* NEW: load animation */
    opacity: 0;
    transform: translateY(-20px);
    animation: headerSlideDown 0.7s ease-out forwards;
}

@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        /* start slightly above */
    }

    to {
        opacity: 1;
        transform: translateY(0);
        /* end at normal position */
    }
}



.main-nav {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Default: Center everything (Desktop) */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* --- 3. MENU STYLES --- */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 40px;
    /* Spacing between all items including logo */
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    text-decoration: none;
    color: #000;
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #777;
}

/* --- 4. LOGO HANDLING --- */

/* Desktop Logo: Lives inside the UL list to push links apart naturally */
.desktop-logo-item img {
    width: 130px;
    height: auto;
    display: block;
}

/* Mobile Logo: Hidden by default on Desktop */
.mobile-logo {
    display: none;
}

/* --- 5. ICONS (Hidden on Desktop) --- */
.hamburger,
.close-icon {
    display: none;
}


/* --- 6. RESPONSIVE DESIGN (Tablets & Mobile < 991px) --- */
@media (max-width: 991px) {
    .site-header {
        height: 80px;
    }

    .main-nav {
        justify-content: space-between;
        display: flex;
        width: 100%;
    }

    .desktop-logo-item {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .mobile-logo img {
        width: 100px;
        height: -60px;
    }

    .hamburger {
        display: block;
        font-size: 24px;
        cursor: pointer;
        color: #333;
        padding: 10px;
        /* z-index: 1001; */
        /* Ensure hamburger is clickable */
    }

    /* MOBILE DRAWER MENU */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden off-screen to the right */
        width: 100%;
        /* Covers 80% of screen */
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        /* Smooth "Slide-in" Animation */
        transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        /* z-index: 1002; */
        display: flex;
        box-shadow: none;
        overflow-x: hidden;
    }

    /* State triggered by JavaScript */
    .nav-menu.active {
        right: 0;
        /* Slides into view */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu li a {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .close-icon {
        display: block;
        position: absolute;
        top: 25px;
        right: 25px;
        font-size: 28px;
        cursor: pointer;
    }
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* z-index: 1001; */
    /* Between site-header and nav-menu */
    display: none;
    /* Hidden by default */
}

.menu-overlay.active {
    display: block;
    width: 100%;
    /* Shows when menu is open */
}

/* Desktop stays same. Mobile overrides below */
@media (max-width: 991px) {
    .main-nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 0px !important;
        overflow-x: hidden;
    }

    .mobile-logo-wrapper {
        display: block !important;
    }

    .m-logo {
        width: 45px !important;
        height: auto !important;
    }

    .desktop-logo-item {
        display: none !important;
    }

    .hamburger {
        display: block !important;
        cursor: pointer;
        /* z-index: 10001; */
        font-size: 24px;
    }
}

/* Enhanced Mobile Menu - Matches paste.txt patterns */
@media (max-width: 991px) {
    .nav-menu {
        /* Your existing styles + these enhancements */
        padding: 20px 0;
        /* Matches paste.txt mobile padding */
        max-height: 100vh;
        overflow-y: auto;
        /* Scrollable if too many items */
    }

    .nav-menu.active {
        /* Your existing styles + these for consistency */
        padding: 20px 0 !important;
        opacity: 1 !important;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        /* Matches paste.txt */
        border-bottom: 1px solid #f0f0f0;
        /* Subtle dividers */
    }

    /* Close icon positioning fix */
    .close-icon {
        margin-bottom: 30px;
        /* Space before menu items */
    }
}

/* Overlay click closes menu (enhances UX) */
.menu-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
    /* Smooth fade */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Desktop: keep toggle hidden by default */
.nav-toggle {
    display: none;
}

/* Mobile: force toggle to show */
@media (max-width: 991px) {
    .site-header .nav-toggle {
        display: flex !important;
        /* override desktop rule */
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        /* z-index: 10001; */
    }
}