/* =========================================================
   BibikaServis — дизайн-система
   ========================================================= */

:root {
    --asphalt: #1C1F22;
    --asphalt-2: #24282C;
    --steel: #4A5157;
    --steel-light: #8A9096;
    --paper: #F2EFE9;
    --paper-2: #E8E3D9;
    --signal: #FF7A1A;
    --signal-dark: #D9600A;
    --oil-green: #2F6B4F;
    --line: #D8D2C4;
    --ink: #201D1A;
    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body: 'PT Sans', 'Segoe UI', Arial, sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --radius: 3px;
    --shadow: 0 2px 0 rgba(0,0,0,.08), 0 12px 24px -12px rgba(0,0,0,.35);
    --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--signal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--asphalt);
    line-height: 1.15;
    margin: 0 0 .5em;
}
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin-top: 2em; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

/* Top bar */
.topbar {
    background: var(--asphalt);
    color: var(--paper-2);
    font-size: 14px;
}
.topbar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    padding-bottom: 8px;
}
.topbar a { color: var(--paper-2); }
.topbar .topbar-phone {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #fff;
    font-size: 16px;
    letter-spacing: .02em;
}
.topbar .topbar-hours { color: var(--steel-light); }

/* Header */
header.site-header {
    background: var(--paper);
    border-bottom: 3px solid var(--asphalt);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.logo {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 22px;
    color: var(--asphalt);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.logo .logo-badge {
    background: var(--signal);
    color: #fff;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: var(--radius);
    letter-spacing: .03em;
}
.logo:hover { text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.phone-btn {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 19px;
    color: var(--asphalt);
    white-space: nowrap;
}
.call-btn {
    background: var(--signal);
    color: #fff !important;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .03em;
    padding: 11px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    white-space: nowrap;
}
.call-btn:hover { background: var(--signal-dark); text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--asphalt);
    border-radius: var(--radius);
    width: 44px;
    height: 40px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--asphalt);
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

/* =========================================================
   МЕНЮ — исправленное, в несколько колонок
   ========================================================= */
nav.main-nav {
    background: var(--asphalt);
}
nav.main-nav .container {
    display: flex;
    justify-content: center;
}
nav.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
nav.main-nav > .container > ul > li {
    position: relative;
}
nav.main-nav > .container > ul > li > a {
    display: block;
    color: var(--paper-2);
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: .02em;
    padding: 13px 14px;
    white-space: nowrap;
}
nav.main-nav > .container > ul > li > a:hover,
nav.main-nav > .container > ul > li.active > a {
    background: var(--signal);
    color: #fff;
    text-decoration: none;
}

/* Выпадающее меню — 3 колонки, без вертикального скролла */
.has-mega {
    position: relative;
}
.has-mega > a::after {
    content: ' ▾';
    font-size: 10px;
}
.has-mega .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--asphalt-2);
    border-top: 2px solid var(--signal);
    box-shadow: var(--shadow);
    z-index: 200;
    min-width: 700px;
    max-width: 900px;
    padding: 12px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 80vh;
    overflow-y: auto;
}
.has-mega:hover .dropdown,
.has-mega.open .dropdown {
    display: block;
}
.has-mega .dropdown .dropdown-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 24px;
}
.has-mega .dropdown .group {
    padding: 0;
}
.has-mega .dropdown .group-title {
    color: var(--signal);
    font-family: var(--font-display);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 0 4px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 4px;
}
.has-mega .dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
}
.has-mega .dropdown ul li {
    display: block;
}
.has-mega .dropdown a {
    display: block;
    color: var(--paper-2);
    font-family: var(--font-body);
    text-transform: none;
    font-size: 14px;
    padding: 4px 8px;
    white-space: nowrap;
}
.has-mega .dropdown a:hover {
    background: rgba(255,122,26,0.15);
    color: var(--signal);
    text-decoration: none;
}

/* Мобильная версия меню */
@media (max-width: 980px) {
    .header-cta .phone-btn { display: none; }
    .nav-toggle { display: block; }
    nav.main-nav { display: none; }
    nav.main-nav.open { display: block; }
    nav.main-nav > .container > ul {
        flex-direction: column;
        align-items: stretch;
    }
    nav.main-nav > .container > ul > li > a {
        white-space: normal;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .has-mega .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        border-top: none;
        min-width: auto;
        max-width: none;
        padding: 0 0 0 20px;
        background: rgba(255,255,255,0.03);
        max-height: none;
        overflow-y: visible;
    }
    .has-mega .dropdown .dropdown-inner {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .has-mega .dropdown a {
        white-space: normal;
        padding: 6px 8px;
    }
    .has-mega.open .dropdown {
        display: block;
    }
}

/* Breadcrumbs */
.breadcrumbs { font-size: 13.5px; color: var(--steel); padding: 14px 0 0; }
.breadcrumbs a { color: var(--steel); }
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }

/* Hero */
.hero {
    background: var(--asphalt);
    color: var(--paper-2);
    padding: 48px 0 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 6px solid var(--signal);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(135deg, rgba(255,122,26,.06) 0 2px, transparent 2px 26px);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-end;
    justify-content: space-between;
}
.hero h1 { color: #fff; max-width: 760px; margin-bottom: 14px; }
.hero .eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--signal);
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid var(--signal);
    padding: 3px 10px;
    border-radius: var(--radius);
}
.hero p.lead { color: var(--paper-2); font-size: 18px; max-width: 640px; }

.price-tag {
    background: var(--paper);
    color: var(--asphalt);
    border-radius: var(--radius);
    padding: 18px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    border: 2px dashed var(--signal-dark);
}
.price-tag .num { font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--signal-dark); line-height: 1; }
.price-tag .unit { font-size: 13px; color: var(--steel); text-transform: uppercase; letter-spacing: .04em; }

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.hero-badges span {
    font-size: 13px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--paper-2);
}

/* Sections */
main { display: block; }
.section { padding: 44px 0; }
.section.alt { background: var(--paper-2); }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

/* Price table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.price-table th, .price-table td {
    padding: 11px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.price-table thead th {
    background: var(--paper-2);
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .03em;
    color: var(--steel);
}
.price-table td.price {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--signal-dark);
    white-space: nowrap;
    text-align: right;
}
.price-table tr:last-child td { border-bottom: none; }
@media (max-width: 600px) {
    .price-table { font-size: 13px; }
    .price-table th, .price-table td { padding: 8px 10px; }
}

/* Branches */
.branch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .branch-list { grid-template-columns: 1fr; } }
.branch {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    border-top: 3px solid var(--signal);
}
.branch h3 { margin-bottom: 4px; font-size: 16px; }
.branch .district { font-family: var(--font-mono); font-size: 12px; color: var(--signal-dark); text-transform: uppercase; }
.branch p { margin: 6px 0 0; font-size: 14.5px; color: var(--steel); }

/* FAQ */
.faq details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 14px 18px;
}
.faq summary { cursor: pointer; font-family: var(--font-display); text-transform: uppercase; font-size: 15px; letter-spacing: .01em; }
.faq details[open] summary { color: var(--signal-dark); }
.faq p { margin-top: 10px; }

/* Model grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.model-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: var(--shadow);
}
.model-card h3 { font-size: 16px; margin: 0; }
.model-card .from { font-family: var(--font-mono); color: var(--signal-dark); font-weight: 700; font-size: 14px; }
.model-card .go { margin-top: auto; font-size: 13.5px; font-family: var(--font-display); text-transform: uppercase; }

/* CTA */
.cta-band {
    background: var(--signal);
    color: #fff;
    padding: 34px 0;
    text-align: center;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band .call-btn { background: var(--asphalt); }
.cta-band .call-btn:hover { background: #000; }
.cta-band .phone-big {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 16px;
}

/* Calculator */
.calc {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.calc label {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .02em;
    display: block;
    margin: 14px 0 6px;
}
.calc select {
    width: 100%;
    max-width: 400px;
    padding: 11px 12px;
    border: 1px solid var(--steel-light);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 15px;
    background: #fff;
}
.calc .result {
    margin-top: 20px;
    padding: 18px;
    background: var(--paper-2);
    border-radius: var(--radius);
    border-left: 4px solid var(--signal);
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 16px;
}
.calc .result .sum {
    font-family: var(--font-mono);
    font-size: 30px;
    color: var(--signal-dark);
    text-transform: none;
}
.calc .disclaimer { font-size: 12.5px; color: var(--steel); margin-top: 10px; }

/* Cookie banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.92);
    color: #fff;
    padding: 18px 20px;
    text-align: center;
    z-index: 9999;
    display: none;
}
#cookie-banner .cookie-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
#cookie-banner p {
    margin: 0;
    font-size: 0.95rem;
    text-align: center;
}
#cookie-banner a { color: var(--signal); text-decoration: underline; }
#cookie-banner button {
    background: var(--signal);
    border: none;
    padding: 10px 35px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
}
#cookie-banner button:hover { background: var(--signal-dark); }
@media (max-width: 768px) {
    #cookie-banner .cookie-inner {
        flex-direction: column;
        gap: 12px;
    }
    #cookie-banner p {
        font-size: 0.85rem;
    }
    #cookie-banner button {
        width: 100%;
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Site search */
.site-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}
.site-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 15px;
    background: #fff;
}
.site-search input:focus {
    outline: 2px solid var(--signal);
}
.site-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 40;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.site-search-results.open { display: block; }
.site-search-results a {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
}
.site-search-results a:hover { background: var(--paper-2); text-decoration: none; }
.site-search-results .none { padding: 12px 14px; color: var(--steel); font-size: 14px; }

@media (max-width: 768px) {
    .site-search {
        max-width: none;
        width: 100%;
        order: 10;
        margin-top: 8px;
    }
    .site-search input {
        padding: 10px 14px;
        font-size: 16px;
    }
    .header-inner {
        flex-wrap: wrap;
    }
}

/* Footer */
footer.site-footer {
    background: var(--asphalt);
    color: var(--steel-light);
    padding: 44px 0 18px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 28px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.site-footer a { color: var(--steel-light); font-size: 14px; }
footer.site-footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 32px;
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    font-size: 12.5px;
}

/* Utilities */
.small { font-size: 13.5px; color: var(--steel); }
.mt-0 { margin-top: 0; }
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #fff;
    padding: 10px 16px;
    z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }
.tel-inline { font-family: var(--font-mono); font-weight: 700; }