/* -------------------------------------------------------------
 1. CSS VARIABLES & RESET
 ------------------------------------------------------------- */
:root {
    --bg-primary: #000000;
    --bg-secondary: #161617;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-blue: #2997ff;
    --accent-blue-hover: #0077ed;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --card-bg: #1d1d1f;
    --border-color: rgba(255, 255, 255, 0.12);
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.47059;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Global focus state for keyboard accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------------
 2. GLOBAL NAVIGATION
 ------------------------------------------------------------- */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    max-width: 1800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    font-size: 12px;
}

.logo-home-link {
    color: var(--text-primary);
    text-decoration: none;
}

.home-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo {
    width: auto;
    height: 24px;
    object-fit: contain;
}

.global-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    display: inline-block;
}

.nav-list {
    display: flex;
    align-items: center;
    height: 100%;
    list-style: none;
    gap: 8px;
}

.nav-list li {
    height: 100%;
}

.nav-link {
    color: var(--text-primary);
    opacity: 0.8;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    border-radius: 6px;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    z-index: 10000;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* -------------------------------------------------------------
 LANGUAGE SELECTOR
 ------------------------------------------------------------- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
}

.lang-option {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.lang-option:hover,
.lang-option.active {
    color: var(--text-primary);
}

.lang-divider {
    color: var(--border-color);
    user-select: none;
}

/* -------------------------------------------------------------
 3. ANNOUNCEMENT BANNER
 ------------------------------------------------------------- */
.announcement-banner {
    position: fixed;
    top: 50px; /* Anchors the banner directly below your 50px global nav */
    left: 0;
    width: 100%;
    background-color: var(--accent-blue);
    color: #ffffff;
    text-align: center;
    padding: 12px 40px;
    font-size: 14px;
    z-index: 9998; /* Sits just one level beneath the nav's 9999 z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.announcement-banner p {
    margin: 0;
    line-height: 1.4;
}

/* Close Button Styling */
.announcement-banner button {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.announcement-banner button:hover,
.announcement-banner button:focus-visible {
    opacity: 1;
    outline-color: #ffffff;
}

/* Class added via JavaScript to hide the banner */
.announcement-banner.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}


/* -------------------------------------------------------------
 4. FOOTER
 ------------------------------------------------------------- */
.global-footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    padding: 40px 22px 60px;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
}

.footer-content {
    max-width: 1800px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.footer-col-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-disclaimer {
    color: var(--text-secondary);
}

/* -------------------------------------------------------------
 5. RESPONSIVE BREAKPOINTS
 ------------------------------------------------------------- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 40px 24px;
        gap: 24px;
        font-size: 20px;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }

    .nav-list li {
        height: auto;
    }

    .nav-link {
        height: 48px;
        padding: 0 16px;
        justify-content: center;
    }

    .nav-list.is-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-toggle.is-active .hamburger-line:nth-child(1) {
        transform: translateY(3.5px) rotate(45deg);
    }

    .nav-toggle.is-active .hamburger-line:nth-child(2) {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .lang-switch {
        padding: 12px 16px;
        font-size: 18px;
        justify-content: center;
    }

    .announcement-banner {
        padding: 12px 48px 12px 16px; /* Extra right padding so text doesn't overlap the X */
        text-align: left;
        font-size: 13px;
    }

    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 380px) {
    .global-title {
        display: none;
    }
}