﻿/* Selbiware — base, layout, header, footer, buttons */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--surface);
    min-height: 88vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    background: var(--surface-light);
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

    a:hover {
        color: var(--brand-blue);
    }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 0 0 var(--space-4);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 var(--space-4);
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-6);
}

/* ---------- Header ---------- */

.site-header {
    background: #FFFFFF;
    border-block-end: 1px solid rgba(10, 31, 68, 0.10);
    box-shadow: 0 1px 3px rgba(10, 31, 68, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding: 0;
    min-height: 80px;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: var(--space-8);
}

.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.site-header__logo-mark {
    height: 60px;
    width: auto;
    display: block;
}

.site-header__wordmark {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 0.04em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.site-header__wordmark-blue {
    color: #1E5FE0;
}

.site-header__wordmark-red {
    color: #E11D2E;
}

[dir="rtl"] .site-header__wordmark {
    letter-spacing: 0;
}

[dir="rtl"] .site-header__wordmark-blue {
    color: #29B2F2;
}

[dir="rtl"] .site-header__logo img {
    direction: ltr;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.site-header .site-nav a {
    color: #0A1F44;
    font-weight: 600;
}

    .site-header .site-nav a:hover {
        color: #1E5FE0;
    }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 26px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn--accent {
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-cyan) 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(30, 95, 224, 0.35);
}

    .btn--accent:hover {
        background: linear-gradient(90deg, var(--brand-blue-deep) 0%, var(--brand-blue) 100%);
        color: #FFFFFF;
        box-shadow: 0 6px 20px rgba(30, 95, 224, 0.45);
    }

.btn--admin {
    background: linear-gradient(90deg, #E11D2E 0%, #A5111E 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(225, 29, 46, 0.35);
}

    .btn--admin:hover {
        background: linear-gradient(90deg, #A5111E 0%, #E11D2E 100%);
        color: #FFFFFF;
        box-shadow: 0 6px 20px rgba(225, 29, 46, 0.45);
    }

/* ---------- Footer ---------- */

.site-footer {
    background: #050E24;
    color: #FFFFFF;
    padding: var(--space-8) 0;
    border-block-start: 2px solid #F5A623;
    margin: 0;
}

    .site-footer .container {
        text-align: center;
    }

    .site-footer p {
        color: #FFFFFF;
        margin: 0;
        font-weight: 500;
        opacity: 0.85;
        font-size: 0.9rem;
    }

    .site-footer a {
        color: var(--brand-cyan);
        opacity: 0.9;
    }

        .site-footer a:hover {
            opacity: 1;
        }

/* ---------- Language switcher ---------- */

.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0A1F44;
    background: transparent;
    border: 1px solid rgba(10, 31, 68, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .lang-switcher__btn:hover {
        border-color: #1E5FE0;
        color: #1E5FE0;
    }

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 140px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #FFFFFF;
    border: 1px solid rgba(10, 31, 68, 0.10);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(10, 31, 68, 0.12);
    z-index: 200;
}

    .lang-switcher__menu li {
        margin: 0;
    }

    .lang-switcher__menu a {
        display: block;
        padding: 8px 16px;
        color: #0A1F44;
        font-weight: 500;
        font-size: 0.9rem;
    }

        .lang-switcher__menu a:hover {
            background: #F5F7FA;
            color: #1E5FE0;
        }

/* ---------- Sections ---------- */

.section {
    padding-block: var(--space-16);
}

.section--alt {
    background: #FFFFFF;
}

.section h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--text-light);
    margin: 0 0 var(--space-4);
}

.section h2 {
    color: var(--text-light);
}

.section p {
    color: var(--text-muted-light);
}

/* ---------- Mobile navigation ---------- */

.site-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 150ms ease;
}

    .site-nav-toggle:hover {
        background: rgba(10, 31, 68, 0.06);
    }

    .site-nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #0A1F44;
        border-radius: 2px;
        transition: transform 200ms ease, opacity 200ms ease;
    }

    .site-nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .site-nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

.site-nav-mobile {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 16px 24px 24px;
    background: #FFFFFF;
    border-block-start: 1px solid rgba(10, 31, 68, 0.08);
    box-shadow: 0 8px 24px rgba(10, 31, 68, 0.08);
}

    .site-nav-mobile[hidden] {
        display: none;
    }

    .site-nav-mobile a {
        display: block;
        padding: 12px 14px;
        border-radius: 8px;
        color: #0A1F44;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        transition: background 150ms ease, color 150ms ease;
    }

        .site-nav-mobile a:hover {
            background: #F5F7FA;
            color: #1E5FE0;
        }

.site-nav-mobile__admin {
    background: linear-gradient(90deg, #E11D2E 0%, #A5111E 100%) !important;
    color: #FFFFFF !important;
    text-align: center;
    margin-block-start: 8px;
}

    .site-nav-mobile__admin:hover {
        background: linear-gradient(90deg, #A5111E 0%, #E11D2E 100%) !important;
        color: #FFFFFF !important;
    }

.site-nav-mobile__cta {
    text-align: center;
    margin-block-start: 8px;
}

.site-nav-mobile__langs {
    display: flex;
    gap: 8px;
    margin-block-start: 12px;
    padding-block-start: 12px;
    border-block-start: 1px solid rgba(10, 31, 68, 0.08);
}

    .site-nav-mobile__langs a {
        flex: 1;
        text-align: center;
        padding: 10px;
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        color: #5C6575;
        background: #F5F7FA;
    }

        .site-nav-mobile__langs a:hover {
            background: rgba(30, 95, 224, 0.08);
            color: #1E5FE0;
        }

body.mobile-nav-open {
    overflow: hidden;
}

/* ---------- Responsive breakpoint ---------- */

@media (max-width: 899px) {
    .site-header__inner {
        padding-inline: 16px;
        min-height: 68px;
    }

    .site-header__logo-mark {
        height: 44px;
    }

    .site-header__wordmark {
        font-size: 1.5rem;
    }

    .site-nav {
        display: none;
    }

    .site-nav-toggle {
        display: flex;
    }

    .site-nav-mobile:not([hidden]) {
        display: flex;
    }
}

@media (max-width: 480px) {
    .site-header__logo-mark {
        height: 38px;
    }

    .site-header__wordmark {
        font-size: 1.3rem;
    }
}
