:root {
    /* Dark Mode (Default) */
    --bg-color: #000000;
    --text-color: #f5f5f7;
    --text-color-secondary: #a1a1a6;
    --accent-color-1: #00abbb;
    --accent-color-2: #7f5af0;
    --accent-color-hover: #3395ff;
    --section-bg-color: #1d1d1f;
    --card-bg-color: #2c2c2e;
    --border-color: #424245;
    --shadow-color: rgba(0, 0, 0, 0.3);
    font-size: 17px;
    --global-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --zm-font-heading: 'Outfit', sans-serif;
}

/* body {

} */

.global-header {
    background-color: var(--section-bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Header itself */
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    position: relative;
    /* For positioning mobile menu toggle if needed */
}

.rr-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1002;
    /* Ensure logo is above overlay when menu open */
}

.rr-logo-img {
    height: 36px;
}

.rr-logo-text {
    font-family: var(--zm-font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin-left: 12px;
    letter-spacing: -0.5px;
}

/* Hamburger Menu Button - Hidden on Desktop by Default */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Hamburger animation when active (JS adds 'nav-open' to header/body or 'active' to button) */
.global-header.nav-open .nav-toggle .bar-top {
    transform: translateY(7.5px) rotate(45deg);
}

.global-header.nav-open .nav-toggle .bar-middle {
    opacity: 0;
}

.global-header.nav-open .nav-toggle .bar-bottom {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Overlay for when the menu is open */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.global-header.nav-open .nav-overlay {
    display: block;
}

/* Side Menu - Hidden on Desktop by Default */
.navbar {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color-secondary);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-color-1);
}

/* --- Responsive Adjustments --- */

/* Larger Mobile (up to 480px) */
@media (max-width: 480px) {
    .rr-logo-text {
        font-size: 1.1rem;
    }

    .rr-logo-img {
        height: 30px;
    }

    .navbar {
        width: 250px;
    }
}

/* Small Mobile (up to 600px) */
@media (max-width: 600px) {
    .rr-logo-text {
        font-size: 1.1rem;
    }

    .rr-logo-img {
        height: 30px;
    }

    .navbar {
        width: 250px;
    }
}

/* Tablet and smaller desktop (768px) */
@media (max-width: 768px) {

    /* Show Hamburger Menu */
    .nav-toggle {
        display: flex;
    }

    /* Mobile menu styles */
    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80%;
        height: 100vh;
        background-color: var(--section-bg-color);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        padding-top: 80px;
        transition: right 0.35s ease-in-out;
        z-index: 999;
        overflow-y: auto;
    }

    /* When JS adds 'nav-open' class to the header (or body) */
    .global-header.nav-open .navbar {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 15px 25px;
        font-size: 1rem;
        color: var(--text-color);
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a:hover {
        background-color: var(--card-bg-color);
        color: var(--accent-color-1);
    }

    .rr-logo-text {
        font-size: 1.2rem;
    }

    .rr-logo-img {
        height: 32px;
    }
}

/* Desktop and larger */
@media (min-width: 769px) {

    /* Hide Hamburger Menu */
    .nav-toggle {
        display: none;
    }

    /* Show horizontal menu */
    .navbar {
        display: flex;
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        padding-top: 0;
        overflow-y: visible;
    }

    .nav-links {
        flex-direction: row;
        align-items: center;
    }

    .nav-links li {
        margin-left: 30px;
    }

    .nav-links a {
        display: inline;
        padding: 0;
        font-size: 0.95rem;
        color: var(--text-color-secondary);
        border-bottom: none;
        width: auto;
    }
}