/* ====== Design Tokens (Blue Palette) ====== */
:root {
    --bg: #081327; /* πολύ σκούρο μπλε για υψηλή αντίθεση */
    --bg-2: #0d1c3b; /* δευτερεύον φόντο */
    --panel: #0e2350; /* κάρτες/πάνελ */
    --panel-2: #12306e;
    --line: #1c3d8c; /* αχνό περίγραμμα */
    --text: #ffffff; /* κύριο κείμενο */
    --muted: #cde2ff; /* δευτερεύον κείμενο */
    --accent: #58c7ff; /* κυανό για CTA */
    --accent-2: #8be1ff; /* ανοιχτό κυανό */
    --accent-dark: #0ea5e9; /* hover */
    --danger: #ff6b6b; /* προειδοποίηση */
    --focus: #fcd34d; /* προσβασιμότητα */
    --radius: 18px;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    --maxw: 1200px;
    --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans',
        Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
}

/* ====== Base ====== */
* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: radial-gradient(
            1200px 600px at 80% -10%,
            rgba(30, 144, 255, 0.18),
            transparent 60%
        ),
        radial-gradient(
            1000px 500px at -10% 10%,
            rgba(0, 146, 255, 0.15),
            transparent 60%
        ),
        linear-gradient(180deg, #081327 0%, #0b1831 35%, #0a1a3a 100%);
    line-height: 1.6;
    font-size: 18px; /* μεγάλα γράμματα */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--accent-2);
    text-decoration: none;
}
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px dashed var(--focus);
    outline-offset: 2px;
}
.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: 24px;
}
.btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: 0.2s transform ease, 0.2s background ease;
    box-shadow: 0 8px 22px rgba(24, 144, 255, 0.22);
}
.btn-primary {
    background: var(--accent);
    color: #012033;
}
.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: #e6f3ff;
    border: 1px solid var(--line);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(21, 94, 239, 0.15);
    color: #e8f3ff;
}
.tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 122, 255, 0.15);
    border: 1px solid var(--line);
    color: #cfe6ff;
    font-size: 14px;
}
.small {
    font-size: 16px;
}
.muted {
    color: var(--muted);
}
.card {
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}
.section {
    padding: 38px 0;
}
.section-title {
    font-size: 28px;
    margin: 0 0 14px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 980px) {
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Фон тянется на всю ширину, контент ограничен --maxw */
.hero-fw {
    width: 100%;
    background: linear-gradient(180deg, #0e2350 0%, #102b66 100%);
    padding: 56px 0;
    border-bottom: 1px solid var(--line);
}
.hero-wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr; /* текст слева, форма справа */
    gap: 32px;
    align-items: stretch;
}
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.hero-left h2 {
    font-size: 38px;
    line-height: 1.25;
    margin: 0;
}
.hero-left p {
    margin: 0;
}
.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.kpi {
    background: rgba(88, 199, 255, 0.12);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}
.kpi strong {
    display: block;
    font-size: 28px;
}

/* Кнопки — больше места и перенос, чтобы не наезжали */
.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.cta .btn {
    min-height: 48px;
}
@media (max-width: 820px) {
    .cta {
        flex-direction: column;
    }
    .cta .btn {
        width: 100%;
    } /* на узких экранах кнопки — в столбик */
}

/* Форма справа (в Hero) */
.hero-form {
    background: linear-gradient(180deg, #0e2558 0%, #183b8f 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.hero-form-title {
    margin: 0 0 8px;
    font-size: 22px;
}
.hero-form form {
    display: grid;
    gap: 12px;
}
.hero-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-form label {
    font-weight: 800;
}
.hero-form input {
    background: #0a1f49;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #eaf4ff;
    padding: 12px 14px;
    font-size: 18px;
    width: 100%;
}
.hero-form input::placeholder {
    color: #a9c8f6;
}
.hero-form .agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.hero-form .btn {
    width: 100%;
}

@media (max-width: 1080px) {
    .hero-wrap {
        grid-template-columns: 1fr;
    } /* форма под текстом */
}

/* ====== Tables / Forms ====== */
table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
}
th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
th {
    background: rgba(34, 122, 255, 0.16);
}
form {
    display: grid;
    gap: 12px;
}
label {
    font-weight: 800;
}
input {
    background: #0a1f49;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #eaf4ff;
    padding: 12px 14px;
    font-size: 18px;
}
input::placeholder {
    color: #a9c8f6;
}
.help {
    color: #cfecff;
}
.error {
    color: var(--danger);
    font-weight: 800;
}

/* ====== Footer ====== */
footer {
    margin-top: 34px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: #071226;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
}
@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
/* Сетка контактов: карта слева, форма справа */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
}
@media (max-width: 980px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Карта вписывается в «маленькое окошко» */
.map-card {
    padding: 18px;
}
.map-embed {
    width: 100%;
    aspect-ratio: 16 / 10; /* невысокое окно под карточку */
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) inset;
    margin-bottom: 12px;
}
.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: saturate(110%) contrast(105%) brightness(98%);
}

/* Список контактов под картой */
.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

/* Форма справа */
.contact-form {
    display: grid;
    gap: 12px;
}
.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.contact-form input {
    background: #0a1f49;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #eaf4ff;
    padding: 12px 14px;
    font-size: 18px;
    width: 100%;
}
.contact-form input::placeholder {
    color: #a9c8f6;
}
.contact-form .btn {
    width: 100%;
}

/* Доступность: скрытый заголовок для карты */
.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;
}
.breadcrumbs {
    display: none !important;
}
/* ===== header-shared.css — единый хедер как на главной (подключать ПОСЛЕДНИМ) ===== */

/* 0) Базовые токены, если на странице их нет */
:root {
    --line: #1c3d8c;
    --text: #ffffff;
    --accent: #58c7ff;
    --accent-2: #8be1ff;
}

/* 1) Единые стили хедера */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 19, 39, 0.72);
    backdrop-filter: saturate(135%) blur(10px);
    border-bottom: 1px solid var(--line);
}

/* разметка.topbar должна быть одинаковой во всех хедерах */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}
.brand .brand-title,
.brand h1 {
    font-size: 20px;
    margin: 0;
    line-height: 1;
}

/* 2) Логотип — как на главной (градиент 44×44).
      Это ПЕРЕБИВАЕТ любые .logo{background:url(...)} на дочерних страницах. */
.logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: 0 0 44px;
    background: conic-gradient(
        from 180deg at 50% 50%,
        #58c7ff 0deg,
        #1d86ff 140deg,
        #8be1ff 240deg,
        #58c7ff 360deg
    );
    box-shadow: 0 0 0 3px #081327, 0 10px 30px rgba(88, 199, 255, 0.45);
}

/* 3) Меню — единые отступы/высота */
nav ul {
    display: flex;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul li {
    display: flex;
    align-items: center;
    height: 40px;
    margin: 0;
    padding: 0;
}
nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
nav a:hover,
nav a[aria-current='page'] {
    background: rgba(34, 122, 255, 0.18);
    color: #eaf4ff;
    /* Обеспечиваем стабильность при активном состоянии */
    transform: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* 4) Моб-меню через чекбокс-«бургер».
   ВАЖНО: порядок в HTML:  input#menuToggle + label.menu-btn + nav */
.menu-btn {
    display: none;
}
@media (max-width: 900px) {
    nav ul {
        display: none;
    }
    .menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #0b1e46;
        border: 1px solid var(--line);
        color: #eaf4ff;
        padding: 10px 14px;
        border-radius: 12px;
        cursor: pointer;
    }
    #menuToggle:checked + .menu-btn + nav ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        transform: translateY(100%);
        background: #0a1b3f;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 12px;
        margin-top: 10px;
    }
}

/* 5) Нормализация хедера — выравниваем типографику и убираем «плавающие» маргины */
header :where(h1, h2, p) {
    margin: 0;
}
header .container a,
header .container p,
header .container h1 {
    color: var(--text);
}

/* 6) Убираем «синий блок» там, где не нужен:
   на функциональных страницах (terms/login/policy) скрываем .hero-fw, если он присутствует */
body.terms .hero-fw,
body.login .hero-fw,
body.policy .hero-fw {
    display: none !important;
}

/* 7) Отступ контента под шапку на узких страницах с фикс-хедером */
body.terms main,
body.login main,
body.policy main {
    padding-top: 64px;
}

/* 8) Скрываем breadcrumbs на всех страницах */
.breadcrumbs {
    display: none !important;
}

/* 9) Страховка против дубликатов: если где-то объявлена .logo с url — перебиваем */
.logo[style*='background'],
.brand .logo {
    background: conic-gradient(
        from 180deg at 50% 50%,
        #58c7ff 0deg,
        #1d86ff 140deg,
        #8be1ff 240deg,
        #58c7ff 360deg
    ) !important;
}
