/* =========================================================
   АВТОБРОКЕР — ИРКУТСК
   Дизайн-система v3.0 «Графит»
   Спокойный профессиональный стиль: графит + белый,
   фирменный красный только для действий и акцентов.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

/* ===== ТОКЕНЫ ===== */
:root {
    /* Базовая палитра */
    --ink: #16191e;            /* графит — тексты, тёмные секции */
    --ink-2: #20252c;          /* асфальт — тёмные поверхности */
    --ink-3: #2c323b;          /* линии на тёмном */
    --paper: #ffffff;
    --mist: #f3f4f5;           /* светлые секции */
    --line: #e1e4e8;           /* границы */
    --steel: #616975;          /* вторичный текст */
    --steel-2: #8c939d;        /* третичный текст */
    --signal: #c8102e;         /* фирменный красный */
    --signal-dark: #a00d25;
    --signal-tint: #fbeef0;
    --ok: #1f7a4d;

    /* Совместимость со старыми шаблонами (имена переменных сохранены) */
    --color-bg: var(--paper);
    --color-bg-soft: var(--mist);
    --color-bg-dark: var(--ink);
    --color-dark: var(--ink);
    --color-dark-2: var(--ink-2);
    --color-text: var(--ink);
    --color-text-muted: var(--steel);
    --color-text-soft: var(--steel-2);
    --color-border: var(--line);
    --color-accent: var(--signal);
    --color-accent-2: #e2324c;
    --color-accent-dark: var(--signal-dark);
    --gradient-accent: linear-gradient(0deg, var(--signal), var(--signal));
    --gradient-accent-soft: linear-gradient(0deg, var(--signal-tint), var(--signal-tint));
    --gradient-dark: linear-gradient(180deg, #1b1f25 0%, #14171b 100%);

    --shadow-sm: 0 1px 2px rgba(22, 25, 30, 0.06);
    --shadow-md: 0 6px 20px rgba(22, 25, 30, 0.08);
    --shadow-lg: 0 14px 36px rgba(22, 25, 30, 0.12);
    --shadow-accent: 0 6px 18px rgba(200, 16, 46, 0.22);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 0.18s;
    --dur-med: 0.3s;
    --dur-slow: 0.5s;

    --font: 'Onest', 'Segoe UI', Roboto, Arial, sans-serif;
    --header-h: 76px;
}

/* ===== БАЗА ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-feature-settings: "tnum" 0;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--signal); color: #fff; }

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* Появление при скролле — единственная «фоновая» анимация, очень сдержанная */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transition: opacity .5s var(--ease-out); }
.reveal-scale.is-visible { opacity: 1; }

/* ===== ВЕРХНЯЯ ПОЛОСА ===== */
.topbar {
    background: var(--ink);
    color: #b9bfc8;
    font-size: 13px;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 38px;
}
.topbar-info { display: flex; gap: 28px; align-items: center; }
.topbar-info span { display: inline-flex; align-items: center; gap: 8px; }
.topbar-info svg { width: 14px; height: 14px; opacity: .7; flex-shrink: 0; }
.topbar-social { display: flex; gap: 6px; align-items: center; }

/* Круглые значки соцсетей (используются в полосе и футере) */
.header-social-badge {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--ink-3);
    transition: background var(--dur-fast), transform var(--dur-fast);
}
.header-social-badge svg { width: 56%; height: 56%; display: block; }
.header-social-badge:hover { transform: translateY(-1px); }
.header-social-badge.vk:hover { background: #0077FF; }
.header-social-badge.youtube:hover { background: #FF0000; }
.header-social-badge.rutube:hover { background: #100943; }
.header-social-badge.max:hover { background: linear-gradient(90deg, #4185F6 0%, #4930E0 48%, #964BDA 98%); }
.header-social-badge.telegram:hover { background: #2AABEE; }

/* ===== ШАПКА ===== */
.header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    color: var(--ink);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    transition: box-shadow var(--dur-fast);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    height: var(--header-h);
}

/* Логотип */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-wrapper { display: flex; align-items: center; }
.logo-text-custom { display: flex; align-items: center; gap: 12px; }
.logo-text-custom .red {
    width: 42px; height: 42px;
    background: var(--signal);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800;
    letter-spacing: -0.04em;
    position: relative;
}
/* «дорожная» полоса на знаке */
.logo-text-custom .red::after {
    content: '';
    position: absolute;
    left: 8px; right: 8px; bottom: 7px;
    height: 2px;
    background: rgba(255,255,255,.55);
    border-radius: 2px;
}
.logo-text-custom .text { display: flex; flex-direction: column; line-height: 1; }
.logo-text-custom .text .line1 {
    font-size: 19px; font-weight: 800; letter-spacing: 0.02em; color: var(--ink);
}
.logo-text-custom .text .line2 {
    font-size: 12.5px; font-weight: 500; color: var(--steel); margin-top: 4px; letter-spacing: 0;
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.nav a {
    font-size: 15px;
    font-weight: 500;
    color: #3a414b;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--dur-fast), background var(--dur-fast);
    white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--mist); }
.nav a.active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }

.header-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }

.header-phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.header-phone .phone-number { font-size: 17px; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.header-phone .phone-note { font-size: 12px; color: var(--steel); }
.header-phone:hover .phone-number { color: var(--signal); }

.header-cta { padding: 11px 18px; font-size: 14px; }
.header-phone .phone-ic { display: none; }

/* Бургер */
.nav-toggle {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px;
    background: var(--mist);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
    display: block; width: 18px; height: 2px; margin: 0 auto;
    background: var(--ink); border-radius: 2px;
    transition: transform var(--dur-fast), opacity var(--dur-fast);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== КНОПКИ ===== */
.btn-primary,
.btn-outline,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
    white-space: nowrap;
    text-decoration: none;
}
.btn-primary { background: var(--signal); color: #fff; border: 1px solid var(--signal); }
.btn-primary:hover { background: var(--signal-dark); border-color: var(--signal-dark); box-shadow: var(--shadow-accent); }
.btn-primary:active { transform: translateY(1px); }

.btn-outline { background: #fff; color: var(--ink); border: 1px solid #c9ced5; }
.btn-outline:hover { border-color: var(--ink); background: #fff; color: var(--ink); }

.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.28); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }

.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ===== ЗАГОЛОВКИ СЕКЦИЙ ===== */
.section { padding: 88px 0; }
.section--mist { background: var(--mist); }
.section--dark { background: var(--ink); color: #fff; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}
.section-head .section-title { margin-bottom: 0; }
.section-head p { color: var(--steel); max-width: 560px; margin-top: 10px; }

.section-title {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 10px;
}
.section--dark .section-title { color: #fff; }
.section-subtitle { font-size: 17px; color: var(--steel); margin-bottom: 32px; max-width: 640px; }

.link-more {
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid #c9ced5;
    padding-bottom: 2px;
    white-space: nowrap;
    transition: border-color var(--dur-fast), color var(--dur-fast);
}
.link-more:hover { color: var(--signal); border-color: var(--signal); }

/* ===== HERO ===== */
.hero {
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 72px 0 120px;
}
.hero::before {
    /* тонкая разметка дороги по краю — фирменный мотив */
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--ink-3);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    align-items: end;
}
.hero-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; color: #b9bfc8;
    margin-bottom: 22px;
}
.hero-kicker::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--signal);
}
.hero h1 {
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
    max-width: 16ch;
}
.hero-lead {
    font-size: 18px;
    color: #c4c9d1;
    max-width: 520px;
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Маршрут поставки — фирменный элемент */
.route-card {
    background: var(--ink-2);
    border: 1px solid var(--ink-3);
    border-radius: var(--radius-lg);
    padding: 28px 28px 26px;
}
.route-card h2 { font-size: 17px; font-weight: 600; color: #fff; margin-bottom: 22px; letter-spacing: 0; }
.route { list-style: none; margin: 0 0 22px; }
.route-stop { position: relative; padding: 0 0 22px 34px; }
.route-stop::before {
    /* пунктир дорожной разметки между точками */
    content: '';
    position: absolute; left: 6px; top: 16px; bottom: -2px;
    width: 2px;
    background: repeating-linear-gradient(180deg, #59616c 0 8px, transparent 8px 14px);
}
.route-stop::after {
    content: '';
    position: absolute; left: 0; top: 3px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--ink-2); border: 2px solid #8c939d;
}
.route-stop:last-child { padding-bottom: 0; }
.route-stop:last-child::before { display: none; }
.route-stop:last-child::after { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 5px rgba(200,16,46,.22); }
.route-stop b { display: block; font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.route-stop span { display: block; font-size: 14px; color: #9aa1aa; line-height: 1.45; }
.link-more--light { color: #fff; border-color: #59616c; }
.link-more--light:hover { color: #fff; border-color: #fff; }

/* Карусель баннеров */
.banner-carousel { padding: 0; background: transparent; margin-top: 56px; }
.carousel-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0f1114;
}
.carousel-track { display: flex; transition: transform .6s var(--ease-smooth); }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; aspect-ratio: 2.4 / 1; object-fit: contain; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    border: none; cursor: pointer;
    background: rgba(255,255,255,.92); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--dur-fast);
}
.carousel-wrapper:hover .carousel-btn, .carousel-btn:focus-visible { opacity: 1; }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.carousel-dots .dot {
    width: 22px; height: 3px; border-radius: 2px;
    border: none; background: #4a515b; cursor: pointer; padding: 0;
    transition: background var(--dur-fast), width var(--dur-fast);
}
.carousel-dots .dot.active { background: #fff; width: 36px; }

/* ===== ПОИСК (карточка поверх hero) ===== */
.search-panel {
    position: relative;
    margin-top: -64px;
    z-index: 5;
}
.search-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    padding: 22px 24px 24px;
}
.search-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.search-form {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr 1.1fr auto;
    gap: 10px;
    align-items: end;
}
.search-form label { display: block; font-size: 12.5px; color: var(--steel); margin-bottom: 6px; font-weight: 500; }

/* ===== ПОЛЯ ===== */
.filter-bar { background: var(--mist); padding: 20px 0; border-bottom: 1px solid var(--line); }
.filter-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-select,
.filter-input,
.form-control {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cfd4da;
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: var(--font);
    font-size: 15px;
    color: var(--ink);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
textarea.form-control { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.filter-select {
    cursor: pointer;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23616975' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.filter-select:hover, .filter-input:hover, .form-control:hover { border-color: #aeb5bd; }
.filter-select:focus, .filter-input:focus, .form-control:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(22, 25, 30, 0.08);
}
.filter-input::placeholder, .form-control::placeholder { color: #9aa1aa; }
.filter-sep { font-size: 13px; color: var(--steel); }
/* убираем стрелки у number */
.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-input[type=number] { -moz-appearance: textfield; }

/* ===== КАРТОЧКИ АВТО ===== */
.cars-section { padding: 72px 0 88px; background: #fff; }
.cars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.car-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--dur-med) var(--ease-smooth), border-color var(--dur-med);
    position: relative;
}
.car-card:hover { box-shadow: var(--shadow-lg); border-color: #d3d7dc; }
.car-image {
    position: relative;
    aspect-ratio: 4 / 3;
    height: auto;
    background: var(--mist);
    overflow: hidden;
}
.car-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.car-card:hover .car-image img { transform: scale(1.03); }

.car-badge {
    position: absolute; top: 10px; left: 10px;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.95);
    color: var(--ink);
    padding: 4px 9px 4px 4px;
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
}
.car-badge .logo-mini, .logo-mini {
    width: 18px; height: 18px;
    background: var(--signal); color: #fff;
    border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
}
.car-fav {
    position: absolute; top: 10px; right: 10px;
    width: 34px; height: 34px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--steel);
    border: none;
    transition: color var(--dur-fast);
}
.car-fav:hover, .car-fav.is-active { color: var(--signal); }
.car-fav svg { width: 17px; height: 17px; }
.car-location {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(22,25,30,.78);
    color: #fff;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    display: inline-flex; align-items: center; gap: 5px;
}
.car-info { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.car-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--ink); letter-spacing: -0.01em; }
.car-info h3 a:hover { color: var(--signal); }

.car-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.car-chips span {
    font-size: 12.5px; color: #3a414b;
    background: var(--mist);
    border-radius: 4px;
    padding: 3px 8px;
    font-variant-numeric: tabular-nums;
}
.car-specs { font-size: 13.5px; color: var(--steel); line-height: 1.55; margin-bottom: 14px; }
.car-price-row {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-top: auto; margin-bottom: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.car-price { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.car-credit { font-size: 13px; color: var(--steel); margin-top: 2px; }
.car-actions { display: flex; gap: 8px; }
.car-actions .icon-btn {
    width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; background: #fff; cursor: pointer; color: var(--steel);
}
.car-address { display: flex; gap: 6px; font-size: 12.5px; color: var(--steel); margin-bottom: 12px; }
.car-card .btn-outline { width: 100%; }

/* Плитка «весь каталог» в конце сетки */
.car-card--more {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    padding: 28px 24px;
    justify-content: space-between;
    min-height: 360px;
}
.car-card--more:hover { box-shadow: var(--shadow-lg); border-color: var(--ink); }
.car-card--more h3 { font-size: 24px; font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
.car-card--more p { color: #b9bfc8; font-size: 15px; }
.car-card--more ul { list-style: none; margin: 20px 0 24px; display: grid; gap: 10px; }
.car-card--more li { display: flex; gap: 10px; font-size: 14.5px; color: #dfe3e8; }
.car-card--more li svg { width: 18px; height: 18px; color: #fff; flex-shrink: 0; margin-top: 2px; }

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 20px;
    background: var(--mist);
    border-radius: var(--radius-md);
    border: 1px dashed #cfd4da;
}
.no-results p { font-size: 17px; color: var(--steel); margin-bottom: 18px; }

/* ===== КАК МЫ РАБОТАЕМ (шаги) ===== */
.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    counter-reset: step;
    border-top: 1px solid var(--line);
}
.steps li {
    counter-increment: step;
    padding: 26px 24px 0 0;
    position: relative;
}
.steps li::before {
    content: counter(step);
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid #c9ced5;
    background: #fff;
    font-weight: 700; font-size: 15px;
    position: absolute; top: -17px; left: 0;
    font-variant-numeric: tabular-nums;
}
.steps li:last-child::before { background: var(--signal); border-color: var(--signal); color: #fff; }
.steps h3 { font-size: 17px; margin: 14px 0 8px; }
.steps p { font-size: 14.5px; color: var(--steel); }

/* ===== УСЛУГИ ===== */
.services-section { padding: 88px 0; background: var(--mist); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.service-card {
    background: #fff;
    padding: 28px 26px 26px;
    display: flex;
    flex-direction: column;
    transition: background var(--dur-fast);
    position: relative;
}
.service-card:hover { background: #fcfcfd; }
.service-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--mist);
    color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.service-card:hover .service-icon { background: var(--signal); color: #fff; }
.service-icon svg { width: 24px; height: 24px; padding: 0; }
.service-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--ink); line-height: 1.25; }
.service-card p { font-size: 14.5px; color: var(--steel); line-height: 1.55; flex: 1; margin-bottom: 16px; }
.service-link { font-size: 14.5px; font-weight: 600; color: var(--ink); align-self: flex-start; border-bottom: 1px solid #c9ced5; padding-bottom: 1px; }
.service-card:hover .service-link { color: var(--signal); border-color: var(--signal); }
/* вся карточка кликабельна */
.service-link::after { content: ''; position: absolute; inset: 0; }

/* ===== О БРОКЕРЕ ===== */
.about { padding: 96px 0; background: #fff; }
.about-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
    align-items: center;
}
.photo-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--mist); }
.photo-frame img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; }
.photo-caption {
    position: absolute; left: 16px; right: 16px; bottom: 16px;
    background: rgba(255,255,255,.96);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.photo-caption b { display: block; font-size: 16px; }
.photo-caption span { font-size: 13px; color: var(--steel); }
.photo-caption .years { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; color: var(--signal); line-height: 1; text-align: right; }
.photo-caption .years small { display: block; font-size: 12px; font-weight: 500; color: var(--steel); letter-spacing: 0; }

.about-copy h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 22px; letter-spacing: -0.025em; }
.about-copy p { font-size: 17px; color: #444b55; line-height: 1.7; margin-bottom: 18px; max-width: 62ch; }
.about-copy blockquote {
    margin: 30px 0 10px;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--signal);
    font-size: 20px; font-weight: 500;
    line-height: 1.45;
    color: var(--ink);
    letter-spacing: -0.01em;
    max-width: 54ch;
}
.about-copy .signature { font-size: 15px; color: var(--steel); padding-left: 25px; margin-top: 10px; }

/* ===== ПРИНЦИПЫ ===== */
.principles { padding: 0 0 96px; background: #fff; }
.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.principle { padding-top: 22px; border-top: 2px solid var(--ink); }
.principle h3 { font-size: 19px; margin-bottom: 10px; }
.principle p { font-size: 15px; color: var(--steel); line-height: 1.6; }

/* ===== ЗАЯВКА ===== */
.lead-section { background: var(--ink-2); color: #fff; padding: 88px 0; }
.lead-section .lead-contacts .ic { border-color: #3b424c; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.lead-copy h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.025em; margin-bottom: 16px; }
.lead-copy p { color: #c4c9d1; font-size: 17px; max-width: 46ch; margin-bottom: 28px; }
.lead-contacts { display: grid; gap: 14px; }
.lead-contacts a { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; }
.lead-contacts a:hover { color: #ff8796; }
.lead-contacts .ic {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--ink-3);
    display: inline-flex; align-items: center; justify-content: center;
}
.lead-contacts .ic svg { width: 18px; height: 18px; }
.lead-form {
    background: #fff; color: var(--ink);
    border-radius: var(--radius-lg);
    padding: 30px;
    display: grid; gap: 14px;
}
.lead-form h3 { font-size: 20px; }
.lead-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form .hint { font-size: 12.5px; color: var(--steel); }
.lead-form .hint a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* ===== ЧЕКБОКСЫ СОГЛАСИЯ ===== */
.checkbox-wrapper { margin-bottom: 14px; }
.checkbox-container { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: #444b55; cursor: pointer; line-height: 1.5; }
.checkbox-container input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--signal); cursor: pointer; }
.checkbox-container .text { display: inline; white-space: normal; }
.checkbox-container .text .line { display: inline; }
.checkbox-container a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.checkbox-container a:hover { color: var(--signal); }

/* ===== ВНУТРЕННИЕ СТРАНИЦЫ: общие блоки ===== */
.banner {
    background: var(--ink);
    padding: 72px 0 64px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.banner .container { position: relative; z-index: 1; }
.banner h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.banner h1 span { color: inherit; background: none; -webkit-text-fill-color: currentColor; }
.banner p { font-size: 18px; color: #c4c9d1; max-width: 640px; }

/* Преимущества (страница «Подбор») */
.advantages { padding: 80px 0; background: #fff; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 36px; }
.adv-item { text-align: left; padding-top: 20px; border-top: 1px solid var(--line); }
.adv-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: var(--mist); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    margin: 0 0 16px; font-size: 20px;
}
.adv-item h3 { font-size: 17px; margin-bottom: 8px; }
.adv-item p { font-size: 14.5px; color: var(--steel); max-width: none; margin: 0; }

/* Тарифы (прокат, подбор) */
.rent-plans { padding: 80px 0; background: var(--mist); }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 28px 24px;
    border: 1px solid var(--line);
    transition: box-shadow var(--dur-med), border-color var(--dur-med);
}
.plan-card:hover { box-shadow: var(--shadow-md); border-color: #d3d7dc; }
.plan-body h3 { font-size: 19px; margin-bottom: 8px; }
.plan-body p { font-size: 14.5px; color: var(--steel); line-height: 1.6; margin-bottom: 14px; }
.plan-price { font-size: 15px; color: var(--steel); margin-bottom: 14px; }
.plan-price strong { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.plan-phone a {
    display: inline-flex; font-size: 17px; font-weight: 700; color: var(--ink);
    padding: 10px 16px; border: 1px solid #c9ced5; border-radius: var(--radius-sm);
}
.plan-phone a:hover { border-color: var(--signal); color: var(--signal); }

/* Менеджеры */
.manager-section { padding: 80px 0; background: var(--mist); }
.managers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.manager-card {
    background: #fff; border-radius: var(--radius-md); padding: 28px 22px; text-align: center;
    border: 1px solid var(--line); position: relative;
}
.manager-avatar { width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 50%; padding: 0; background: none; animation: none; }
.manager-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 0; }
.manager-card h3 { font-size: 18px; margin-bottom: 4px; }
.manager-role { font-size: 14px; color: var(--steel); margin-bottom: 14px; }
.manager-phone-link { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--ink); }
.manager-phone-link:hover { color: var(--signal); }
.manager-phone-link .phone-icon-ring {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--signal); color: #fff;
    display: flex; align-items: center; justify-content: center; animation: none; box-shadow: none;
}
.manager-work-time { font-size: 13px; color: var(--steel-2); }

.sell-icon { width: 64px; height: 64px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; }
.sell-icon svg { width: 100%; height: 100%; display: block; }

/* ===== FLASH ===== */
.flash-messages { position: fixed; top: 96px; right: 20px; z-index: 300; display: grid; gap: 10px; max-width: 380px; }
.flash-message {
    background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink);
    border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-lg); font-size: 15px;
}
.flash-success { border-left-color: var(--ok); }
.flash-danger, .flash-error { border-left-color: var(--signal); }
.flash-warning { border-left-color: #c98a00; }

/* ===== ФУТЕР ===== */
.footer { background: var(--ink); color: #b9bfc8; padding: 72px 0 28px; font-size: 14.5px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 44px;
}
.footer .logo-text-custom .text .line1 { color: #fff; }
.footer .logo-text-custom .text .line2 { color: #8c939d; }
.footer-about { margin-top: 18px; max-width: 34ch; line-height: 1.6; }
.footer h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 16px; letter-spacing: 0; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { color: #b9bfc8; transition: color var(--dur-fast); }
.footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: #8c939d; }
.footer-contact .big { font-size: 18px; font-weight: 700; color: #fff; }
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.footer-social .header-social-badge { width: 34px; height: 34px; }
.footer-legal {
    border-top: 1px solid var(--ink-3);
    padding: 22px 0;
}
.footer-legal p { font-size: 12.5px; color: #7d848e; line-height: 1.6; max-width: 110ch; }
.footer-bottom {
    border-top: 1px solid var(--ink-3);
    padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    font-size: 13px; color: #7d848e;
}
.footer-bottom a { color: #b9bfc8; }
.footer-bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ===== ПЛАВАЮЩИЕ КНОПКИ ===== */
.floating-buttons {
    position: fixed; right: 20px; bottom: 20px; z-index: 999;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.floating-badge {
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none;
    box-shadow: 0 6px 18px rgba(22,25,30,.25);
    transition: transform var(--dur-fast);
}
.floating-badge svg { width: 44%; height: 44%; display: block; }
.floating-badge:hover { transform: translateY(-2px); }
.floating-badge.fb-max { background: linear-gradient(135deg, #4185F6 0%, #4930E0 55%, #964BDA 100%); }
.floating-badge.fb-phone { background: var(--signal); }
.floating-phone-wrap { position: relative; }
.floating-phone-popup {
    position: absolute; bottom: 4px; right: calc(100% + 12px);
    background: var(--ink); color: #fff; padding: 10px 14px;
    border-radius: var(--radius-sm); white-space: nowrap; box-shadow: var(--shadow-lg);
}
.floating-phone-popup a { color: #fff; font-weight: 700; font-size: 15px; }

/* ===== COOKIE ===== */
.cookie-banner {
    display: none;
    position: fixed; left: 20px; bottom: 20px; z-index: 9999;
    max-width: 420px;
    background: #fff; color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(10px);
    transition: opacity .3s, transform .3s var(--ease-out);
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner-content { display: flex; flex-direction: column; gap: 14px; }
.cookie-banner-text { font-size: 14px; line-height: 1.55; color: #444b55; }
.cookie-link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; display: inline-block; margin-top: 4px; }
.cookie-btn { align-self: flex-start; padding: 10px 22px; font-size: 14px; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1240px) {
    .nav a { padding: 8px 9px; font-size: 14.5px; }
    .header-cta { display: none; }
    .search-form { grid-template-columns: repeat(3, 1fr); }
    .search-form .search-submit { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
    .cars-grid { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(3, 1fr); row-gap: 44px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
    :root { --header-h: 66px; }
    .nav-toggle { display: flex; }
    .nav {
        position: fixed;
        top: var(--header-h); left: 0; right: 0; bottom: 0;
        background: #fff;
        flex-direction: column; align-items: stretch; justify-content: flex-start;
        gap: 0;
        padding: 12px 24px 40px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s, transform .25s var(--ease-smooth), visibility 0s .25s;
        overflow-y: auto;
        z-index: 99;
    }
    .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease-smooth); }
    .nav a { font-size: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav a:hover { background: none; }
    .header-right { margin-left: auto; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { max-width: 18ch; }
    .about-inner { grid-template-columns: 1fr; gap: 40px; }
    .photo-frame { max-width: 520px; }
    .lead-grid { grid-template-columns: 1fr; gap: 40px; }
    .principles-grid, .adv-grid, .plans-grid, .managers-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .topbar-info span:not(:first-child) { display: none; }
    .header-phone .phone-note { display: none; }
    .header-phone .phone-number { font-size: 15px; }
    .section, .services-section, .lead-section { padding: 64px 0; }
    .about { padding: 64px 0; }
    .principles { padding-bottom: 64px; }
    .hero { padding: 48px 0 104px; }
    .hero-lead { font-size: 16.5px; }
    .route-card { padding: 22px; }
    .banner-carousel { margin-top: 36px; }
    .carousel-slide img { aspect-ratio: 2 / 1; }
    .cars-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .car-info { padding: 12px 12px 14px; }
    .car-info h3 { font-size: 15px; }
    .car-price { font-size: 18px; }
    .car-specs { display: none; }
    .car-card--more { min-height: 0; grid-column: 1 / -1; }
    .search-form { grid-template-columns: 1fr 1fr; }
    .search-form .field-brand { grid-column: 1 / -1; }
    .services-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; row-gap: 0; border-top: 0; border-left: 1px solid var(--line); margin-left: 17px; }
    .steps li { padding: 0 0 28px 32px; }
    .steps li::before { left: -17px; top: 0; }
    .steps h3 { margin-top: 4px; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .principles-grid, .adv-grid, .plans-grid, .managers-grid { grid-template-columns: 1fr; gap: 24px; }
    .lead-form { padding: 22px; }
    .lead-form .row-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .floating-buttons { right: 14px; bottom: 14px; }
    .floating-badge { width: 48px; height: 48px; }
    .floating-phone-popup { right: 0; bottom: calc(100% + 10px); }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .flash-messages { left: 12px; right: 12px; top: 80px; max-width: none; }
}

 @media (max-width: 560px) {
    .topbar-info { display: none; }
    .topbar-inner { justify-content: flex-end; }
    .hero-actions .btn-lg { width: 100%; }
    .header-inner { gap: 10px; }
    .header-right { gap: 8px; }
    .header-phone .phone-number { display: none; }
    .header-phone .phone-ic {
        display: flex; width: 42px; height: 42px; border-radius: var(--radius-sm);
        align-items: center; justify-content: center;
        background: var(--signal); color: #fff;
    }
    .header-phone .phone-ic svg { width: 19px; height: 19px; }
}

@media (max-width: 420px) {
    .logo-text-custom .text .line2 { display: none; }
    .logo-text-custom .red { width: 38px; height: 38px; font-size: 21px; }
    .header-phone .phone-number { font-size: 14px; }
    .cars-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal, .reveal-scale { opacity: 1; transform: none; }
}

/* ===== ШАПКИ ВНУТРЕННИХ СТРАНИЦ (единый вид) =====
   Специфичность section.page-hero выше, чем у локальных стилей шаблонов */
section.page-hero {
    background: var(--ink);
    color: #fff;
    text-align: left;
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}
section.page-hero::before, section.page-hero::after { display: none; }
section.page-hero h1 {
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 14px;
    max-width: 20ch;
    animation: none;
}
section.page-hero p {
    font-size: 18px;
    color: #c4c9d1;
    max-width: 620px;
    margin: 0;
    animation: none;
}
section.page-hero .sell-content,
section.page-hero .rent-hero-content,
section.page-hero .order-hero-content { text-align: left; max-width: none; margin: 0; }
section.page-hero .container > * { margin-left: 0; }
