/**
 * Единая шапка и подвал сайта: одни размеры, отступы и поведение на всех страницах.
 * Переменные ниже — канон для шапки; страницы могут переопределять :root для контента.
 */

:root {
    --b24-accent: #e2e8f0;
    --b24-accent-hover: #f8fafc;
    --b24-accent-muted: #a1a1aa;
    --b24-accent-rgb: 226, 232, 240;
    --b24-ink: #09090b;
    --site-header-max: 1480px;
    --site-header-gutter: 40px;
    --site-header-height: 64px;
}

html[data-color-scheme="light"] {
    --b24-accent: #2563eb;
    --b24-accent-hover: #1d4ed8;
    --b24-accent-muted: #64748b;
    --b24-accent-rgb: 37, 99, 235;
    --b24-ink: #ffffff;
}

.b24-page {
    padding-top: var(--site-header-height);
}

.b24-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(3, 3, 3, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    /* Как на index.html: не тянуть типографику от body страницы (Segoe, line-height 1.6 и т.д.) */
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* На главной глобально border-box из inline *; на остальных — нет → CTA в шапке раздувается (content-box).
   Не трогаем *::before/*::after — в части браузеров ломает сложные контролы внутри шапки. */
.b24-header * {
    box-sizing: border-box;
}

.b24-header button,
.b24-header input,
.b24-header select {
    font-family: inherit;
}

.b24-header .container.b24-header-inner {
    width: 100%;
    max-width: var(--site-header-max, 1480px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--site-header-gutter, 40px);
    padding-right: var(--site-header-gutter, 40px);
    padding-top: 0;
    padding-bottom: 0;
}

.b24-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--site-header-height);
    min-height: var(--site-header-height);
    max-height: var(--site-header-height);
    padding: 0;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

.b24-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.b24-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(145deg, #f8fafc 0%, var(--b24-accent-muted) 55%, #71717a 100%);
    box-shadow: 0 2px 14px rgba(var(--b24-accent-rgb), 0.18);
}

/* Временно скрыт пункт «Диагностика» в верхнем меню */
.b24-header .b24-topnav > a.nav-audit {
    display: none !important;
}

.b24-header .b24-topnav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 6px 18px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 2px 0;
}

/* Прямые пункты верхнего меню (исключая CTA с отдельными правилами ниже). */
.b24-header .b24-topnav > a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.25;
}

.b24-header .b24-topnav > a:hover {
    color: #fff;
    border-bottom-color: var(--b24-accent);
}

.b24-header .b24-topnav > a[aria-current="page"] {
    color: #fff;
    border-bottom-color: var(--b24-accent);
}

/*
 * CTA: базово — одна компактная пилюля (шапка на всех страницах).
 * Крупный акцент — только с .airag-cta-b24--lg (герой главной, шаги внедрения).
 */
.airag-cta-b24 {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
    padding: 7px 14px;
    min-height: 32px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(145deg, var(--b24-accent-hover) 0%, var(--b24-accent) 42%, var(--b24-accent-muted) 100%);
    color: var(--b24-ink, #09090b);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 18px rgba(var(--b24-accent-rgb), 0.22),
        0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.airag-cta-b24:hover {
    background: linear-gradient(145deg, #fff 0%, var(--b24-accent-hover) 35%, var(--b24-accent) 100%);
    color: var(--b24-ink, #09090b);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 8px 26px rgba(var(--b24-accent-rgb), 0.32),
        0 3px 12px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.airag-cta-b24:active {
    transform: translateY(0);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 3px 14px rgba(var(--b24-accent-rgb), 0.2),
        0 2px 6px rgba(0, 0, 0, 0.18);
}

.airag-cta-b24:focus-visible {
    outline: 2px solid rgba(var(--b24-accent-rgb), 0.45);
    outline-offset: 3px;
}

.airag-cta-b24--lg {
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 12px 24px;
    min-height: 44px;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.2) inset,
        0 8px 28px rgba(var(--b24-accent-rgb), 0.28),
        0 2px 12px rgba(0, 0, 0, 0.25);
}

.airag-cta-b24--lg:hover {
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 12px 36px rgba(var(--b24-accent-rgb), 0.38),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.airag-cta-b24--lg:active {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 4px 18px rgba(var(--b24-accent-rgb), 0.22),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

/* В шапке: перебить .b24-topnav > a (padding, цвет, без нижней границы) */
.b24-header .b24-topnav > a.airag-cta-b24,
.b24-header .b24-topnav > a.airag-cta-b24--nav {
    color: var(--b24-ink, #09090b);
    border-bottom: none;
    padding: 7px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    min-height: 32px;
}

.b24-header .b24-topnav > a.airag-cta-b24:hover,
.b24-header .b24-topnav > a.airag-cta-b24--nav:hover {
    color: var(--b24-ink, #09090b);
    border-bottom: none;
}

html[data-color-scheme="light"] .airag-cta-b24 {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: #fff;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.25) inset,
        0 5px 18px rgba(37, 99, 235, 0.32);
}

html[data-color-scheme="light"] .airag-cta-b24:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 45%, #2563eb 100%);
    color: #fff;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 8px 24px rgba(37, 99, 235, 0.4);
}

html[data-color-scheme="light"] .airag-cta-b24--lg {
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.25) inset,
        0 6px 22px rgba(37, 99, 235, 0.35);
}

html[data-color-scheme="light"] .airag-cta-b24--lg:hover {
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.3) inset,
        0 10px 28px rgba(37, 99, 235, 0.42);
}

html[data-color-scheme="light"] .b24-header .b24-topnav > a.airag-cta-b24,
html[data-color-scheme="light"] .b24-header .b24-topnav > a.airag-cta-b24--nav {
    color: #fff;
}

html[data-color-scheme="light"] .b24-header .b24-topnav > a.airag-cta-b24:hover,
html[data-color-scheme="light"] .b24-header .b24-topnav > a.airag-cta-b24--nav:hover {
    color: #fff;
    border-bottom: none;
}

.b24-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Переключатель темы временно скрыт */
.b24-theme-switch {
    display: none !important;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    gap: 2px;
    flex-shrink: 0;
}

.b24-theme-switch-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 1.125rem;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.b24-theme-switch-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.b24-theme-switch-btn.is-active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.b24-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    white-space: nowrap;
}

.b24-btn--primary {
    background: linear-gradient(145deg, var(--b24-accent-hover) 0%, var(--b24-accent) 45%, var(--b24-accent-muted) 100%);
    color: var(--b24-ink);
    border-color: transparent;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.15) inset, 0 6px 20px rgba(var(--b24-accent-rgb), 0.12);
}

.b24-btn--primary:hover {
    background: linear-gradient(145deg, #fff 0%, var(--b24-accent-hover) 50%, var(--b24-accent) 100%);
    border-color: transparent;
    transform: translateY(-1px);
}

.b24-btn--outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.22);
}

.b24-btn--outline:hover {
    border-color: rgba(var(--b24-accent-rgb), 0.45);
    color: #fff;
}

/* Светлая тема — только элементы шапки */
html[data-color-scheme="light"] .b24-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

html[data-color-scheme="light"] .b24-theme-switch {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.1);
}

html[data-color-scheme="light"] .b24-theme-switch-btn {
    color: #64748b;
}

html[data-color-scheme="light"] .b24-theme-switch-btn:hover {
    color: #0f172a;
}

html[data-color-scheme="light"] .b24-theme-switch-btn.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

html[data-color-scheme="light"] .b24-logo {
    color: #0f172a;
}

html[data-color-scheme="light"] .b24-logo-mark {
    background: linear-gradient(145deg, #fff 0%, #e2e8f0 50%, #94a3b8 100%);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}

html[data-color-scheme="light"] .b24-header .b24-topnav > a {
    color: #64748b;
}

html[data-color-scheme="light"] .b24-header .b24-topnav > a:hover {
    color: #0f172a;
}

html[data-color-scheme="light"] .b24-header .b24-topnav > a[aria-current="page"] {
    color: #0f172a;
    border-bottom-color: var(--b24-accent);
}

html[data-color-scheme="light"] .b24-btn--primary {
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 2px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 22px rgba(37, 99, 235, 0.35);
}

html[data-color-scheme="light"] .b24-btn--primary:hover {
    background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 45%, #2563eb 100%);
    color: #fff;
}

html[data-color-scheme="light"] .b24-btn--outline {
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.35);
}

html[data-color-scheme="light"] .b24-btn--outline:hover {
    border-color: rgba(37, 99, 235, 0.55);
    color: #1e3a8a;
}

@media (max-width: 900px) {
    .b24-header .b24-topnav {
        justify-content: flex-start;
        gap: 12px 14px;
    }

    .b24-logo {
        font-size: 1.2rem;
    }

    .b24-logo-mark {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 560px) {
    :root {
        --site-header-gutter: 24px;
    }

    .b24-header .b24-topnav {
        gap: 10px 12px;
    }

    .b24-header .b24-topnav > a {
        font-size: 0.875rem;
    }

    .b24-header .b24-topnav > a.airag-cta-b24,
    .b24-header .b24-topnav > a.airag-cta-b24--nav {
        font-size: 0.75rem;
        padding: 6px 11px;
        min-height: 30px;
    }
}

/* ─── Подвал (сетка как на solutions / tariffs / examples) ───────────── */
.b24-footer {
    background: #020202;
    color: #94a3b8;
    padding: 56px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-color-scheme="light"] .b24-footer {
    background: #e8efff;
    color: #475569;
    border-top-color: #cbd5e1;
}

.b24-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 36px 28px;
    margin-bottom: 40px;
}

.b24-footer-brand {
    max-width: 300px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.b24-footer-brand strong {
    display: block;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

html[data-color-scheme="light"] .b24-footer-brand strong {
    color: #0f172a;
}

.b24-footer-col h4 {
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
}

html[data-color-scheme="light"] .b24-footer-col h4 {
    color: #0f172a;
}

.b24-footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 3px 0;
    transition: color 0.15s;
}

.b24-footer-col a:hover {
    color: var(--b24-accent, #e2e8f0);
}

html[data-color-scheme="light"] .b24-footer-col a {
    color: #64748b;
}

html[data-color-scheme="light"] .b24-footer-col a:hover {
    color: var(--b24-accent, #2563eb);
}

.b24-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 22px;
    text-align: center;
    font-size: 0.85rem;
}

html[data-color-scheme="light"] .b24-footer-bottom {
    border-top-color: #e2e8f0;
    color: #94a3b8;
}

@media (max-width: 900px) {
    .b24-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .b24-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Строка юридических реквизитов под копирайтом подвала */
.b24-footer .b24-footer-legal {
    border-top: none;
    padding-top: 10px;
    margin: 0;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

html[data-color-scheme="light"] .b24-footer .b24-footer-legal {
    color: #94a3b8;
}
