/* ==========================================================================
   Автокультура — Apple-style: крупная типографика, нейтральная палитра,
   один акцентный синий, воздух. Контент капается на 1440px везде, кроме
   героя, футера и блоков с формами обратной связи — те на всю ширину экрана.
   ========================================================================== */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Helvetica Neue", Arial, "Segoe UI", sans-serif;

    --color-bg: #ffffff;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-border: #d2d2d7;
    --color-surface: #f5f5f7;
    --color-dark: #0b0b0d;
    --color-dark-surface: #17171a;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;

    --container-width: 1440px;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 16px;
}

h1 {
    font-size: clamp(2.4rem, 4.4vw, 3.8rem);
}

h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    color: var(--color-text-secondary);
    margin: 0 0 16px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.band-header {
    max-width: 640px;
    margin: 0 0 40px;
}

/* ---------- Region toggle (переключатель «Из Кореи / Из Китая») ---------- */
/* Живёт на светлых .section, поэтому неактивная кнопка — .btn--quiet
   (рамка var(--color-border)), а не .btn--outline (она рассчитана на тёмные
   hero-полосы, см. комментарий у .btn--quiet). */

.region-toggle {
    margin: 0 0 40px;
}

.region-toggle__group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.band-header--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.band-header p {
    font-size: 1.05rem;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

.main-nav > a {
    transition: color 0.15s ease;
}

.main-nav > a:hover {
    color: var(--color-text);
}

.dropdown {
    position: relative;
}

.dropdown__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    min-width: 160px;
}

.dropdown:hover .dropdown__menu,
.dropdown:focus-within .dropdown__menu,
.dropdown.is-open .dropdown__menu {
    display: block;
}

.dropdown__menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.dropdown__menu a:hover {
    background: var(--color-surface);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ---------- Mobile nav (бургер) ---------- */

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.site-header.nav-open .nav-burger span:nth-child(2) {
    opacity: 0;
}

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

.nav-panel {
    display: contents;
}

.site-header__phone {
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 980px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease, transform 0.1s ease, color 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn--sm {
    padding: 9px 18px;
    font-size: 0.85rem;
}

.btn--primary {
    background: var(--color-accent);
    color: #ffffff;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
}

.btn--light {
    background: #ffffff;
    color: var(--color-text);
}

.btn--light:hover {
    background: var(--color-surface);
}

.btn--outline {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

/* ---------- Full-bleed band (герой / футер / формы обратной связи) ---------- */

.band {
    width: 100%;
    padding: 96px 0;
    position: relative;
}

.band--dark {
    background: var(--color-dark);
    color: #f5f5f7;
}

.band--dark .band-header p,
.band--dark p {
    color: rgba(245, 245, 247, 0.7);
}

.band--dark h2 {
    color: #fff;
}

/* ---------- Hero (full-bleed) ---------- */

.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
    color: #fff;
    isolation: isolate;
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(11, 11, 13, 0.35) 0%, rgba(11, 11, 13, 0.75) 100%);
}

.hero__content {
    max-width: 640px;
}

.hero__lead {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 0 32px;
}

.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------- Stats strip ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 48px 0;
}

.stats__item {
    text-align: center;
}

.stats__number {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stats__label {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

/* ---------- Spoiler (details/summary для развёрнутого текста) ---------- */

.spoiler {
    margin: 8px 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.spoiler summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-accent);
    list-style: none;
}

.spoiler summary::-webkit-details-marker {
    display: none;
}

.spoiler summary::before {
    content: "+ ";
}

.spoiler[open] summary::before {
    content: "− ";
}

.spoiler p:last-child {
    margin-bottom: 0;
}

.spoiler[open] summary {
    margin-bottom: 12px;
}

/* ---------- Sections (боксовые блоки, капаются в 1440px) ---------- */

.section {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 72px 32px;
}

.section--tint {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: calc(var(--container-width) - 64px);
}

/* ---------- Grids & cards ---------- */

.grid {
    display: grid;
    gap: 20px;
}

.grid--brands {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid--models {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid--facts,
.grid--contacts {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.section__more {
    text-align: center;
    margin-top: 28px;
}

.grid--posts {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.grid--features {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--cases {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 24px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.card__title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card__meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ---------- Big photo tiles: марки / модели ---------- */

.tile {
    position: relative;
    display: flex;
    align-items: flex-end;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    color: #fff;
    transition: transform 0.25s ease;
}

.tile:hover {
    transform: translateY(-4px);
}

.tile__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.tile:hover .tile__img {
    transform: scale(1.06);
}

.tile__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.75) 100%);
}

.tile__body {
    position: relative;
    padding: 20px;
}

.tile__title {
    font-size: 1.2rem;
    font-weight: 600;
}

.tile__meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.tile--sm {
    aspect-ratio: 16 / 10;
}

/* ---------- Quick picker (full-bleed форма) ---------- */

.picker {
    display: grid;
    /* 3 поля фильтра (марка/бюджет/кузов) + 2 кнопки (Подобрать / Оставить
       заявку). Раньше было 4 поля (включая телефон) + 1 кнопка — телефон
       убрали 21.09.2026: он уходил GET-запросом на search.php, который его
       не читает, заявки терялись и номер утекал в URL/историю/Referer. */
    grid-template-columns: repeat(3, 1fr) auto auto;
    gap: 14px;
    align-items: end;
}

.picker__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.picker__field select,
.picker__field input {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-text);
}

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

/* ---------- Steps ---------- */

.steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 40px;
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 44px;
    color: var(--color-text-secondary);
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.steps li strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 4px;
}

/* ---------- Feature cards (почему мы) ---------- */

.feature-card {
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ---------- VIN check / calculator (full-bleed формы) ---------- */

.tool-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.tool-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.tool-form input {
    flex: 1;
    min-width: 220px;
    padding: 14px 18px;
    border-radius: 980px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.95rem;
}

.tool-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.calc {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.calc__row {
    margin-bottom: 22px;
}

.calc__row label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.calc__row input[type="range"] {
    width: 100%;
}

.calc__row select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
}

.calc__result {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.calc__result-value {
    font-size: 1.8rem;
    font-weight: 700;
}

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

/* ---------- Geography ---------- */

.geo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.geo-chip {
    padding: 10px 18px;
    border-radius: 980px;
    background: var(--color-surface);
    font-size: 0.9rem;
}

/* ---------- Reviews ---------- */

.reviews {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

.review-card {
    flex: 0 0 340px;
    scroll-snap-align: start;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card__quote {
    color: var(--color-text);
    font-size: 1rem;
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.review-card__name {
    font-weight: 600;
    font-size: 0.92rem;
}

.review-card__car {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* ---------- Cases gallery ---------- */

.grid--cases .tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* ---------- Blog cards ---------- */

.post-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.post-card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.post-card__body {
    padding: 20px 24px 24px;
}

/* ---------- FAQ ---------- */

.faq-panel {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
}

.faq-panel__photo {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    align-self: start;
}

.faq-panel__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faq {
    max-width: none;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item__q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
}

.faq-item__q::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--color-text-secondary);
    transition: transform 0.2s ease;
}

.faq-item.is-open .faq-item__q::after {
    transform: rotate(45deg);
}

.faq-item__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.faq-item.is-open .faq-item__a {
    max-height: 240px;
}

.faq-item__a p {
    padding-bottom: 20px;
    margin: 0;
}

/* ---------- Final CTA (full-bleed) ---------- */

.cta-band {
    text-align: center;
}

.cta-band h2 {
    color: #fff;
}

.cta-band__form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 32px auto 0;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-band__form input {
    flex: 1;
    min-width: 220px;
    padding: 14px 18px;
    border-radius: 980px;
    border: none;
    font-size: 0.95rem;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.breadcrumbs a:hover {
    color: var(--color-text);
}

/* ---------- Model card (catalog item page) ---------- */

.model-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.model-card__photo {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.model-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.model-card__placeholder {
    font-style: italic;
}

.specs {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
}

.specs th,
.specs td {
    text-align: left;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}

.specs th {
    color: var(--color-text-secondary);
    font-weight: 400;
    width: 40%;
}

@media (max-width: 720px) {
    .model-card {
        grid-template-columns: 1fr;
    }
}

/* ---------- Article ---------- */

.article {
    max-width: 720px;
}

/* ---------- Footer (full-bleed) ---------- */

.site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    margin-top: 0;
}

.site-footer__top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 56px 0 40px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-footer__col h4 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.site-footer__col a {
    color: var(--color-text-secondary);
    padding: 3px 0;
}

.site-footer__col a:hover {
    color: var(--color-text);
}

.site-footer__more {
    margin-top: 6px;
    font-weight: 600;
    color: var(--color-accent) !important;
}

.site-footer__brand p {
    margin: 8px 0 0;
}

.site-footer__socials {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
}

.site-footer__bottom {
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    /* Бургер вместо горизонтального меню */
    .nav-burger {
        display: flex;
    }

    .nav-panel {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 24px;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .site-header.nav-open .nav-panel {
        display: flex;
    }

    .nav-panel .main-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        font-size: 1rem;
    }

    .nav-panel .dropdown {
        width: 100%;
    }

    .nav-panel .dropdown__menu {
        display: block;
        position: static;
        transform: none;
        margin: 10px 0 0 12px;
        padding: 0;
        border: none;
        box-shadow: none;
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-panel .dropdown__menu a {
        padding: 6px 0;
        color: var(--color-text-secondary);
    }

    .nav-panel .site-header__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--color-border);
    }

    .nav-panel .btn--sm {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-panel {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .faq-panel {
        grid-template-columns: 1fr;
    }

    .faq-panel__photo {
        display: none;
    }

    .grid--cases {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--cases .tile:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    .site-footer__top {
        grid-template-columns: 1fr 1fr;
        row-gap: 32px;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .site-footer__brand {
        grid-column: auto;
    }

    .hero {
        min-height: 520px;
        padding: 120px 0 72px;
        text-align: left;
    }

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

    h1 {
        letter-spacing: -0.01em;
    }

    .band {
        padding: 64px 0;
    }

    .section {
        padding: 56px 24px;
    }

    .section--tint {
        padding-left: 16px;
        padding-right: 16px;
    }

    .steps {
        padding: 28px 20px;
    }

    .picker {
        grid-template-columns: 1fr 1fr;
    }

    .stats {
        gap: 20px 16px;
    }

    .model-card {
        grid-template-columns: 1fr;
    }

    .reviews {
        gap: 14px;
    }

    .review-card {
        flex-basis: 280px;
    }

    .cta-band__form {
        flex-direction: column;
    }

    .cta-band__form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 48px 18px;
    }

    .picker {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .grid--cases {
        grid-template-columns: 1fr;
    }

    .grid--cases .tile:first-child {
        grid-column: span 1;
    }

    .tool-form {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-form button {
        width: 100%;
    }
}

/* ---------- Юридические страницы (политики, согласие) ---------- */

.legal {
    max-width: 860px;
}

.legal p,
.legal li {
    font-size: 0.98rem;
    line-height: 1.7;
}

.legal h2 {
    font-size: 1.35rem;
    margin: 40px 0 14px;
    text-transform: none;
}

.legal h3 {
    margin-top: 0;
}

.legal a {
    color: var(--color-accent);
}

.legal a:hover {
    text-decoration: underline;
}

.legal__meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.legal-toc {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 40px;
}

.legal-toc ol {
    margin: 0;
    padding-left: 20px;
}

.legal-toc li {
    margin-bottom: 6px;
    color: var(--color-text-secondary);
}

/* Якоря разделов: компенсируем высоту залипающей шапки при переходе из оглавления. */
.legal [id^="a-f"] {
    display: block;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

/* ---------- Чекбокс согласия в формах ---------- */

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.consent-check input {
    flex: none;
    width: 16px;
    height: 16px;
    min-width: 0;
    margin-top: 2px;
    padding: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.consent-check a {
    color: inherit;
    text-decoration: underline;
}

.consent-check a:hover {
    color: var(--color-text);
}

/* На тёмной CTA-полосе текст согласия должен читаться. */
.band--dark .consent-check {
    color: rgba(245, 245, 247, 0.7);
}

.band--dark .consent-check a:hover {
    color: #fff;
}

.cta-band__form button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ---------- Cookie-баннер ---------- */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 460px;
    margin-left: auto;
    background: var(--color-dark-surface);
    color: #f5f5f7;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.cookie-banner__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cookie-banner__text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(245, 245, 247, 0.78);
}

.cookie-banner__text a {
    color: #fff;
    text-decoration: underline;
}

.cookie-banner__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.cookie-option input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
}

.cookie-option input:disabled {
    cursor: not-allowed;
}

.cookie-option b {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f5f5f7;
}

.cookie-option em {
    display: block;
    font-style: normal;
    font-size: 0.78rem;
    color: rgba(245, 245, 247, 0.6);
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* ---------- Блок «Наши адреса» ---------- */

.offices__switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.offices__city {
    padding: 9px 18px;
    border-radius: 980px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.offices__city:hover {
    color: var(--color-text);
}

.offices__city.is-active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #fff;
}

.offices__grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 40px;
    align-items: start;
}

.offices__info h3 {
    margin-bottom: 20px;
}

.offices__row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    color: var(--color-text);
    font-size: 0.98rem;
}

.offices__label {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.offices__row a {
    color: var(--color-accent);
}

.offices__row a:hover {
    text-decoration: underline;
}

.offices__messengers {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* MAX пока без персональной ссылки — выводится текстом, отличаем его от ссылок. */
.offices__messengers span {
    color: var(--color-text-secondary);
}

.offices__map {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    min-height: 420px;
}

.offices__map-frame {
    display: block;
    border: 0;
    width: 100%;
    height: 420px;
}

@media (max-width: 900px) {
    .offices__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .offices__map,
    .offices__map-frame {
        min-height: 320px;
        height: 320px;
    }
}

@media (max-width: 720px) {
    .cookie-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        padding: 16px;
    }

    .cookie-banner__actions {
        justify-content: stretch;
    }

    .cookie-banner__actions .btn {
        flex: 1 1 auto;
    }
}

/* ---------- Футер: юридические ссылки и адрес ---------- */

.site-footer__address {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    align-items: center;
    justify-content: space-between;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.site-footer__legal a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* ---------- CTA-полоса: раскладка с чекбоксом согласия ---------- */
/* .cta-band__form — flex-wrap, поэтому чекбокс (width:100%) уезжает на свою
   строку. order держит его под парой «телефон + кнопка», а не между ними. */

.cta-band__form input[type="tel"] {
    order: 1;
}

.cta-band__form button[type="submit"] {
    order: 2;
}

.cta-band__form .consent-check {
    order: 3;
    justify-content: center;
    max-width: 460px;
    margin: 0 auto;
}

/* .cta-band__form input задаёт inputам скруглённый «пилюлей» вид — чекбоксу
   он не нужен. */
.consent-check input {
    border-radius: 3px;
}

/* Атрибут hidden должен побеждать любые display из правил выше: cookie-баннер,
   его блок настроек, кнопка «Сохранить выбор» и неактивные панели городов
   скрываются именно им (см. assets/js/main.js). Без !important правило класса
   .btn { display: inline-flex } перебивает браузерное [hidden] { display: none }. */
[hidden] {
    display: none !important;
}

/* ---------- Страница «Спасибо» и вторичная кнопка на светлом фоне ---------- */
/* .btn--outline рассчитана на тёмные полосы (белая рамка), на белом фоне она
   не видна — для светлых секций нужна своя. */

.btn--quiet {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--quiet:hover {
    background: var(--color-surface);
}

.thanks__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* ---------- Форма заявки: ошибка и honeypot ---------- */

.lead-form__error {
    max-width: 480px;
    margin: 24px auto 0;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 69, 58, 0.14);
    color: #ffb4ae;
    font-size: 0.88rem;
    text-align: center;
}

/* Honeypot: убран из потока и с глаз, но не display:none — часть ботов
   игнорирует скрытые через display поля, а такое заполняет. */
.lead-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Попап заявки ---------- */
/* Разметка — includes/lead-modal.php, поведение — assets/js/main.js.
   z-index выше cookie-баннера (1000): баннер не должен перекрывать окно,
   в котором человек прямо сейчас вводит телефон. */

.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lead-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    animation: lead-modal-fade 0.2s ease;
}

.lead-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 44px 36px 32px;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    animation: lead-modal-rise 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes lead-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lead-modal-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lead-modal__backdrop,
    .lead-modal__dialog {
        animation: none;
    }
}

.lead-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1.6rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lead-modal__close:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.lead-modal__title {
    font-size: 1.55rem;
    margin: 0 0 10px;
}

.lead-modal__text {
    margin: 0 0 24px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.lead-modal__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lead-modal__form input[type="tel"] {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: 980px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-text);
}

.lead-modal__form input[type="tel"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.lead-modal__form .btn {
    width: 100%;
}

.lead-modal__form button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Плашка ошибки внутри попапа — на белом фоне, в отличие от .lead-form__error
   на тёмной CTA-полосе. */
.lead-modal__error {
    margin: 0 0 18px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 69, 58, 0.1);
    color: #c9372c;
    font-size: 0.88rem;
}

.lead-modal__note {
    margin: 20px 0 0;
    font-size: 0.85rem;
    text-align: center;
    color: var(--color-text-secondary);
}

.lead-modal__note a {
    color: var(--color-accent);
}

.lead-modal__panel--done {
    text-align: center;
    padding: 8px 0 4px;
}

/* Пока попап открыт, фон не должен прокручиваться под ним. */
body.has-lead-modal {
    overflow: hidden;
}

@media (max-width: 520px) {
    .lead-modal {
        padding: 12px;
    }

    .lead-modal__dialog {
        padding: 40px 22px 26px;
    }

    .lead-modal__title {
        font-size: 1.35rem;
    }
}
