.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 230, 240, 0.82);
}

.navbar {
    min-height: 88px;
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-width: 0;
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #9e9bd1);
    color: white;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(124, 121, 184, 0.35);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-title {
    font-weight: 800;
    font-size: 1.08rem;
    line-height: 1.1;
    color: var(--text);
}

.brand-subtitle {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.2;
    white-space: nowrap;
}

.desktop-nav-wrap {
    min-width: 0;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    padding: 6px;
    border-radius: 999px;
    background: #f6f7fc;
    border: 1px solid #e5e8f2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-links > a,
.nav-more > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s ease;
    list-style: none;
}

.nav-links > a:hover,
.nav-more > summary:hover {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 6px 14px rgba(34, 42, 70, 0.08);
}

.nav-more {
    position: relative;
}

.nav-more > summary {
    user-select: none;
}

.nav-more > summary::-webkit-details-marker {
    display: none;
}

.nav-more > summary::after {
    content: "▾";
    font-size: 0.72rem;
    margin-left: 8px;
    opacity: 0.7;
}

.nav-more[open] > summary {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 6px 14px rgba(34, 42, 70, 0.08);
}

.nav-more-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e5e8f2;
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(34, 42, 70, 0.12);
    display: grid;
    gap: 6px;
}

.nav-more-menu a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.93rem;
    transition: 0.18s ease;
}

.nav-more-menu a:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

.nav-utilities {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.93rem;
    transition: 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-utility-link:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

.nav-utility-link-strong {
    background: #f2f3fb;
    color: var(--primary-dark);
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(124, 121, 184, 0.08);
}

.nav-utility-link-strong:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.language-switcher {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(34, 42, 70, 0.06);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: #5f6488;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-panel {
    display: none;
    padding-bottom: 16px;
}

.mobile-nav-panel.is-open {
    display: block;
}

.mobile-nav-links {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e6e9f2;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(34, 42, 70, 0.12);
}

.mobile-nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-links a:hover {
    background: var(--accent);
    color: var(--primary-dark);
}

.mobile-utilities {
    margin-top: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e6e9f2;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(34, 42, 70, 0.08);
    justify-content: flex-start;
    flex-wrap: wrap;
}

.page-section {
    padding: 24px 0;
}

.section-header {
    margin-bottom: 22px;
}

.section-header h2,
.section-header h1 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 780px;
}

.page-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-note {
    margin-top: 50px;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer {
    margin-top: 80px;
    background: #ffffff;
    border-top: 1px solid #eceef6;
}

.footer-container {
    padding-top: 42px;
    padding-bottom: 26px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eceef6;
}

.footer-brand-block {
    max-width: 520px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    margin-bottom: 18px;
}

.footer-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #9e9bd1);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(124, 121, 184, 0.25);
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.footer-brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.footer-brand-subtitle {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.2;
}

.footer-description {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f6fb;
    border: 1px solid #e1e5f0;
    color: #697089;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s ease;
}

.footer-social-link:hover {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: #d4d9e9;
}

.footer-links-block {
    min-width: 220px;
}

.footer-links-block h3 {
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #8a90a8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-links-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.footer-links-block a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: color 0.18s ease;
}

.footer-links-block a:hover {
    color: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-top: 22px;
}

.footer-copyright {
    margin: 0;
    color: #8a90a8;
    font-size: 0.96rem;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-bottom-links a {
    text-decoration: none;
    color: #7b8197;
    font-size: 0.96rem;
    transition: color 0.18s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-dark);
}

@media (max-width: 1380px) {
    .brand-subtitle {
        display: none;
    }

    .navbar {
        grid-template-columns: minmax(220px, 270px) 1fr auto;
    }

    .nav-links > a,
    .nav-more > summary,
    .nav-utility-link {
        font-size: 0.89rem;
    }

    .nav-links > a,
    .nav-more > summary {
        padding: 0 11px;
    }
}

@media (max-width: 1160px) {
    .desktop-nav-wrap,
    .desktop-utilities {
        display: none;
    }

    .navbar {
        grid-template-columns: 1fr auto;
        min-height: 82px;
    }

    .nav-toggle {
        display: inline-flex;
    }
}

@media (max-width: 900px) {
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .footer-links-block {
        min-width: 0;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom-links {
        justify-content: flex-start;
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .mobile-utilities {
        flex-direction: column;
        align-items: stretch;
    }

    .mobile-utilities .nav-utility-link,
    .mobile-utilities .language-switcher {
        width: 100%;
    }

    .mobile-utilities .nav-utility-link {
        justify-content: center;
    }

    .site-footer {
        margin-top: 56px;
    }

    .footer-container {
        padding-top: 30px;
        padding-bottom: 22px;
    }

    .footer-bottom-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== Accessible hidden label ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Language switcher ===== */
.language-switcher {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.language-toggle-form {
    margin: 0;
}

.language-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.language-dropdown::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.language-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 42px;
    padding: 0 38px 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(124, 121, 184, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6f7fc 100%);
    color: var(--primary-dark);
    font-family: "Inter", sans-serif;
    font-size: 0.93rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow:
        0 8px 20px rgba(34, 42, 70, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.language-select:hover {
    border-color: rgba(124, 121, 184, 0.28);
    background: linear-gradient(180deg, #ffffff 0%, #f1f2fb 100%);
    box-shadow:
        0 10px 24px rgba(34, 42, 70, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.language-select:focus {
    outline: none;
    border-color: rgba(124, 121, 184, 0.45);
    box-shadow:
        0 0 0 4px rgba(124, 121, 184, 0.12),
        0 10px 24px rgba(34, 42, 70, 0.08);
}

.language-select:focus + .language-dropdown::after {
    color: var(--primary-dark);
}

.language-select option {
    color: var(--text);
    font-weight: 600;
    background: #ffffff;
}

/* ===== Better spacing with nav utilities ===== */
.desktop-utilities,
.mobile-utilities {
    gap: 12px;
}

/* ===== Mobile adjustments ===== */
@media (max-width: 900px) {
    .mobile-utilities .language-switcher {
        width: 100%;
    }

    .mobile-utilities .language-toggle-form,
    .mobile-utilities .language-dropdown,
    .mobile-utilities .language-select {
        width: 100%;
    }

    .mobile-utilities .language-select {
        min-height: 46px;
        border-radius: 16px;
        padding-left: 14px;
        padding-right: 40px;
        font-size: 0.95rem;
        justify-content: flex-start;
    }

    .mobile-utilities .language-dropdown::after {
        right: 16px;
    }
}