/*
 * Тема сайта ЭЛКА-Кабель (спецификация 006). Вёрстка по снимку архива 11.10.2026,
 * значения цветов, шрифтов и отступов взяты из архивного app.min.css.
 * Без Bootstrap и Swiper (research R2): сетки на flex/grid, слайдер на scroll-snap.
 * Точки перелома как в архиве: 1024, 768, 460 px.
 */

/* --- Переменные ---------------------------------------------------------- */
:root {
    --c-text: #0d0e10;
    --c-muted: rgba(13, 14, 16, .5);
    --c-faint: rgba(13, 14, 16, .4);
    --c-accent: #ff8036;
    --c-accent-hover: #f2610d;
    --c-accent-active: #913a08;
    --c-link: #ff6a14;
    --c-line: #ff7236;
    --c-bg-soft: #f4f4f6;
    --c-bg-soft-hover: #e3e4e8;
    --c-footer: #f9f9fb;
    --c-slider-panel: #8a9ac1;
    --font: "PT Root UI VF", Arial, Helvetica, sans-serif;
    --container: 1328px;
    --gap: 16px;
    --section: 110px;
    --t: .2s;
}

@font-face {
    font-family: "PT Root UI VF";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url(../fonts/PT-Root-UI_VF.woff2) format("woff2");
}

/* --- Сброс ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: 425 17px/1.35 var(--font);
    color: var(--c-text);
    background: #fff;
}
main { flex: 1 0 auto; width: 100%; }
img, svg, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-accent-hover); }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 10px; }
.muted { color: var(--c-muted); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 12px; background: #fff; }
.skip-link:focus { left: 10px; }
/* Заголовок получает фокус после кнопки «наверх» — рамка вокруг текста не нужна. */
h1[tabindex="-1"]:focus { outline: none; }

/* --- Кнопки и ссылки «больше» --------------------------------------------- */
.default-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    border: 0;
    border-radius: 2px;
    background: var(--c-accent);
    color: #fff;
    font-size: 17px;
    font-weight: 450;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--t);
}
.default-btn:hover { background: var(--c-accent-hover); color: #fff; }
.default-btn:active { background: var(--c-accent-active); }

/* Ссылка «больше …» как в архиве: компактная рамка, стрелка ↗ справа от текста */
.more {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 30px;
    padding: 8px 16px 8px 14px;
    border: 1.5px solid var(--c-line);
    border-radius: 3px;
    background: #fff;
    color: var(--c-line);
    font-size: 20px;
    font-weight: 450;
    line-height: 1;
    letter-spacing: -.03em;
}
.more::after {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    background-image: linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
    background-size: 100% 100%;
}
.more:hover { color: var(--c-accent-hover); border-color: var(--c-accent-hover); }
.more:active { color: var(--c-accent-active); }

.gl__title {
    margin: 0 0 70px;
    font-size: 41px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.04em;
}

/* --- Шапка ----------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-bg-soft); }
.header__row { display: flex; align-items: center; gap: 30px; min-height: 64px; }
.header__logo { flex: none; display: block; }
.header__logo img { display: block; }
.menu { flex: 1 1 auto; }
.menu__list { display: flex; justify-content: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.menu__item { position: relative; }
.menu__link { display: block; padding: 22px 0; font-weight: 450; letter-spacing: -.02em; }
.menu__item.is-active > .menu__link { color: var(--c-link); }
.menu__item--parent > .menu__link::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0 3px 7px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.menu__sub {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 260px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: #fff;
    box-shadow: 0 8px 24px rgba(13, 14, 16, .12);
    border-radius: 3px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.menu__item:hover > .menu__sub,
.menu__item:focus-within > .menu__sub { opacity: 1; visibility: visible; transform: none; }
.menu__sub-link { display: block; padding: 8px 16px; color: var(--c-muted); font-size: 14px; }
.menu__sub-link:hover, .menu__sub-link[aria-current] { color: var(--c-link); }
.header__callback { flex: none; }

.header__burger {
    display: none;
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 12px 10px;
    border: 0;
    background: none;
    cursor: pointer;
}
.header__burger span { display: block; height: 2px; margin: 0 0 6px; background: var(--c-text); transition: transform var(--t), opacity var(--t); }
.header__burger span:last-child { margin: 0; }
.header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu { max-height: calc(100vh - 64px); overflow-y: auto; padding: 10px 0 30px; border-top: 1px solid var(--c-bg-soft); background: #fff; }
.mobile-menu__list { margin: 0; padding: 0; list-style: none; }
.mobile-menu__link { display: block; padding: 10px 0; font-size: 21px; letter-spacing: -.03em; }
.mobile-menu__sub { margin: 0 0 8px; padding: 0 0 0 16px; list-style: none; }
.mobile-menu__sub a { display: block; padding: 6px 0; color: var(--c-muted); }
.mobile-menu__contacts { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }

/* --- Крошки и заголовок страницы -------------------------------------------- */
.breadcrumbs { margin: 30px 0 20px; }
.breadcrumbs__list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-weight: 450; letter-spacing: -.02em; color: var(--c-faint); }
.breadcrumbs__item { padding-bottom: 8px; }
.breadcrumbs__item + .breadcrumbs__item::before { content: "—"; padding: 0 .5rem; color: #909090; }
.breadcrumbs__item a { color: rgba(13, 14, 16, .6); }
.breadcrumbs__item a:hover { color: var(--c-link); }

.main-title { margin: 0 0 40px; font-size: 41px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }

/* --- Текстовая страница -------------------------------------------------------- */
.page--side { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 50px; align-items: start; }
.side-menu { position: sticky; top: 90px; }
.side-menu__list, .side-menu__sub { margin: 0; padding: 0; list-style: none; }
.side-menu__sub { padding: 4px 0 4px 16px; }
.side-menu__item a { display: block; padding: 8px 0; color: var(--c-muted); font-weight: 450; letter-spacing: -.02em; }
.side-menu__item a:hover, .side-menu__item.is-active > a, .side-menu__item.active > a { color: var(--c-link); }

/* Типографика текста из менеджера */
.content { max-width: 900px; }
.content > :first-child { margin-top: 0; }
.content p, .content ul, .content ol, .content table, .content figure, .content blockquote { margin: 0 0 1em; }
.content h2, .content h3, .content h4 { margin: 1.6em 0 .6em; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.content h2 { font-size: 29px; }
.content h3 { font-size: 23px; }
.content h4 { font-size: 19px; }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin-bottom: .35em; }
.content a { color: var(--c-link); }
.content a:hover { color: var(--c-accent-hover); text-decoration: underline; }
.content img { border-radius: 3px; }
.content figure img { display: block; }
.content figcaption { margin-top: 8px; color: var(--c-muted); font-size: 15px; }
.content blockquote { padding-left: 20px; border-left: 3px solid var(--c-line); }
.content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.content td, .content th { padding: 10px 12px; border-bottom: 1px solid #e3e4e8; text-align: left; vertical-align: top; }
.content tr:nth-child(odd) td { background: var(--c-bg-soft); }
.content iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.content hr { border: 0; border-top: 1px solid #e3e4e8; margin: 2em 0; }

/* --- Главная: первый экран ----------------------------------------------------- */
.hero { padding-top: 50px; }
.hero .container { display: flex; flex-direction: column; }
.hero__title { max-width: 1000px; margin: 24px 0 50px; font-size: 50px; font-weight: 500; line-height: .9; letter-spacing: -.05em; }
.hero .more { margin-top: 16px; }
.hero .slider.is-ready + .more { margin-top: -50px; min-height: 50px; }

/* Слайдер (R2) */
.slider { position: relative; }
.slider__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    border-radius: 4px;
}
.slider__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .slider__track { scroll-behavior: auto; } }
.slider__slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: block; color: #fff; background: var(--c-bg-soft); }
.slider__slide:hover { color: #fff; }
.slider__img { display: block; width: 100%; aspect-ratio: 13 / 4; object-fit: cover; }
.slider__text { position: absolute; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 46%; padding: 40px 40px 40px 48px; }
.slider__title { font-size: 41px; font-weight: 500; line-height: .95; letter-spacing: -.04em; }
.slider__description { font-size: 21px; font-weight: 450; line-height: 1.1; letter-spacing: -.03em; }
/* Фигура под текстом как в архиве (.background-slide:before): пятиугольник с косой правой
   гранью — сверху 55% ширины, снизу ~44%, а не затемнение всей картинки. В архиве фигура
   полупрозрачная (rgba(48,42,98,.8) при opacity .6 ≈ 48% непрозрачности), здесь тот же приём:
   сквозь неё видна фотография баннера, а над белой частью получается цвет макета. */
.slider__slide::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: rgba(35, 60, 130, .5);
    clip-path: polygon(0 0, 100% 0, calc(80% - 20px) 100%, 0 100%);
    pointer-events: none;
}
/* Стрелки, как в архиве: два круга под слайдером справа */
.slider.is-ready { padding-bottom: 66px; }
.slider__nav { position: absolute; bottom: 0; display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1.5px solid var(--c-text); border-radius: 50%; background: #fff; color: var(--c-text); cursor: pointer; transition: color var(--t), border-color var(--t), opacity var(--t); }
.slider__nav svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.slider__nav:hover { color: var(--c-accent); border-color: var(--c-accent); }
.slider__nav:disabled { opacity: .3; cursor: default; color: var(--c-text); border-color: var(--c-text); }
.slider__nav--prev { right: 80px; }
.slider__nav--next { right: 0; }

/* --- Главная: продукция ---------------------------------------------------------- */
.categories { margin-top: var(--section); }
.categories__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.categories__item {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
    min-height: 260px;
    border-radius: 4px;
    background: var(--c-bg-soft);
    overflow: hidden;
    transition: background-color var(--t);
}
.categories__item:hover { background: var(--c-bg-soft-hover); color: var(--c-text); }
.categories__item img { display: block; width: 100%; max-width: 320px; }
.categories__title { position: absolute; top: 16px; left: 16px; right: 16px; font-size: 21px; font-weight: 450; line-height: .9; letter-spacing: -.04em; }
.categories__item--all { background: var(--c-accent); color: #fff; }
.categories__item--all:hover { background: #ce5712; color: #fff; }
/* Стрелка ↗ в плитке «все категории»: уголок + диагональный штрих, как у ссылок «больше …».
   Без градиента оставался только незаконченный уголок. */
.categories__item--all::after {
    content: "";
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 18px;
    height: 18px;
    border: solid #fff;
    border-width: 2px 2px 0 0;
    background-image: linear-gradient(-45deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px));
    background-size: 100% 100%;
}

/* --- Главная: новости и кейсы ------------------------------------------------------ */
.feed { margin-top: 159px; }
.feed .container { display: flex; flex-direction: column; }
.feed__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 70px; }
.feed .more { margin-top: 0; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card__preview { display: block; overflow: hidden; border-radius: 4px; background: var(--c-bg-soft); }
.card__img { display: block; width: 100%; aspect-ratio: 425 / 300; object-fit: cover; transition: transform .4s; }
.card:hover .card__img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .card:hover .card__img { transform: none; } }
.card__title { font-size: 21px; font-weight: 450; line-height: 1.05; letter-spacing: -.03em; }
.card__date { color: var(--c-muted); font-size: 15px; }

/* --- Листинги материалов ----------------------------------------------------------- */
.listing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--gap); }
/* Медиа-центр: список «картинка слева, заголовок и дата справа», как в архиве */
.listing--rows { grid-template-columns: minmax(0, 1fr); gap: 60px; }
.listing--rows .card { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 16px var(--gap); align-items: start; }
.listing--rows .card__preview { grid-row: 1 / 3; }
.listing--rows .card__img { aspect-ratio: 420 / 290; }
.listing--rows .card__title { font-size: 27px; line-height: 1.05; letter-spacing: -.04em; }
.listing--rows .card__date { font-size: 14px; }
.side-menu__title { padding-bottom: 8px; color: var(--c-faint); font-size: 15px; }
.listing__empty { color: var(--c-muted); }
/* Кейсы: плитка 3 в ряд, картинка 646×431, без даты, заголовок оранжевый при наведении */
.card--case .card__img { aspect-ratio: 646 / 431; }
.card--case .card__title { font-weight: 500; }
.card--case:hover .card__title { color: var(--c-accent-hover); }
/* Вакансии: вводный текст, строки в рамке (название, зарплата, дата), контакты отдела кадров */
.listing__intro { max-width: 900px; margin-bottom: 48px; }
.listing__title { margin-bottom: 24px; font-size: 33px; font-weight: 450; line-height: 1.05; letter-spacing: -.04em; }
.jobs { display: flex; flex-direction: column; gap: 24px; }
.job-row { display: grid; gap: 10px; padding: 20px; border: 1px solid silver; border-radius: 5px; color: var(--c-text); transition: border-color .2s; }
.job-row--img { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 24px; }
.job-row--img .job-row__img { grid-row: 1 / 4; width: 250px; height: auto; aspect-ratio: 250 / 350; object-fit: cover; border-radius: 4px; }
.job-row:hover { border-color: var(--c-accent); color: var(--c-text); }
.job-row__title { font-size: 33px; font-weight: 450; line-height: 1.05; letter-spacing: -.04em; }
.job-row__salary { color: var(--c-link); font-size: 21px; }
.job-row__date { color: var(--c-muted); font-size: 14px; }
.hr-contacts { margin-top: 48px; padding: 24px; border-radius: 5px; background: var(--c-bg-soft); }
.hr-contacts__title { margin-bottom: 16px; font-size: 27px; font-weight: 450; line-height: 1.05; letter-spacing: -.04em; }
.hr-contacts__list { display: grid; gap: 8px; font-size: 18px; }
.hr-contacts__list dt, .hr-contacts__list dd { display: inline; margin: 0; }
.hr-contacts__list dd { font-weight: 600; }
.content--job { font-size: 21px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 48px 0 0; }
.pager__link, .pager__skip { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 4px; }
.pager__link { background: var(--c-bg-soft); }
.pager__link:hover { background: var(--c-bg-soft-hover); color: var(--c-text); }
.pager__link.is-active { background: var(--c-accent); color: #fff; }

/* --- Материал и видео ------------------------------------------------------------------ */
.article { max-width: 900px; }
.article__cover { display: block; width: 100%; height: auto; margin-bottom: 32px; border-radius: 4px; }
.article .main-title { margin-bottom: 12px; }
.article__date { display: block; margin-bottom: 32px; color: var(--c-muted); font-size: 15px; }
.video { position: relative; margin-bottom: 32px; aspect-ratio: 16 / 9; background: var(--c-bg-soft); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { margin-top: 40px; }
.gallery__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 2 * var(--gap)) / 3)); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.gallery__item { display: block; overflow: hidden; border-radius: 4px; scroll-snap-align: start; background: var(--c-bg-soft); }
.gallery__item img { display: block; width: 100%; aspect-ratio: 32 / 22; object-fit: cover; }
.gallery__dialog { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.gallery__dialog::backdrop { background: rgba(13, 14, 16, .85); }
.gallery__full { display: block; max-width: 92vw; max-height: 88vh; object-fit: contain; }
.gallery__close, .gallery__nav { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--c-text); font-size: 26px; line-height: 1; cursor: pointer; }
.gallery__close { top: -14px; right: -14px; }
.gallery__nav { top: 50%; transform: translateY(-50%); }
.gallery__nav--prev { left: 8px; }
.gallery__nav--next { right: 8px; }
.neighbors { display: flex; justify-content: space-between; gap: var(--gap); max-width: 900px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--c-bg-soft); }
.neighbors__link { max-width: 48%; color: var(--c-link); }
.neighbors__link--next { margin-left: auto; text-align: right; }

/* --- Свяжитесь с нами -------------------------------------------------------------- */
.callback { margin-top: 159px; }
.callback__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 25px 60px; }
.callback__form-title { margin-bottom: 20px; font-size: 27px; line-height: 1.05; letter-spacing: -.04em; }
.callback__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 25px; margin: 0; }
.callback__info dt, .contacts__block dt { padding-bottom: 16px; color: var(--c-muted); }
.callback__info dd, .contacts__block dd { margin: 0; font-size: 21px; line-height: 1.1; letter-spacing: -.03em; }
.callback__info dd .muted, .contacts__block dd .muted { font-size: 17px; }

/* Форма обратного звонка: поля как .form-control архива (серый фон, белый при фокусе) */
.callback-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; max-width: 640px; }
.callback-form__field { display: flex; flex-direction: column; gap: 6px; }
.callback-form__field--check { grid-column: 1 / -1; flex-flow: row wrap; align-items: flex-start; gap: 10px; }
.callback-form__label { color: var(--c-muted); }
.callback-form__input { width: 100%; box-sizing: border-box; height: 48px; padding: 12px; border: 1px solid #ced4da; border-radius: 4px; background: var(--c-bg-soft); font: inherit; color: inherit; transition: border-color var(--t), background-color var(--t); }
.callback-form__input::placeholder { color: var(--c-faint); }
/* В фокусе одна обводка — оранжевая рамка поля, как .form-control:focus в архиве.
   Глобальный :focus-visible сюда не применяется, иначе рамка и контур дают двойное кольцо. */
.callback-form__input:focus,
.callback-form__input:focus-visible { border-color: var(--c-accent-hover); background: #fff; outline: none; }
.callback-form__input[aria-invalid] { border-color: #c4271b; }
.callback-form__check { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--c-accent); }
.callback-form__check + label { flex: 1; }
.callback-form__check + label a { color: var(--c-link); text-decoration: underline; }
.callback-form__field--check .callback-form__error { flex-basis: 100%; }
.callback-form__error { margin: 0; color: #c4271b; font-size: 15px; }
.callback-form__submit { justify-self: start; min-width: 160px; }
.callback-form__submit:disabled { opacity: .6; cursor: progress; }
.callback-form__status { grid-column: 1 / -1; margin: 0; }
.callback-form__status:empty { display: none; }
.callback-form__status.is-success { color: #1d7a3a; font-size: 21px; }
.callback-form__status.is-error { color: #c4271b; }
.callback-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.callback-form noscript { grid-column: 1 / -1; }
.contacts__callback { margin: 0 0 60px; }

/* Модалка «заказать звонок» из шапки: нативный <dialog>, анимация как у галереи
   (allow-discrete + @starting-style дают плавное и открытие, и закрытие). */
.callback-dialog {
    width: min(560px, calc(100vw - 2 * var(--gap)));
    max-width: 96vw;
    max-height: 96vh;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #fff;
    color: var(--c-text);
    box-shadow: 0 24px 64px rgba(13, 14, 16, .28);
    opacity: 0;
    transform: scale(.96);
    transition: opacity .22s ease, transform .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.callback-dialog[open] { opacity: 1; transform: scale(1); }
@starting-style {
    .callback-dialog[open] { opacity: 0; transform: scale(.96); }
}
.callback-dialog::backdrop {
    background-color: rgba(13, 14, 16, 0);
    transition: background-color .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.callback-dialog[open]::backdrop { background-color: rgba(13, 14, 16, .55); }
@starting-style {
    .callback-dialog[open]::backdrop { background-color: rgba(13, 14, 16, 0); }
}
.callback-dialog__box { position: relative; padding: 32px; }
.callback-dialog__title { margin: 0 0 24px; padding-right: 52px; font-size: 27px; font-weight: 450; line-height: 1.05; letter-spacing: -.04em; }
.callback-dialog__close { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--c-bg-soft); color: var(--c-text); cursor: pointer; }
.callback-dialog__close:hover { background: var(--c-bg-soft-hover); }
/* В узком окне форма всегда в одну колонку, кнопка во всю ширину — как у секции на 460px. */
.callback-dialog .callback-form { grid-template-columns: minmax(0, 1fr); max-width: none; }
.callback-dialog .callback-form__submit { justify-self: stretch; }
@media (max-width: 460px) {
    .callback-dialog__box { padding: 24px 16px; }
    .callback-dialog__title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .callback-dialog, .callback-dialog::backdrop { transition: none; }
    .callback-dialog { transform: none; }
}

/* --- Контакты ------------------------------------------------------------------------ */
.contacts__company { margin-bottom: 40px; font-size: 27px; letter-spacing: -.04em; }
.contacts__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 25px; margin: 0 0 50px; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1.5px solid #e3e4e8;
    border-radius: 3px;
    font-size: 15px;
    letter-spacing: 0;
}
/* Логотип в ссылке: официальная марка без текста, подпись рядом */
.social__icon { display: block; flex: none; width: 20px; height: 20px; }
.social__link:hover { border-color: var(--c-line); }
.map { position: relative; display: flex; align-items: center; justify-content: center; min-height: 320px; margin-bottom: 60px; border-radius: 4px; background: var(--c-bg-soft); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Подвал ---------------------------------------------------------------------------- */
.footer { margin-top: 139px; padding: 70px 0 27px; background: var(--c-footer); }
.footer__partners { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap); padding-bottom: 70px; }
.footer__title { font-size: 41px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 25px; margin: 0; padding: 0; list-style: none; }
.partners img { display: block; max-height: 60px; width: auto; filter: grayscale(100%); opacity: .8; transition: filter var(--t), opacity var(--t); }
.partners a:hover img, .partners a:focus-visible img { filter: none; opacity: 1; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr; gap: 30px var(--gap); padding-bottom: 50px; }
.footer__logo img { display: block; margin-bottom: 20px; }
.footer__note { margin: 0; font-weight: 450; letter-spacing: -.02em; color: var(--c-muted); }
.footer__menu-title { padding-bottom: 24px; font-size: 27px; line-height: 1.05; letter-spacing: -.04em; }
.footer__menu ul { margin: 0; padding: 0; list-style: none; }
.footer__menu li { padding-bottom: 12px; }
.footer__menu a { font-weight: 450; letter-spacing: -.02em; color: var(--c-muted); }
.footer__menu a:hover { color: var(--c-link); }
.footer__contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer__contacts .footer__menu-title:not(:first-child) { margin-top: 24px; }
.footer__contacts .phone { font-size: 21px; letter-spacing: -.03em; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: 14px; color: var(--c-muted); }
.footer__policies { display: flex; flex-wrap: wrap; gap: 8px 24px; }

.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c-accent);
    box-shadow: 0 4px 12px rgba(13, 14, 16, .2);
}
.to-top::before { content: ""; position: absolute; top: 55%; left: 50%; width: 12px; height: 12px; border: solid #fff; border-width: 2px 2px 0 0; transform: translate(-50%, -50%) rotate(-45deg); }
.to-top:hover { background: var(--c-accent-hover); }

/* --- Адаптив -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .menu__list { gap: 18px; }
    .header__row { gap: 20px; }
}

@media (max-width: 1024px) {
    :root { --section: 80px; }
    .menu, .header__callback { display: none; }
    .header__burger { display: block; }
    .categories__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .slider__title { font-size: 34px; }
    .slider__description { font-size: 17px; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .page--side { grid-template-columns: 220px minmax(0, 1fr); gap: 30px; }
    .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    :root { --section: 60px; }
    .gl__title, .main-title, .footer__title { font-size: 32px; margin-bottom: 40px; }
    .hero { padding-top: 20px; }
    .listing { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .listing--rows .card { grid-template-columns: minmax(0, 1fr); }
    .listing--rows .card__preview { grid-row: auto; }
    .listing--rows .card__title { font-size: 21px; }
    .job-row--img { grid-template-columns: minmax(0, 1fr); }
    .job-row--img .job-row__img { grid-row: auto; width: 100%; max-width: 250px; }
    .job-row__title, .listing__title { font-size: 25px; }
    .job-row__salary, .content--job { font-size: 18px; }
    .hr-contacts__list { font-size: 16px; }
    .gallery__track { grid-auto-columns: 80%; }
    .gallery__close { top: 8px; right: 8px; }
    .neighbors { flex-direction: column; }
    .neighbors__link { max-width: none; }
    .article .main-title { margin-bottom: 12px; }
    .hero__title { font-size: 36px; margin-bottom: 30px; }
    .slider__img { aspect-ratio: 4 / 3; }
    .slider__text { max-width: none; padding: 20px 24px 24px; justify-content: flex-end; }
    .slider__title { font-size: 28px; }
    .slider__nav { width: 44px; height: 44px; }
    .slider__nav--prev { right: 60px; }
    .slider.is-ready { padding-bottom: 58px; }
    /* На телефоне фигура занимает низ кадра и срезана по диагонали сверху. */
    .slider__slide::before { top: auto; bottom: 0; width: 100%; height: 68%; clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%); }
    .categories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .categories__item { min-height: 200px; }
    .categories__title { font-size: 17px; }
    .feed, .callback { margin-top: 100px; }
    .feed__grid { grid-template-columns: minmax(0, 1fr); margin-bottom: 40px; }
    .callback__grid, .contacts__grid { grid-template-columns: minmax(0, 1fr); }
    .contacts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer { margin-top: 90px; padding-top: 50px; }
    .footer__partners { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; }
    .partners { gap: 18px; }
    .partners img { max-height: 44px; }
    .page--side { grid-template-columns: minmax(0, 1fr); }
    .side-menu { position: static; padding: 10px 16px; border-radius: 4px; background: var(--c-bg-soft); }
    .content h2 { font-size: 25px; }
}

@media (max-width: 460px) {
    .hero__title { font-size: 30px; }
    .categories__grid { gap: 10px; }
    .categories__item { min-height: 160px; }
    .callback__info, .contacts__grid, .footer__grid { grid-template-columns: minmax(0, 1fr); }
    .callback-form { grid-template-columns: minmax(0, 1fr); }
    .callback-form__submit { justify-self: stretch; }
    .more { font-size: 19px; }
}

@media print {
    .header, .footer, .side-menu, .to-top, .slider__nav { display: none !important; }
}

/* --- Новая шапка: статичная, две строки -------------------------------- */
.header { position: static; border-bottom: 0; }
.header__bar { border-top: 1px solid var(--c-bg-soft); border-bottom: 1px solid var(--c-bg-soft); background: #fff; }
.header__bar-row { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.header__catalog { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 16px; border-radius: 3px; background: var(--c-accent); color: #fff; font-weight: 500; text-decoration: none; transition: background-color var(--t); }
.header__catalog:hover, .header__catalog:focus, .header__catalog:focus-visible, .header__catalog:active, .header__catalog:visited { color: #fff; }
.header__catalog:hover { background: var(--c-accent-hover); }
.header__search { position: relative; flex: 1 1 auto; display: flex; align-items: center; min-width: 0; background: var(--c-bg-soft); border-radius: 3px; }
.header__search-input { flex: 1 1 auto; min-width: 0; padding: 11px 12px; border: 0; background: transparent; font: inherit; color: inherit; outline: none; }
.header__search-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 42px; border: 0; background: transparent; color: var(--c-muted); cursor: pointer; }
.header__search-btn:hover { color: var(--c-accent); }
.header__suggest { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 60; background: #fff; border: 1px solid var(--c-bg-soft); border-radius: 3px; box-shadow: 0 8px 24px rgba(13,14,16,.12); max-height: 320px; overflow: auto; }
.header__suggest-item { display: block; padding: 9px 14px; color: inherit; text-decoration: none; }
.header__suggest-item:hover, .header__suggest-item:focus { background: var(--c-bg-soft); }
.header__suggest-empty { padding: 10px 14px; color: var(--c-muted); font-size: 14px; }
.header__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.header__action { display: inline-flex; align-items: center; gap: 6px; padding: 9px 10px; color: inherit; text-decoration: none; border-radius: 3px; font-size: 14px; }
.header__action:hover { color: var(--c-accent); }
.header__action svg { flex: none; }
/* Корзина в шапке: зелёная иконка и счётчик, когда в заявке есть позиции (ставит cart.js). */
.header__action--icon { position: relative; }
.header__action--icon.has-cart { color: #00c771; }
.header__action--icon.has-cart:hover { color: #00b365; }
.header__action--icon.has-cart::after { content: attr(data-cart-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #00c771; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.header__action--icon.has-fav { color: #ff6a14; }
.header__action--icon.has-fav:hover { color: #e25508; }
.header__action--icon.has-fav::after { content: attr(data-fav-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #ff6a14; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.header__action--icon.has-cmp::after { content: attr(data-cmp-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #1b1f24; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
/* Те же значки и счётчики в мобильном ряду шапки. */
.header__mobile-btn { position: relative; }
.header__mobile-btn.has-fav { color: #ff6a14; }
.header__mobile-btn.has-fav::after { content: attr(data-fav-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #ff6a14; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.header__mobile-btn.has-cmp::after { content: attr(data-cmp-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #1b1f24; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 1024px) { .header__action span { display: none; } }
@media (max-width: 860px) { .header__bar { display: none; } }

/* Меню ближе к логотипу, выпадашки поверх второй строки, фокус поиска как в каталоге. */
.header__row { position: relative; z-index: 2; }
.menu { margin-left: -8px; }
.menu__list { justify-content: flex-start; gap: 20px; }
.menu__link { font-size: 15px; }
.menu__sub { z-index: 70; }
.header__search:focus-within { outline: none; box-shadow: inset 0 0 0 2px #ff6a14; }
.header__search-input:focus, .header__search-input:focus-visible { outline: none; }

/* Пункты меню в одну строку, компактнее — помещаются все 9. */
.menu__list { gap: 14px; }
.menu__link { font-size: 14px; white-space: nowrap; }
.menu__item--parent > .menu__link::after { margin: 0 0 2px 4px; }

/* Мега-меню каталога (по клику на «Каталог») */
.header { position: relative; }
.header__mega { position: absolute; left: 0; right: 0; top: 100%; z-index: 80; display: none; max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; padding: 26px 0; background: #fff; border-top: 1px solid var(--c-bg-soft); box-shadow: 0 20px 44px rgba(13,14,16,.12); }
.header.is-mega-open .header__mega { display: block; }
.header__mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 96px; }
.header__mega-col { min-width: 0; }
.header__mega-title { display: block; margin-bottom: 20px; font-weight: 400; font-size: 20px; line-height: 1.25; color: inherit; text-decoration: none; }
.header__mega-photo { display: block; width: 50%; max-width: 220px; aspect-ratio: 4 / 1; margin-bottom: 16px; overflow: hidden; border-radius: 4px; background: var(--c-bg-soft); }
.header__mega-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.header__mega-name { display: block; }
.header__mega-title:hover { color: #ff6a14; }
.header__mega-list { margin: 0; padding: 0; list-style: none; }
.header__mega-list li + li { margin-top: 16px; }
.header__mega-list a { display: block; padding: 0; color: var(--c-muted); font-size: 15px; line-height: 1.5; text-decoration: none; }
.header__mega-list a:hover { color: #ff6a14; }
@media (max-width: 1024px) { .header__mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Поиск: убираем остаточную системную обводку (двойная рамка) — рамка только на самом поле. */
.header__search { outline: none; }
.header__search-input { -webkit-appearance: none; appearance: none; }
.header__search-input:focus, .header__search-input:focus-visible { outline: none !important; box-shadow: none; }
.header__search:focus-within { outline: none !important; box-shadow: inset 0 0 0 2px #ff6a14; }

/* Боковое меню раздела: у пунктов со вторым уровнем — стрелка свернуть/развернуть. */
.side-menu__item--parent { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:8px; }
.side-menu__item--parent > a { grid-column:1; }
.side-menu__item--parent > .side-menu__sub { grid-column:1 / -1; }
.side-menu__item--parent > .side-menu__toggle { grid-column:2; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; margin:4px 0 0; padding:0; border:0; border-radius:3px; background:transparent; color:var(--c-muted); cursor:pointer; }
.side-menu__item--parent > .side-menu__toggle:hover { color:var(--c-accent); }
.side-menu__item--parent > .side-menu__toggle:focus-visible { outline:2px solid var(--c-accent); outline-offset:2px; }
.side-menu__item--parent > .side-menu__toggle svg { display:block; transition:transform .2s ease; }
.side-menu__item--parent > .side-menu__toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.side-menu__item--parent.is-collapsed > .side-menu__sub { display:none; }

/* Галерея материала как слайдер: лента со снапом, счётчик слева и стрелки справа под лентой —
   то же управление, что у слайдера на главной странице. */
.gallery__viewport { position: relative; }
.gallery__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.gallery__arrows { display: flex; align-items: center; gap: 10px; }
.gallery__arrow { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--c-text, #1b1f24); border-radius: 50%; background: #fff; color: var(--c-text, #1b1f24); font-size: 19px; line-height: 1; cursor: pointer; transition: color .15s ease, border-color .15s ease, opacity .15s ease; }
.gallery__arrow:hover { color: var(--c-accent); border-color: var(--c-accent); }
.gallery__arrow:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.gallery__arrow:disabled { opacity: .3; cursor: default; }
.gallery__counter { margin: 0; color: var(--c-muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Заглушка обложки материала: то же соотношение, что у карточки, без «прыжка» текста. */
.article__cover--empty { object-fit: cover; background: var(--c-bg-soft, #f4f4f6); }

/* Слайдер материала: крупнее кадры, скругления, мягкая тень и зум по наведению. */
.gallery { margin-top: 48px; }
.gallery__track { grid-auto-columns: minmax(240px, calc((100% - 2 * var(--gap)) / 2.35)); gap: calc(var(--gap) + 4px); padding: 4px 4px 12px; scroll-padding-left: 4px; scrollbar-width: none; cursor: grab; }
.gallery__track::-webkit-scrollbar { display: none; }
/* Пока ленту тянут, снап и плавная прокрутка выключены — иначе кадры «вырываются» из-под курсора. */
.gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.gallery__item { border-radius: 10px; background: var(--c-bg-soft); box-shadow: 0 1px 3px rgba(13, 14, 16, .07); }
.gallery__item img { aspect-ratio: 32 / 21; transition: transform .45s ease; }
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .gallery__item img { transition: none; } .gallery__item:hover img { transform: none; } }
/* Картинки, которые остаются в тексте: клик открывает полный размер. Лента при этом скрыта. */
.content__zoom { cursor: zoom-in; }
.gallery--lightbox { margin-top: 0; }
.gallery--lightbox .gallery__viewport,
.gallery--lightbox .gallery__footer { display: none; }

/* Плавное открытие/закрытие просмотра и смена кадра.
   allow-discrete + @starting-style дают анимацию и при закрытии нативного <dialog>. */
.gallery__dialog {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .22s ease, transform .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.gallery__dialog[open] { opacity: 1; transform: scale(1); }
@starting-style {
  .gallery__dialog[open] { opacity: 0; transform: scale(.96); }
}
.gallery__dialog::backdrop {
  background: rgba(13, 14, 16, 0);
  transition: background-color .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.gallery__dialog[open]::backdrop { background: rgba(13, 14, 16, .85); }
@starting-style {
  .gallery__dialog[open]::backdrop { background: rgba(13, 14, 16, 0); }
}
.gallery__full { transition: opacity .2s ease, transform .2s ease; }
.gallery__full.is-switching { opacity: .25; transform: scale(.985); }
@media (prefers-reduced-motion: reduce) {
  .gallery__dialog, .gallery__dialog::backdrop, .gallery__full { transition: none; }
  .gallery__dialog { transform: none; }
}

/* --- Форма резюме на странице вакансии ------------------------------------------------ */
.job-resume { max-width: 820px; margin-top: 56px; }
.job-resume__title { margin: 0 0 24px; font-size: 27px; font-weight: 450; line-height: 1.05; letter-spacing: -.04em; }
.resume-form { display: grid; gap: 16px; padding: 32px; border-radius: 5px; background: var(--c-bg-soft); }
.resume-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.resume-form__file {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px dashed #b9c0cc;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.resume-form__file:focus-visible { border-color: var(--c-accent-hover); outline: 2px solid var(--c-accent); outline-offset: 2px; }
.resume-form__file::file-selector-button {
    margin-right: 12px;
    padding: 8px 16px;
    border: 0;
    border-radius: 3px;
    background: var(--c-accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
    transition: background-color var(--t);
}
.resume-form__file::file-selector-button:hover { background: var(--c-accent-hover); }
.resume-form__hint { margin: 0; color: var(--c-muted); font-size: 15px; }
.resume-form__status { margin: 0; }
.resume-form__status:empty { display: none; }
.resume-form__status.is-success { color: #1d7a3a; font-size: 21px; }
.resume-form__status.is-error { color: #c4271b; }
.job-resume .hr-contacts { margin-top: 24px; background: #fff; }
@media (max-width: 768px) {
    .job-resume { margin-top: 40px; }
    .resume-form { padding: 20px; }
    .resume-form__grid { grid-template-columns: minmax(0, 1fr); }
}
/* --- Каталоги и документы: карточки файлов ------------------------------------------- */
/* Сетка подстраивается под ширину: одна карточка (сертификат) не растягивается на пол-экрана */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; margin-top: 40px; }
.catalog-card { display: flex; flex-direction: column; gap: 16px; }
.catalog-card__cover { display: block; overflow: hidden; border-radius: 4px; background: var(--c-bg-soft); }
.catalog-card__cover img { display: block; width: 100%; height: auto; aspect-ratio: 26 / 34; object-fit: cover; transition: transform .4s; }
.catalog-card:hover .catalog-card__cover img { transform: scale(1.03); }
.catalog-card__stub { display: flex; align-items: center; justify-content: center; aspect-ratio: 26 / 34; border: 1px dashed #ced4da; border-radius: 4px; color: var(--c-muted); font-size: 21px; letter-spacing: .04em; }
.catalog-card__body { display: flex; flex-direction: column; gap: 6px; }
.catalog-card__title { margin: 0; font-size: 21px; font-weight: 450; line-height: 1.1; letter-spacing: -.03em; }
.catalog-card__title a { color: var(--c-text); }
.catalog-card__title a:hover { color: var(--c-link); }
.catalog-card__file { margin: 0; color: var(--c-muted); font-size: 15px; overflow-wrap: anywhere; }
.catalog-card__meta { margin: 0; color: var(--c-link); font-size: 15px; }
.catalog-card__meta--empty { color: #c4271b; }

.catalog-page { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 24px; }
.catalog-page__cover { display: block; width: 100%; height: auto; border-radius: 4px; }
.catalog-page__body { max-width: 780px; }
.catalog-page__meta { margin: 0 0 24px; color: var(--c-muted); font-size: 17px; overflow-wrap: anywhere; }
.catalog-page__meta--empty { color: #c4271b; }
.catalog-page__download { margin-bottom: 32px; }
@media (max-width: 768px) {
    .catalog-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .catalog-page { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .catalog-page__cover { max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) { .catalog-card:hover .catalog-card__cover img { transform: none; } }.catalog-card__download { align-self: flex-start; margin-top: 4px; padding: 8px 16px; border: 1.5px solid var(--c-line); border-radius: 3px; color: var(--c-line); font-size: 17px; line-height: 1; transition: color var(--t), border-color var(--t); }
.catalog-card__download:hover { color: var(--c-accent-hover); border-color: var(--c-accent-hover); }.catalog-page--no-cover { grid-template-columns: minmax(0, 1fr); }
.catalog-page--no-cover .catalog-page__body { max-width: 820px; }
/* --- Согласие на cookie ---------------------------------------------------------------- */
.consent { position: fixed; left: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80; width: min(560px, calc(100% - 48px)); }
.consent[hidden], .consent [hidden] { display: none; }
.consent__box { padding: 20px 22px 18px; border-radius: 5px; background: #fff; box-shadow: 0 20px 50px -16px rgba(13, 14, 16, .35); }
.consent__title { margin: 0 0 6px; font-size: 21px; font-weight: 450; line-height: 1.2; letter-spacing: -.03em; }
.consent__text { margin: 0; color: var(--c-muted); font-size: 15px; line-height: 1.5; }
.consent__text a { color: var(--c-link); text-decoration: underline; text-underline-offset: 2px; }
.consent__options { display: grid; gap: 10px; margin-top: 14px; }
.consent__option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 4px; background: var(--c-bg-soft); cursor: pointer; }
.consent__option input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--c-accent); }
.consent__option b { display: block; font-size: 15px; font-weight: 450; }
.consent__option small { display: block; margin-top: 2px; color: var(--c-muted); font-size: 13px; line-height: 1.4; }
.consent__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.consent__btn { flex: 0 1 auto; min-height: 44px; padding: 0 18px; white-space: nowrap; }
.consent__btn--ghost { flex: 0 1 auto; min-height: 44px; padding: 0 16px; white-space: nowrap; border: 1.5px solid var(--c-line); border-radius: 3px; background: #fff; color: var(--c-line); font: inherit; font-size: 15px; cursor: pointer; transition: color var(--t), border-color var(--t); }
.consent__btn--ghost:hover { color: var(--c-accent-hover); border-color: var(--c-accent-hover); }
.consent__link { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--c-link); font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.consent__link:hover { color: var(--c-accent-hover); }
/* Кнопка «наверх» поднимается над баннером */
html.consent-on .to-top { bottom: calc(var(--consent-h, 0px) + 20px); }
@media (max-width: 768px) {
    .consent { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: auto; }
    .consent__box { padding: 16px 16px 14px; }
    .consent__text { font-size: 14px; }
    .consent__btn, .consent__btn--ghost { min-width: 0; font-size: 14px; }
}/* Кнопка «Настройки cookie» в подвале выглядит как ссылка рядом с политиками */
.footer__cookie-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.footer__cookie-btn:hover { color: var(--c-link); }
/* --- Мобильное меню и каталог в шапке ------------------------------------------------ */
/* Пока открыто мобильное меню, страница под ним не прокручивается. */
html.is-menu-open { overflow: hidden; }
.mobile-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-menu__toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1.5px solid #dcdcde; border-radius: 50%; background: #fff; color: var(--c-text, #1b1f24); cursor: pointer; }
.mobile-menu__toggle svg { transition: transform .2s ease; }
.mobile-menu__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-menu__toggle:hover { color: #ff6a14; border-color: #ff6a14; }
.mobile-menu__toggle:focus-visible { outline: 2px solid #ff6a14; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .mobile-menu__toggle svg { transition: none; } }

/* Каталог в шапке: на телефоне у каждой категории своя кнопка сворачивания. */
.header__mega-row { display: flex; align-items: flex-start; gap: 12px; }
.header__mega-row .header__mega-title { flex: 1 1 auto; }
.header__mega-toggle { display: none; }
@media (max-width: 1024px) {
  /* На телефоне каталог в шапке — список строк: фото, название, кнопка ветки */
  .header__mega-grid { grid-template-columns: 1fr; gap: 0; }
  .header__mega { padding: 8px 0 16px; }
  .header__mega-col { padding: 10px 0; border-top: 1px solid var(--c-bg-soft); }
  .header__mega-col:first-child { border-top: 0; }
  .header__mega-row { align-items: center; gap: 10px; }
  .header__mega-row .header__mega-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 17px; line-height: 1.25; }
  .header__mega-photo { flex: none; width: 84px; max-width: none; margin: 0; aspect-ratio: 4 / 2.4; }
  .header__mega-list { padding: 6px 0 2px 96px; }
  .header__mega-list li + li { margin-top: 10px; }
  .header__mega-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; margin: 0; padding: 0; border: 1.5px solid #dcdcde; border-radius: 50%; background: #fff; color: var(--c-text, #1b1f24); cursor: pointer; }
  .header__mega-toggle svg { transition: transform .2s ease; }
  .header__mega-col.is-collapsed .header__mega-toggle svg { transform: rotate(-90deg); }
  .header__mega-col.is-collapsed .header__mega-list { display: none; }
  .header__mega-toggle:hover { color: #ff6a14; border-color: #ff6a14; }
  .header__mega-toggle:focus-visible { outline: 2px solid #ff6a14; outline-offset: 2px; }
}
/* Пока открыто мобильное меню, баннер cookie не перекрывает пункты. */
html.is-menu-open .consent { display: none; }

/* --- Телефон: иконки поиска, кабинета и заявки в первой строке шапки ------------- */
.header__mobile-actions { display: none; align-items: center; gap: 2px; margin-left: auto; }
.header__mobile-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--c-text, #1b1f24); cursor: pointer; }
.header__mobile-btn:hover { color: #ff6a14; }
.header__mobile-btn:focus-visible { outline: 2px solid #ff6a14; outline-offset: 2px; }
/* Та же зелёная иконка заявки с числом позиций на телефоне. */
.header__mobile-btn { position: relative; }
.header__mobile-btn.has-cart { color: #00c771; }
.header__mobile-btn.has-cart:hover { color: #00b365; }
.header__mobile-btn.has-cart::after { content: attr(data-cart-count); position: absolute; top: -2px; right: -2px; min-width: 12px; height: 12px; padding: 0 3px; box-sizing: border-box; border-radius: 999px; background: #00c771; color: #fff; font-size: 8px; font-weight: 600; line-height: 12px; text-align: center; box-shadow: 0 0 0 1.5px #fff; }
.header__mobile-search { border-top: 1px solid var(--c-bg-soft); background: #fff; padding: 8px 0 12px; }
.header__mobile-search[hidden] { display: none; }
.header__mobile-search-close { flex: none; width: 40px; height: 42px; padding: 0; border: 0; background: transparent; color: var(--c-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.header__mobile-search-close:hover { color: #ff6a14; }
@media (max-width: 860px) {
  .header__mobile-actions { display: flex; }
  .header__row { gap: 6px; }
  .header__logo img { width: 130px; height: auto; }
}
@media (min-width: 861px) { .header__mobile-search { display: none; } }

/* Мобильная кнопка «заказать звонок»: открывает модалку [data-callback-open] на узких экранах. */
.call-fab { display: none; }
@media (max-width: 768px) {
  .call-fab { display: inline-flex; position: fixed; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 55; align-items: center; justify-content: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: #ff6a14; color: #fff; box-shadow: 0 8px 24px -6px rgba(13, 14, 16, .45); cursor: pointer; }
  .call-fab:hover { background: #e25508; }
  .call-fab:focus-visible { outline: 3px solid #1b1f24; outline-offset: 2px; }
  html.consent-on .call-fab { bottom: calc(var(--consent-h, 0px) + 14px); }
}

/* Общие всплывающие уведомления: корзина, формы, кабинет. */
.toast-stack { position: fixed; left: 24px; bottom: 24px; z-index: 1200; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-left: 3px solid #ff782b; border-radius: 4px; background: #1b1f24; color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .2); font-size: 15px; line-height: 1.35; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: auto; cursor: pointer; }
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-success { border-left-color: #00c771; }
.toast.is-error { border-left-color: #c4271b; }
.toast p { flex: 1; margin: 0; }
.toast a { flex: none; color: #ffb27a; white-space: nowrap; }
.toast a:hover { color: #ffd0a8; }
@media (max-width: 600px) { .toast-stack { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; transform: none; } }