﻿/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-brand);
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-inline: var(--space-side);
    padding-block: 28px;
}

/* Logo */
.site-logo {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1;
    color: var(--color-bg);
    flex-shrink: 0;
}

/* Navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

    .site-nav a {
        color: var(--color-bg);
        font-family: var(--font-heading);
        font-size: var(--font-size-body);
        line-height: 1.4;
    }

        .site-nav a:hover {
            color: var(--color-accent);
        }

/* Language switcher */
.lang-switcher {
    position: relative;
}

.lang-switcher__button {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-heading);
    font-size: var(--font-size-body);
    line-height: 1.4;
    color: var(--color-bg);
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

    .lang-switcher__button::-webkit-details-marker {
        display: none;
    }

    .lang-switcher__button:hover,
    .lang-switcher__button:focus-visible {
/*        background: rgba(255, 255, 255, 0.18);
        border-color: var(--color-accent);*/
        background: var(--color-bg);
        color: var(--color-brand) !important;
    }

.lang-switcher__globe {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.lang-switcher__chevron {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.lang-switcher[open] .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute; /* overlay — doesn't push header height */
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    background: #91393d;
    border-radius: 8px;
    overflow: hidden;
    z-index: 10;
}

    .lang-switcher__menu a {
        display: block;
        padding: 10px 16px;
        color: var(--color-bg);
        font-family: var(--font-heading);
        font-size: var(--font-size-body);
    }

        .lang-switcher__menu a:hover {
            background: var(--color-bg);
            color: var(--color-brand);
        }

/* Mobile burger */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 21px;
    cursor: pointer;
    position: relative;
    z-index: 1001; /* stays above the full-screen nav so it still closes it */
    flex-shrink: 0;
}

    .nav-toggle-label span {
        width: 30px;
        height: 3px;
        background: var(--color-bg);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(9px);
}

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-9px);
}

/* Tablet / Mobile */
@media (max-width: 1024px) {
    .site-logo {
        position: relative;
        z-index: 1001; 
    }

    .site-header__inner {
        min-height: 72px;
        padding-block: 18px;
        gap: 0;
    }

    .site-logo {
        font-size: 24px;
    }

    .nav-toggle-label {
        display: flex;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-brand);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        padding: var(--space-side);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

    .nav-toggle:checked ~ .site-nav {
        transform: translateX(0);
    }

    .site-nav a {
        font-size: 20px;
        color: var(--color-bg);
    }

    .lang-switcher {
        margin-left: 0;
    }

    .lang-switcher__button {
        font-size: 20px;
    }

    .lang-switcher__menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        text-align: center;
        color: var(--color-text)
    }
}

/* Optional: locks background scroll while the mobile menu is open */
body:has(#nav-toggle:checked) {
    overflow: hidden;
}
