/* ==========================================
   HAMBURGER MENU (Mobile)
   ========================================== */
.hamburger-menu {
    position: fixed;
    top: 21px;
    right: 20px;
    transform: translateY(-50%);
    z-index: 10000;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: center;
}

.hamburger-icon {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block !important;
    width: 100% !important;
    height: 3px !important;
    background-color: white;
    
    transition: all 0.3s ease-in-out;
    opacity: 1 !important;
}

/* Hamburger → X animation */
.hamburger-icon.open span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
    background-color: #888888 !important;
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0 !important;
}

.hamburger-icon.open span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
    background-color: #888888 !important;
}

/* ==========================================
   MENU OVERLAY (Mobile fullscreen)
   ========================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #E5E5E5;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 9999;
    padding: 130px 40px 80px 40px;
    box-sizing: border-box;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}


/* Menu Header */
.menu-header {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 20px;
    width: 100%;
    padding: 0;
}

.menu-header-subtitle {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    display: block;
    margin-bottom: 4px;
}

.menu-header h2 {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-weight: 600;
    font-size: 2.25rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0;
}

.menu-chapter {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-top: 8px;
}

/* Navigation links in overlay */
.menu-overlay nav {
    width: 100%;
}

.menu-overlay nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.menu-overlay nav ul li {
    margin: 10px 0;
}

.menu-overlay nav ul li a {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 500;
    color: #888888;
    text-decoration: none;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-overlay nav ul li a:hover {
    color: #555555;
}

/* ==========================================
   DESKTOP HEADER / NAVIGATION
   ========================================== */
.desktop-header-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: #000000;
    z-index: 2040;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.18s linear;
}

.desktop-header-bar--home {
    opacity: 0;
}

.desktop-nav {
    display: none;
    position: fixed;
    top: 31px;
    right: 32px;
    transform: translateY(-50%);
    z-index: 2050;
    padding: 0;
}

.desktop-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav ul li {
    margin: 0;
}

.desktop-nav ul li a {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.desktop-nav ul li a:hover {
    color: #FFFFFF;
}

.desktop-nav ul li a.active {
    color: #FFFFFF;
}

/* ==========================================
   DESKTOP FOOTER
   ========================================== */
.desktop-footer {
    position: fixed;
    bottom: 24px;
    right: 32px;
    z-index: 2100;
    padding: 0;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.footer-social-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-social-links a:hover {
    color: #FFFFFF;
}

.footer-social-links a svg {
    display: block;
}

/* ==========================================
   PAGE TITLE BAR (Mobile)
   ========================================== */
.page-title-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    flex-direction: column;
    justify-content: center;
    background: #000000;
    min-height: 42px;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-title-bar a {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page-title-subtitle {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1;
    display: block;
}

.page-title-main {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2;
    display: block;
}

/* ==========================================
   SOCIAL LINKS IN MOBILE MENU
   ========================================== */
.menu-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    width: 100%;
}

.menu-social-links a {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #aaaaaa;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.menu-social-links a svg {
    width: 25px;
    height: 25px;
    fill: #aaaaaa;
    transition: fill 0.3s;
}

.menu-social-links a:hover {
    color: #333333;
}

.menu-social-links a:hover svg {
    fill: #333333;
}

/* ==========================================
   AUTH SECTION IN MOBILE MENU
   ========================================== */
.menu-auth-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-bottom: 10px;
    width: 100%;
}

.menu-user-name {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-size: 0.8rem;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.menu-sign-out-btn {
    font-family: 'Chakra Petch', Arial, sans-serif;
    font-size: 0.75rem;
    color: #cc4444;
    background: transparent;
    border: 1px solid rgba(204, 68, 68, 0.3);
    padding: 8px 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.menu-sign-out-btn:hover {
    background: rgba(204, 68, 68, 0.1);
    border-color: rgba(204, 68, 68, 0.5);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Desktop: show nav pill bar, hide hamburger */
@media (min-width: 769px) {
    .desktop-header-bar {
        display: block;
    }

    .desktop-nav {
        display: block;
    }

    .hamburger-menu {
        display: none;
    }

    .desktop-footer {
        display: block;
    }

    .page-title-bar {
        display: none !important;
    }
}

/* Mobile: show hamburger, hide desktop nav */
@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .hamburger-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .desktop-footer {
        display: none !important;
    }

    .page-title-bar {
        display: flex !important;
    }

    .menu-overlay {
        padding: 40px 20px 60px 20px;
    }

    .menu-header {
        margin-bottom: 40px;
        margin-top: 10px;
    }

    .menu-overlay nav ul li {
        margin: 8px 0;
    }

    .menu-overlay nav ul li a {
        font-size: clamp(1.8rem, 7vw, 2.8rem);
    }
}

@media (max-width: 480px) {
    .menu-overlay {
        padding: 100px 25px 50px 25px;
    }

    .menu-overlay nav ul li a {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }
}
