/* Header ported from mp_game_home (src/components/Header.astro) */
/* Self-contained: uses its own 1024px breakpoint (Tailwind "lg"), independent of
   the rest of the page's 1200px mobile/desktop switch, since this header has its
   own solid background and doesn't depend on the hero background image. */

.site-header {
    position: relative;
    z-index: 50;
    width: 100%;
    background: #fff;
    font-family: "Roboto", sans-serif;
    height: 60px;
}

@media (min-width: 1024px) {
    .site-header {
        height: 75px;
    }
}

.site-header__border {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(117, 181, 228, 1) 38%, rgba(117, 181, 228, 1) 62%, rgba(255, 255, 255, 0) 100%);
}

.site-header__inner {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    display: flex;
    height: 100%;
    width: 100%;
    max-width: 1920px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 12px;
}

@media (min-width: 1024px) {
    .site-header__inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        padding: 0 48px 0 40px;
        gap: 24px;
    }
}

.site-header__brand-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 1024px) {
    .site-header__brand-nav {
        grid-column: 2;
        justify-self: center;
        margin-left: -80px;
        gap: 100px;
    }
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 1024px) {
    .site-header__actions {
        grid-column: 3;
        justify-self: end;
    }
}

.site-header__logo {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
}

@media (min-width: 1024px) {
    .site-header__logo {
        top: 20px;
    }
}

.site-header__logo img {
    height: 44px;
    width: 44px;
    object-fit: cover;
    border: 2.5px solid #fff;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

@media (min-width: 1024px) {
    .site-header__logo img {
        height: 78px;
        width: 78px;
        border-width: 4px;
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    }
}

.site-header__nav {
    display: none;
    height: 100%;
    align-items: center;
}

@media (min-width: 1024px) {
    .site-header__nav {
        display: flex;
    }
}

.site-header__nav ul {
    display: flex;
    height: 100%;
    list-style: none;
    align-items: center;
    gap: 54px;
    margin: 0;
    padding: 0;
}

.site-header__link {
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.5;
    white-space: nowrap;
    color: #1b2434;
    text-decoration: none;
    transition: color 0.2s ease-out;
}

.site-header__link:hover {
    color: #0055ac;
}

.header-download-links {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header-download-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 26px;
    transition: transform 0.3s ease;
}

.header-download-links a:hover {
    transform: scale(1.05);
}

@media (min-width: 1024px) {
    .header-download-links a {
        width: 127px;
        height: 42px;
    }
}

.header-download-links img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-download-links a.header-download-links__download {
    display: flex;
}

@media (min-width: 1024px) {
    .header-download-links a.header-download-links__download {
        display: none;
    }
}

#mobile-menu-toggle {
    display: flex;
    height: 24px;
    width: 24px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

@media (min-width: 1024px) {
    #mobile-menu-toggle {
        display: none;
    }
}

#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

@media (min-width: 1024px) {
    #mobile-menu-backdrop {
        display: none;
    }
}

#mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: 220px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.is-open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    #mobile-menu {
        display: none;
    }
}

.site-header__mobile-nav {
    display: flex;
    height: 100%;
    width: 100%;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding-top: 6px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
}

.site-header__mobile-nav ul {
    display: flex;
    width: 100%;
    list-style: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.site-header__mobile-nav ul li {
    width: 100%;
    border-top: 1px solid #eee;
}

.site-header__mobile-nav ul li:first-child {
    border-top: none;
}

.site-header__mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    text-decoration: none;
}

.site-header__mobile-nav .site-header__bullet {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    transform: rotate(45deg);
    background: #1b2434;
}

.site-header__mobile-nav .site-header__link {
    width: 120px;
    text-align: left;
    font-size: 13px;
}
