/* =========================================================
   LEXENIA AI — основной стиль
   Палитра, типографика, базовые компоненты, адаптивность
   ========================================================= */

:root {
    --bg-color: #EAEAEA;
    --bg-warm: #F5F2EC;
    --card-bg: #FFFFFF;
    --accent: #CCFF00;
    --accent-hover: #B8E600;
    --accent-soft: #EEFFB3;
    --brand: #7A2E18;
    --brand-soft: #F0E5E1;
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --text-mild: #888888;
    --border-color: #D6D6D6;
    --border-soft: #ECECEC;
    --border-radius: 14px;
    --sidebar-width: 280px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { text-transform: none; letter-spacing: normal; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    font-weight: 400;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1rem 1.8rem;
    background-color: var(--accent); color: var(--text-main);
    font-weight: 700; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-align: center; font-size: 1rem; font-family: inherit;
    line-height: 1.2;
}
.btn:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); opacity: 1; }
.btn:active { transform: translateY(0); }
.btn-secondary { background-color: var(--card-bg); border-color: var(--border-color); }
.btn-secondary:hover { background-color: #fff; border-color: var(--text-main); }
.btn-brand { background-color: var(--brand); color: #fff; }
.btn-brand:hover { background-color: #5e1f10; }
.btn-ghost { background: transparent; border: 1px solid var(--border-color); }

/* ===== Карточки, теги ===== */
.card {
    background-color: var(--card-bg); border-radius: var(--border-radius);
    padding: 1.75rem; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card); transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    height: 100%;
    display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; line-height: 1.3; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; flex: 1; }

.tag {
    display: inline-block; background-color: #f0f0f0; color: var(--text-main);
    padding: 0.35rem 0.85rem; border-radius: 6px; font-size: 0.72rem;
    font-weight: 700; margin-bottom: 0.9rem; letter-spacing: 0.02em;
}
.tag-accent { background-color: var(--accent); }
.tag-brand { background-color: var(--brand); color: #fff; }
.tag-outline { background: transparent; border: 1px solid var(--border-color); }

/* ===== Грид ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* =========================================================
   Лэйаут приложения: сайдбар + слайдовые секции (главная)
   ========================================================= */

.app-container { display: flex; min-height: 100vh; width: 100vw; }
.app-slider { overflow: hidden; height: 100vh; }
body:has(.app-slider) { overflow: hidden; height: 100vh; }

.sidebar {
    width: var(--sidebar-width); height: 100vh; background-color: var(--bg-color);
    padding: 2.25rem 1.75rem 1.75rem; display: flex; flex-direction: column; flex-shrink: 0;
    border-right: 1px solid var(--border-color); z-index: 100;
    position: sticky; top: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.logo { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.15; flex-shrink: 0; }
.logo a { display: block; }
.logo span { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; font-weight: 500; }

.nav-links { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; flex-shrink: 0; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); position: relative; cursor: pointer; padding: 0.25rem 0; display: block; }
.nav-links a:hover { color: var(--text-main); opacity: 1; }
.nav-links a.active { color: var(--text-main); font-weight: 700; }
.nav-links a.active::before {
    content: ''; position: absolute; left: -1.1rem; top: 50%; transform: translateY(-50%);
    width: 8px; height: 8px; background-color: var(--accent); border-radius: 50%;
}

.sidebar-foot { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border-soft); flex-shrink: 0; }
.sidebar-foot .telega { display: block; margin-top: 0.9rem; font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.sidebar-foot .telega a { color: var(--text-muted); }
.sidebar-foot .telega a:hover { color: var(--text-main); }

/* ===== Основная зона ===== */
.main-wrapper { flex: 1; min-height: 100vh; position: relative; }
.app-slider .main-wrapper { height: 100vh; overflow: hidden; }
.sections-container {
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
}
.app-slider .sections-container { height: 100%; }

section.slide {
    height: 100vh; width: 100%; padding: 4rem;
    display: flex; flex-direction: column; justify-content: center;
    max-width: 1180px; margin: 0 auto;
    overflow: hidden;
}
section.slide.slide-top { justify-content: flex-start; padding-top: 3.5rem; }

/* ===== Типографика секций ===== */
h1 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); font-weight: 700; line-height: 1.1; margin-bottom: 1.3rem; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 700; margin-bottom: 1.4rem; line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
h4 { font-size: 1.05rem; font-weight: 700; }
p.lead, .hero-text { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-muted); max-width: 720px; margin-bottom: 1.75rem; line-height: 1.6; }
.section-label { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--brand); text-transform: uppercase !important; letter-spacing: 0.08em !important; margin-bottom: 0.9rem; }

/* ===== BLUF (выжимка для AI-поисковиков) ===== */
.hero-bluf {
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    margin: 0 0 1.75rem;
    max-width: 760px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-main);
}
.hero-bluf strong { display: block; margin-bottom: 0.4rem; font-weight: 700; }

/* ===== Hero-quick (плашки услуг под героем) ===== */
.hero-quick-label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.7rem; }
.hero-quick-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.6rem; }
.chip { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; margin-bottom: 0; }
.chip[open] { border-color: var(--accent); }
.chip > summary { padding: 0.85rem 1.05rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.7rem; }
.chip > summary::after { content: '+'; font-size: 1.25rem; color: var(--text-muted); flex-shrink: 0; }
.chip[open] > summary::after { content: '−'; }
.chip-summary-text { display: flex; flex-direction: column; gap: 0.15rem; }
.chip-title { font-weight: 700; font-size: 0.95rem; }
.chip-price { font-size: 0.8rem; color: var(--text-muted); }
.chip-body { padding: 0 1.05rem 1rem; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.chip-body p { margin-bottom: 0.6rem; }
.chip-body ul { margin: 0 0 0.6rem 1.1rem; }
.chip-body li { margin-bottom: 0.35rem; }
.chip-cta { display: inline-block; margin-top: 0.4rem; color: var(--brand); font-weight: 600; text-decoration: underline; font-size: 0.88rem; }

/* ===== Lead-compact ===== */
.lead-compact { margin-bottom: 1.5rem; }

/* ===== Карточки сегментов («Кому подходит») ===== */
.segments-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.segment-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.4rem;
    display: flex; flex-direction: column;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    color: var(--text-main);
}
.segment-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-hover); opacity: 1; }
.segment-card h3 { font-size: 1.05rem; margin: 0.5rem 0 0.5rem; line-height: 1.3; }
.segment-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
.segment-tag {
    display: inline-block; align-self: flex-start;
    padding: 0.25rem 0.7rem; border-radius: 6px; font-size: 0.7rem;
    font-weight: 700; letter-spacing: 0.02em; background: #f0f0f0; color: var(--text-main);
}
.segment-tag.tag-main { background: var(--accent); }
.segment-tag.tag-brand { background: var(--brand); color: #fff; }
.segment-tag.tag-neutral { background: var(--brand-soft); color: var(--brand); }
.segment-tag.tag-outline { background: transparent; border: 1px solid var(--border-color); }

/* ===== Список статей ===== */
.articles-list { display: flex; flex-direction: column; gap: 0.7rem; }
.article-row {
    display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 1rem 1.2rem; transition: border-color 0.2s, transform 0.2s;
}
.article-row:hover { border-color: var(--accent); transform: translateX(3px); opacity: 1; }
.article-tag {
    background: var(--brand-soft); color: var(--brand);
    padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.72rem; font-weight: 700;
    white-space: nowrap;
}
.article-tag.tag-brand-style { background: var(--brand); color: #fff; }
.article-content h3 { font-size: 1rem; margin-bottom: 0.25rem; line-height: 1.3; }
.article-content p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.45; }
.article-arrow { font-size: 1.2rem; color: var(--text-muted); }

/* ===== Список услуг (прайс) ===== */
.services-list { display: flex; flex-direction: column; gap: 0.5rem; }
.services-group-label {
    font-size: 0.75rem; font-weight: 700; color: var(--brand);
    text-transform: uppercase !important; letter-spacing: 0.08em !important;
    margin: 1.2rem 0 0.4rem;
}
.services-group-label:first-child { margin-top: 0; }
.service-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; margin: 0; }
.service-item[open] { border-color: var(--accent); }
.service-item > summary {
    padding: 1rem 1.2rem; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.service-item > summary::-webkit-details-marker { display: none; }
.service-item > summary::after { content: '+'; font-size: 1.3rem; color: var(--text-muted); flex-shrink: 0; }
.service-item[open] > summary::after { content: '−'; }
.service-name { font-weight: 700; font-size: 0.98rem; }
.service-price { font-weight: 700; color: var(--brand); font-size: 0.92rem; white-space: nowrap; }
.service-body { padding: 0 1.2rem 1.2rem; color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; }
.service-body p { margin-bottom: 0.6rem; }
.service-body ul { margin: 0 0 0.7rem 1.2rem; }
.service-body li { margin-bottom: 0.35rem; }
.service-meta { font-size: 0.85rem; color: var(--text-mild); }
.service-note { background: var(--accent-soft); padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.85rem; color: var(--text-main); margin-bottom: 0.6rem; }
.service-cta { display: inline-block; margin-top: 0.5rem; color: var(--brand); font-weight: 600; text-decoration: underline; font-size: 0.9rem; }
@media (max-width: 600px) {
    .service-item > summary { flex-wrap: wrap; gap: 0.4rem; }
    .article-row { grid-template-columns: 1fr; }
    .article-arrow { display: none; }
}

/* =========================================================
   Навигатор по рискам (секция pains)
   ========================================================= */
.risk-nav {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.risk-nav-head {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.3fr;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    background: var(--bg-warm);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 1px solid var(--border-soft);
}
.risk-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.3fr;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--border-soft);
    align-items: flex-start;
}
.risk-row:last-child { border-bottom: none; }
.risk-cell { font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); }
.risk-cell strong { color: var(--text-main); font-weight: 600; }
.risk-cell a {
    display: block;
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}
.risk-cell a:hover { color: var(--text-main); }
.risk-followup {
    margin: 1.5rem 0 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
}
@media (max-width: 800px) {
    .risk-nav-head { display: none; }
    .risk-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 1.2rem 1rem;
    }
    .risk-cell::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        color: var(--brand);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 0.25rem;
    }
}

/* =========================================================
   Карточка «Экспресс-диагностика» (Low Entry Point)
   ========================================================= */
.diagnostic-card {
    background: linear-gradient(135deg, var(--bg-warm) 0%, var(--brand-soft) 100%);
    border: 1px solid var(--brand);
    border-radius: var(--border-radius);
    padding: 1.75rem 2rem;
}
.diagnostic-tag {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}
.diagnostic-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; line-height: 1.3; }
.diagnostic-card > p { color: #333; font-size: 0.95rem; line-height: 1.55; margin-bottom: 1rem; }
.diagnostic-meta {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
}
.diagnostic-price { font-size: 1.6rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.diagnostic-note { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

/* =========================================================
   Блок «Комплексные решения» (Bundles)
   ========================================================= */
.bundles-block { margin-bottom: 2.5rem; }
.bundles-head { margin-bottom: 1.25rem; }
.bundles-head h3 { font-size: 1.3rem; margin-bottom: 0.5rem; line-height: 1.3; }
.bundles-head p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; max-width: 760px; }

.bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.1rem;
}
.bundle-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.bundle-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.bundle-tag {
    display: inline-block; align-self: flex-start;
    background: var(--accent); color: var(--text-main);
    padding: 0.3rem 0.75rem; border-radius: 6px;
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.04em; margin-bottom: 0.8rem;
    text-transform: uppercase;
}
.bundle-card h4 { font-size: 1.08rem; margin-bottom: 0.7rem; line-height: 1.3; }
.bundle-for, .bundle-includes { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.55rem; }
.bundle-for strong, .bundle-includes strong { color: var(--text-main); }
.bundle-card ul { margin: 0 0 0.9rem 1.1rem; }
.bundle-card li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.3rem; }
.bundle-price {
    background: var(--accent-soft);
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 0.9rem;
    margin-top: auto;
}
.bundle-price span { font-weight: 500; color: var(--text-muted); font-size: 0.85rem; }
.bundle-cta { color: var(--brand); font-weight: 600; text-decoration: underline; font-size: 0.93rem; align-self: flex-start; }
.bundle-cta:hover { color: var(--text-main); }

/* ===== Скролл-контент внутри секций ===== */
.scroll-content-inner {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 0.5rem; padding-bottom: 1rem;
    scrollbar-width: thin; scrollbar-color: var(--border-color) transparent;
    overscroll-behavior: contain;
}
.scroll-content-inner::-webkit-scrollbar { width: 6px; }
.scroll-content-inner::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
.scroll-content-inner::-webkit-scrollbar-track { background: transparent; }

/* ===== Аккордеон ===== */
details { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); margin-bottom: 0.75rem; overflow: hidden; }
details[open] { border-color: var(--accent); }
summary { padding: 1.25rem 1.4rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--text-muted); flex-shrink: 0; transition: transform 0.2s; }
details[open] summary::after { content: '−'; }
.details-content { padding: 0 1.4rem 1.4rem; color: var(--text-muted); line-height: 1.65; }
.details-content p { margin-bottom: 0.75rem; }
.details-content p:last-child { margin-bottom: 0; }
.details-content a { color: var(--brand); font-weight: 600; text-decoration: underline; }

/* ===== Форма обратной связи ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.form-box { background: var(--card-bg); padding: 2rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.form-row { margin-bottom: 0.9rem; }
.form-box label.field-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-muted); }
input, select, textarea {
    width: 100%; padding: 0.95rem 1rem; border: 1px solid var(--border-color); border-radius: 10px;
    font-family: inherit; font-size: 0.98rem; background: var(--bg-color); color: var(--text-main);
    transition: border-color 0.2s, background 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text-main); background: #fff; }
textarea { resize: vertical; min-height: 110px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); margin: 0.6rem 0 1.1rem; line-height: 1.4; }
.checkbox-row input { width: auto; margin-top: 0.2rem; }
.checkbox-row a { color: var(--brand); text-decoration: underline; }
.form-error { color: #b00020; font-size: 0.85rem; margin-top: -0.5rem; margin-bottom: 0.5rem; display: none; }
.form-success { background: var(--accent-soft); border: 1px solid var(--accent); padding: 1rem 1.2rem; border-radius: 10px; font-weight: 600; display: none; margin-top: 0.6rem; }

/* =========================================================
   Стандартные внутренние страницы (статьи, политики, услуги)
   ========================================================= */
.page { padding: 3rem 1.5rem 5rem; line-height: 1.65; }
.page-inner { max-width: 980px; margin: 0 auto; }
.page-wide { max-width: 1180px; margin: 0 auto; }
.page-narrow { max-width: 820px; margin: 0 auto; background: var(--card-bg); padding: 3.5rem 3rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); }
.back-link { display: inline-flex; align-items: center; margin-bottom: 1.5rem; font-weight: 600; color: var(--text-muted); }
.back-link::before { content: '←'; margin-right: 0.4rem; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.2rem; }
.page h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-top: 2.2rem; margin-bottom: 1rem; }
.page h3 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: 0.6rem; }
.page p { margin-bottom: 1.1rem; color: #333; font-size: 1.02rem; }
.page ul, .page ol { margin: 0 0 1.2rem 1.3rem; }
.page li { margin-bottom: 0.55rem; color: #333; font-size: 1.02rem; }
.page strong { font-weight: 700; }

/* Шапка для обычных страниц (без сайдбара) */
.topbar {
    background: var(--bg-color); border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 1rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar .logo { font-size: 1.15rem; margin-bottom: 0; }
.topbar nav { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.topbar nav a { font-size: 0.93rem; font-weight: 500; color: var(--text-muted); }
.topbar nav a:hover, .topbar nav a.active { color: var(--text-main); }
.topbar .btn { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text-main); margin: 4px 0; transition: 0.3s; }

/* Подвал */
.footer {
    background: #1A1A1A; color: #C9C9C9; padding: 3rem 1.5rem 2rem; margin-top: 4rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.9rem; }
.footer a { color: #C9C9C9; font-size: 0.9rem; display: block; padding: 0.2rem 0; }
.footer a:hover { color: var(--accent); }
.footer-sub { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #333; font-size: 0.82rem; color: #888; max-width: 1280px; margin-left: auto; margin-right: auto; }

/* =========================================================
   Воронка-предложение (multistep)
   ========================================================= */
.funnel-shell {
    max-width: 760px; margin: 3rem auto; background: var(--card-bg); border-radius: var(--border-radius);
    border: 1px solid var(--border-color); padding: 2.5rem; box-shadow: var(--shadow-card);
}
.funnel-progress { display: flex; gap: 0.4rem; margin-bottom: 1.6rem; }
.funnel-progress span { flex: 1; height: 6px; background: var(--border-soft); border-radius: 3px; transition: background 0.3s; }
.funnel-progress span.done { background: var(--accent); }
.funnel-step { display: none; }
.funnel-step.active { display: block; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin: 1.4rem 0 2rem; }
.option-grid .option {
    border: 1px solid var(--border-color); border-radius: 12px; padding: 1.1rem 1.2rem; cursor: pointer;
    background: var(--bg-warm); transition: 0.2s;
}
.option-grid .option:hover { border-color: var(--accent); transform: translateY(-2px); }
.option-grid .option.selected { border-color: var(--text-main); background: var(--accent-soft); }
.option-grid .option strong { display: block; margin-bottom: 0.3rem; }
.option-grid .option small { color: var(--text-muted); font-size: 0.82rem; line-height: 1.4; }
.funnel-controls { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1.4rem; }
.funnel-result { background: var(--bg-warm); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.25rem 1.4rem; margin: 1rem 0 1.5rem; }
.funnel-result h4 { margin-bottom: 0.5rem; }
.funnel-result .price { font-size: 1.4rem; font-weight: 700; margin: 0.4rem 0; }

/* =========================================================
   Прайс-таблица
   ========================================================= */
.price-table { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius); overflow: hidden; }
.price-row { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border-soft); align-items: center; }
.price-row.head { background: var(--bg-warm); font-weight: 700; font-size: 0.85rem; text-transform: uppercase !important; letter-spacing: 0.04em !important; color: var(--text-muted); }
.price-row:last-child { border-bottom: none; }
.price-row .name { font-weight: 600; }
.price-row .price { font-weight: 700; }

/* =========================================================
   Cookie-баннер
   ========================================================= */
.cookie-banner {
    position: fixed; left: 1.2rem; right: 1.2rem; bottom: 1.2rem; max-width: 460px;
    background: var(--text-main); color: #fff; padding: 1.2rem 1.4rem; border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25); z-index: 1000; display: none;
}
.cookie-banner p { font-size: 0.88rem; margin-bottom: 0.8rem; line-height: 1.45; }
.cookie-banner .cookie-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }

/* =========================================================
   Лид-магнит банер
   ========================================================= */
.lead-magnet {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
    border-radius: var(--border-radius); padding: 2rem; border: 1px solid var(--accent);
    display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center;
}
.lead-magnet h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.lead-magnet p { color: #333; font-size: 0.95rem; max-width: 480px; }

/* Воронка-визуал на главной */
.funnel-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: fstep; }
.funnel-steps.funnel-steps-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) {
    .funnel-steps.funnel-steps-5 { grid-template-columns: repeat(3, 1fr); }
}
.funnel-steps .fstep { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.25rem; position: relative; }
.funnel-steps .fstep::before {
    counter-increment: fstep; content: counter(fstep);
    position: absolute; top: -12px; left: 14px; background: var(--accent); color: var(--text-main);
    font-weight: 700; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
    border: 2px solid var(--bg-color);
}
.funnel-steps .fstep h4 { margin-top: 0.4rem; margin-bottom: 0.4rem; font-size: 1rem; }
.funnel-steps .fstep p { color: var(--text-muted); font-size: 0.86rem; }

/* Колонка-якорь */
.anchor { padding-top: 6rem; margin-top: -6rem; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1024px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .funnel-steps { grid-template-columns: 1fr 1fr; }
    .price-row { grid-template-columns: 1.5fr 1fr 1fr; }
    .price-row .col-srok { display: none; }
}

@media (max-width: 900px) {
    body { overflow: auto; height: auto; }
    /* На главной body заблокирован через body:has(.app-slider) (overflow:hidden; height:100vh).
       У этого селектора специфичность выше, поэтому на мобильных его нужно перебить
       таким же :has-селектором — иначе страница «залочена» в один экран и не скроллится. */
    body:has(.app-slider) { overflow: auto; height: auto; }
    .app-container, .app-slider { display: block; width: 100%; height: auto; overflow: visible; }
    .sidebar {
        width: 100%; height: auto; position: sticky; top: 0; flex-direction: row;
        align-items: center; justify-content: space-between; padding: 0.9rem 1.2rem;
        border-right: none; border-bottom: 1px solid var(--border-color);
        flex-wrap: wrap;
        overflow: visible;
    }
    .nav-links { display: none; width: 100%; padding: 1rem 0 0; }
    .nav-links.open { display: flex; gap: 0.6rem; }
    .nav-links a.active::before { display: none; }
    .sidebar.open .nav-links { display: flex; }
    .sidebar.open .sidebar-foot { display: block; width: 100%; margin-top: 1rem; padding-top: 1rem; }
    .logo { margin-bottom: 0; font-size: 1.05rem; }
    .logo span { display: none; }
    .sidebar-foot { display: none; }

    .burger { display: block; order: 2; }
    .burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .burger.active span:nth-child(2) { opacity: 0; }
    .burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .main-wrapper, .app-slider .main-wrapper { height: auto; overflow: visible; }
    .sections-container { transform: none !important; height: auto !important; }
    section.slide { height: auto; padding: 3rem 1.25rem; }
    h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }
    h2 { font-size: clamp(1.45rem, 5vw, 2rem); }

    .scroll-content-inner { max-height: none; overflow: visible; padding-right: 0; }

    .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .lead-magnet { grid-template-columns: 1fr; text-align: left; }

    .topbar nav { display: none; width: 100%; flex-direction: column; gap: 0.6rem; padding-top: 0.8rem; }
    .topbar nav.open { display: flex; }
    .topbar .topbar-inner { flex-wrap: wrap; }
    .topbar .burger { display: block; }
    .topbar .btn { width: 100%; }

    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .funnel-steps { grid-template-columns: 1fr; }
    .price-row { grid-template-columns: 1.5fr 1fr; gap: 0.6rem; font-size: 0.95rem; padding: 0.9rem 1rem; }
    .price-row .col-srok, .price-row .col-format { display: none; }
    .option-grid { grid-template-columns: 1fr; }

    .funnel-shell, .page-narrow { padding: 2rem 1.4rem; margin: 1.5rem 1rem; }
    .page { padding: 2rem 1rem 4rem; }
}

@media (max-width: 480px) {
    .btn { width: 100%; padding: 0.9rem 1.2rem; }
    .funnel-controls .btn { width: auto; flex: 1; }
    section.slide { padding: 2.5rem 1rem; }
    .card { padding: 1.4rem; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    .lead-magnet { padding: 1.4rem; }
    .funnel-shell { padding: 1.5rem 1.1rem; }
    .page-narrow { padding: 1.5rem 1.1rem; }
}

/* Утилиты */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.row-flex { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.hide-mobile { display: initial; }
@media (max-width: 900px) { .hide-mobile { display: none !important; } }
.show-mobile { display: none; }
@media (max-width: 900px) { .show-mobile { display: initial; } }
