/* ============================================================
   PROBEG — стили внутренних страниц и общих компонентов
   (подключается после styles.css)
   ============================================================ */

/* ---------- Выпадающие меню в шапке ---------- */
.dropdown { position: relative; }
.dropdown__toggle { display: inline-flex; align-items: center; gap: 5px; }
.dropdown__toggle svg { transition: transform .25s var(--ease); opacity: .7; }
.dropdown:hover .dropdown__toggle svg { transform: rotate(180deg); }
.dropdown.is-current > .dropdown__toggle { color: #fff; }
.dropdown.is-current > .dropdown__toggle::after { transform: scaleX(1); }
.dropdown__menu {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
    z-index: 120;
}
.dropdown::before { /* мост, чтобы курсор не терял меню */
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px;
}
.dropdown:hover .dropdown__menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown__menu a {
    display: block; padding: 11px 14px; border-radius: 9px;
    font-size: 14.5px; font-weight: 600; color: var(--muted);
    transition: background .18s, color .18s, padding-left .18s;
}
.dropdown__menu a:hover { background: var(--red-soft); color: #fff; padding-left: 18px; }

/* ---------- Хлебные крошки + шапка страницы ---------- */
.page-hero {
    --hero-img: url("../images/garage.jpg");
    position: relative;
    padding: 64px 0 52px;
    background:
        radial-gradient(900px 400px at 80% -20%, rgba(225,29,36,.24), transparent 60%),
        linear-gradient(180deg, rgba(18,21,27,.86), rgba(12,14,18,.96)),
        var(--hero-img) center/cover no-repeat;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
/* индивидуальные фоны разделов */
body[data-section="services"] .page-hero { --hero-img: url("../images/engine.jpg"); }
body[data-section="parts"]    .page-hero { --hero-img: url("../images/parts.jpg"); }
body[data-page="gbo"]         .page-hero { --hero-img: url("../images/gbo.jpg"); }
body[data-page="tires"]       .page-hero { --hero-img: url("../images/tires.jpg"); }
body[data-page="oils"]        .page-hero { --hero-img: url("../images/engine.jpg"); }
body[data-page="about"]       .page-hero { --hero-img: url("../images/garage.jpg"); }
body[data-page="contacts"]    .page-hero { --hero-img: url("../images/garage.jpg"); }
.page-hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 70% 0%, #000, transparent 70%);
}
.page-hero__inner { position: relative; z-index: 2; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted-2); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); transition: color .2s; }
.breadcrumbs a:hover { color: var(--red-2); }
.breadcrumbs span { color: var(--muted-2); }
.page-hero__tag { display: inline-block; color: var(--red-2); font-weight: 700; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 56px); text-transform: uppercase; margin-bottom: 14px; }
.page-hero__lead { color: var(--muted); font-size: 17px; max-width: 760px; }

/* ---------- Базовая секция контента ---------- */
.section { padding: 70px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--bg-2); }
.wrap-narrow { max-width: 920px; margin: 0 auto; }

/* ---------- Прайс-таблица ---------- */
.price-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.price-table caption { text-align: left; padding: 20px 24px 0; font-family: 'Oswald', sans-serif; font-size: 22px; color: #fff; }
.price-table thead th {
    text-align: left; padding: 16px 24px;
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .5px; text-transform: uppercase;
    color: var(--muted); border-bottom: 1px solid var(--line-strong); background: var(--surface-2);
}
.price-table tbody td { padding: 14px 24px; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); vertical-align: top; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.price-table td:first-child { color: var(--text); }
.price-table .price { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 16px; color: #fff; white-space: nowrap; text-align: right; }
.price-table .price-table__group td {
    background: var(--surface-2); color: var(--red-2);
    font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
}

/* ---------- Текстовый контент / статья ---------- */
.prose { color: var(--muted); font-size: 16px; line-height: 1.75; }
.prose h2 { font-size: clamp(24px, 3.2vw, 34px); color: #fff; text-transform: uppercase; margin: 40px 0 16px; }
.prose h3 { font-size: 22px; color: #fff; margin: 32px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 0; padding-left: 4px; }
.prose ul li, .prose ol li { position: relative; padding: 6px 0 6px 30px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.prose ol { counter-reset: li; }
.prose ol li { counter-increment: li; }
.prose ol li::before { content: counter(li); position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--red-soft); color: var(--red-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.prose b, .prose strong { color: var(--text); }
.prose a { color: var(--red-2); }

/* ---------- Сетка карточек-ссылок (услуги/хаб) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.link-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 30px;
    transition: transform .35s var(--ease), border-color .35s, background .35s;
}
.link-card:hover { transform: translateY(-6px); border-color: var(--line-strong); background: var(--surface-2); }
.link-card__icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-2); margin-bottom: 18px; }
.link-card h3 { font-size: 21px; margin-bottom: 10px; }
.link-card p { color: var(--muted); font-size: 14.5px; flex-grow: 1; margin-bottom: 16px; }
.link-card__more { color: var(--red-2); font-weight: 700; font-size: 14.5px; }
.link-card:hover .link-card__more { color: #fff; }

/* ---------- Карточки брендов/стран ---------- */
.brand-card { text-align: center; align-items: center; }
.brand-card .link-card__icon { width: 64px; height: 64px; font-size: 30px; }
.brand-flag { font-size: 34px; line-height: 1; }

/* ---------- Формы ---------- */
.form-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 38px;
}
.form-card h3 { font-size: 26px; margin-bottom: 8px; }
.form-card .form-card__sub { color: var(--muted); margin-bottom: 26px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .3px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 14px 16px;
    background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 11px;
    color: var(--text); font-family: inherit; font-size: 15px;
    transition: border-color .2s, background .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); background: #0e1117; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.form__success {
    display: none; margin-top: 18px; padding: 14px 18px;
    background: rgba(46,160,67,.12); border: 1px solid rgba(46,160,67,.4); border-radius: 11px;
    color: #6ee787; font-size: 14.5px;
}
.form-note { color: var(--muted-2); font-size: 12.5px; margin-top: 14px; }

/* Двухколоночный блок: контент + форма */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.split--center { align-items: center; }

/* ---------- Контактные строки ---------- */
.contact-lines { display: flex; flex-direction: column; gap: 4px; }
.contact-lines a, .contact-lines span { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--muted); }
.contact-lines b { font-family: 'Oswald', sans-serif; font-size: 18px; color: #fff; white-space: nowrap; }

/* ---------- ГБО: тарифы ---------- */
.gbo-tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tariff {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 34px 30px; text-align: center; position: relative; overflow: hidden;
    transition: transform .35s var(--ease), border-color .35s;
}
.tariff:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.tariff--featured { border-color: rgba(225,29,36,.5); background: linear-gradient(170deg, var(--surface-2), var(--surface)); }
.tariff__badge { position: absolute; top: 16px; right: -34px; transform: rotate(45deg); background: var(--red); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 5px 40px; text-transform: uppercase; }
.tariff h3 { font-size: 22px; margin-bottom: 8px; }
.tariff__price { font-family: 'Oswald', sans-serif; font-size: 40px; font-weight: 700; color: var(--red-2); margin: 14px 0; }
.tariff p { color: var(--muted); font-size: 14px; margin-bottom: 22px; min-height: 60px; }

/* ---------- ГБО: преимущества/этапы ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; position: relative; counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: 22px; right: 24px; font-family: 'Oswald', sans-serif; font-size: 46px; font-weight: 700; color: rgba(225,29,36,.18); }
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Калькулятор ГБО ---------- */
.calc { background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 38px; }
.calc__row { margin-bottom: 26px; }
.calc__row label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.calc__km-out { color: var(--red-2); font-family: 'Oswald', sans-serif; font-size: 20px; }
.calc input[type=range] { width: 100%; accent-color: var(--red); height: 6px; }
.calc__results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.calc__cell { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.calc__cell span { display: block; font-size: 13px; color: var(--muted-2); margin-bottom: 6px; }
.calc__cell b { font-family: 'Oswald', sans-serif; font-size: 24px; color: #fff; }
.calc__cell--accent { background: var(--red-soft); border-color: rgba(225,29,36,.4); }
.calc__cell--accent b { color: var(--red-2); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; transition: border-color .25s; }
.faq__item.is-open { border-color: var(--line-strong); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; cursor: pointer; font-weight: 600; font-size: 16px; color: var(--text); }
.faq__q::after { content: "+"; font-size: 24px; color: var(--red-2); transition: transform .25s; line-height: 1; }
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease), padding .35s var(--ease); padding: 0 24px; color: var(--muted); font-size: 15px; }
.faq__item.is-open .faq__a { max-height: 320px; padding: 0 24px 20px; }

/* ---------- Вакансии ---------- */
.vacancy-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.vacancy { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 20px 24px; transition: border-color .25s, transform .25s var(--ease); }
.vacancy:hover { border-color: var(--line-strong); transform: translateX(4px); }
.vacancy__icon { width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: var(--red-soft); color: var(--red-2); }
.vacancy h3 { font-size: 18px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.perk { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 14.5px; color: var(--text); }
.perk svg { color: var(--red-2); flex-shrink: 0; }

/* ---------- Новости ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), border-color .35s; }
.news-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.news-card__media { height: 180px; display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), #20140f); color: var(--red-2); }
.news-card__media svg { width: 64px; height: 64px; opacity: .8; }
.news-card__body { padding: 26px; display: flex; flex-direction: column; flex-grow: 1; }
.news-card__cat { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red-2); background: var(--red-soft); padding: 4px 12px; border-radius: 50px; margin-bottom: 14px; }
.news-card h3 { font-size: 20px; margin-bottom: 10px; }
.news-card p { color: var(--muted); font-size: 14.5px; flex-grow: 1; margin-bottom: 16px; }
.news-card__meta { color: var(--muted-2); font-size: 13px; }
.news-card__more { color: var(--red-2); font-weight: 700; font-size: 14.5px; margin-top: 12px; }

/* ---------- Директор / о сервисе ---------- */
.director { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.director__photo { width: 100%; aspect-ratio: 1; border-radius: 18px; background: radial-gradient(circle at 50% 30%, var(--surface-2), #0c0e12); border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted-2); }
.director__photo svg { width: 96px; height: 96px; opacity: .5; }
.director__name { font-family: 'Oswald', sans-serif; font-size: 26px; color: #fff; margin-bottom: 4px; }
.director__role { color: var(--red-2); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; }
.director__quote { color: var(--muted); font-size: 17px; line-height: 1.7; font-style: italic; }

/* ---------- Информационные плитки ---------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.info-tile__icon { width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-2); margin-bottom: 18px; }
.info-tile h3 { font-size: 20px; margin-bottom: 10px; }
.info-tile p { color: var(--muted); font-size: 14.5px; }

/* ---------- Лента-CTA внутри страниц ---------- */
.inline-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(135deg, var(--red), #a30f14); border-radius: var(--radius); padding: 36px 40px; }
.inline-cta h3 { color: #fff; font-size: clamp(22px, 3vw, 30px); text-transform: uppercase; }
.inline-cta p { color: rgba(255,255,255,.9); margin-top: 6px; }
.inline-cta .btn { background: #fff; color: var(--red); }
.inline-cta .btn:hover { background: #fff; transform: translateY(-3px); }

/* ---------- Единообразие кликабельных карточек ----------
   Карточки-ссылки на главной (.price-card, .parts__card, .duo__card)
   и хабах (.link-card) ведут себя одинаково: весь блок кликабелен,
   ссылка-подсказка прижата к низу. */
.price-card, .duo__card { display: flex; flex-direction: column; }
.parts__card:not(.parts__card--big) { display: flex; flex-direction: column; }
.price-card__list { flex-grow: 1; }
.price-card__more, .duo__link { margin-top: auto; }
.price-card__more { padding-top: 18px; }
.duo__link { padding-top: 16px; display: inline-block; }
.parts__card .price-card__more { padding-top: 16px; }
/* плавная подсветка стрелки-подсказки на ховер всей карточки */
.price-card:hover .price-card__more,
.parts__card:hover .price-card__more,
.duo__card:hover .duo__link { color: #fff; }

/* ---------- Адаптив внутренних страниц ---------- */
@media (max-width: 1200px) {
    .card-grid, .gbo-tariffs, .info-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .calc__results { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    /* выпадающие меню внутри мобильного оверлея */
    .dropdown { width: 100%; }
    .dropdown__toggle { width: 100%; justify-content: space-between; }
    .dropdown__menu {
        position: static; transform: none; opacity: 1; visibility: visible;
        min-width: 0; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px;
        max-height: 0; overflow: hidden; transition: max-height .3s var(--ease);
    }
    .dropdown.is-expanded .dropdown__menu { max-height: 600px; }
    .dropdown__menu a { padding: 12px 10px; border-bottom: 1px solid var(--line); }
    .dropdown::before { display: none; }
    .dropdown:hover .dropdown__toggle svg { transform: none; }
    .dropdown.is-expanded .dropdown__toggle svg { transform: rotate(180deg); }
}
@media (max-width: 820px) {
    .split { grid-template-columns: 1fr; }
    .director { grid-template-columns: 1fr; text-align: center; }
    .director__photo { max-width: 220px; margin: 0 auto; }
    .vacancy-list, .perks, .calc__results { grid-template-columns: 1fr; }
    .perks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .card-grid, .card-grid--2, .gbo-tariffs, .info-grid, .news-grid, .steps, .perks { grid-template-columns: 1fr; }
    .form-card, .calc { padding: 26px 22px; }
    .inline-cta { padding: 28px 24px; }
}
