/* Рустандарт — макет: Figma «РУСТАНДАРТ (Copy)», HomeDesktop 1440 / HomeMobile 390 */

:root {
    --c-text: #373737;
    --c-dark: #191919;
    --c-muted: #7b7b7b;
    --c-red: #de2e31;
    --c-red-light: #ea4d50;
    --c-line-red: #f50100;
    --c-gray: #7a7675;
    --c-header: #ebedee;
    --c-footer: #373737;
    --c-bg: #f8f8f8;
    --radius-card: 30px;
    --gap-section: 80px;
    --page-gutter: 50px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: normal;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Figma считает line-height «normal» Montserrat как округлённые 1.219em —
   задаём те же целые значения, чтобы высоты блоков совпадали с макетом */
.header__menu a,
.header__contacts,
.aside__menu,
.hero__text,
.news-card__date,
.footer__contact { line-height: 20px; }
.aside__title,
.news-card__title,
.service-card__title { line-height: 24px; }
.aside__menu .sub-menu,
.service-card__text,
.btn { line-height: 17px; }
.hero__title,
.section__title { line-height: 44px; }

/* ---------- Логотип: знак + три векторные части, координаты из макета (264×56) ---------- */
.logo {
    position: relative;
    display: block;
    width: 264px;
    aspect-ratio: 264 / 56;
}
.logo > *,
.logo__mark { position: absolute; }
.logo__mark { left: 0; top: 0; width: 11.115%; height: 100%; overflow: hidden; }
.logo__mark img { position: absolute; top: 0; left: -24.94%; width: 188.47%; height: 100%; max-width: none; }
.logo__top { left: 13.361%; top: 17.207%; width: 80.04%; height: 51.96%; }
.logo__bottom { left: 12.959%; top: 73.104%; width: 77.578%; height: 25.134%; }
.logo__reg { left: 95.067%; top: 11.438%; width: 4.933%; height: 12.371%; }

/* ---------- Шапка ---------- */
.header {
    position: relative;
    z-index: 20;
    width: min(1340px, 100% - 2 * var(--page-gutter));
    margin: 10px auto 0;
}
.header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 76px;
    padding: 0 20px;
    background: var(--c-header);
    border-radius: 16px;
    filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .25));
}
.header__logo { flex: none; }
.header__menu { display: flex; gap: 24px; }
.header__menu a {
    font-weight: 600;
    font-size: 16px;
    color: #000;
    white-space: nowrap;
    transition: color .2s;
}
.header__menu a:hover,
.header__menu .current-menu-item > a { color: var(--c-red); }
.header__side { display: flex; align-items: center; gap: 24px; flex: none; }
.langs { display: flex; gap: 6px; }
.langs__item {
    display: block;
    width: 24px;
    height: 18px;
    overflow: hidden;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0, 0, 0, .25);
}
.header__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}
.header__contacts a:hover { color: var(--c-red); }
.header__burger { display: none; width: 40px; height: 40px; }

.mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 27.85px rgba(0, 0, 0, .1);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list { display: flex; flex-direction: column; gap: 16px; font-weight: 600; }
.mobile-menu__list .sub-menu { margin-top: 12px; padding-left: 16px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.mobile-menu__contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--c-header);
    font-weight: 700;
}

/* ---------- Каркас: сайдбар 290 + контент 1000 ---------- */
.layout {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    width: min(1340px, 100% - 2 * var(--page-gutter));
    margin: 40px auto 0;
}
.layout__main { flex: 1; min-width: 0; max-width: 1000px; }

/* ---------- Сайдбар ---------- */
.aside { flex: none; width: 290px; display: flex; flex-direction: column; gap: 20px; }
.aside__box {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    filter: drop-shadow(0 4px 27.85px rgba(0, 0, 0, .1));
}
.aside__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -.4px;
    cursor: default;
}
.aside__arrow { display: none; transition: transform .2s; }
.aside__menu { display: flex; flex-direction: column; gap: 24px; font-weight: 600; font-size: 16px; }
.aside__menu a { transition: color .2s; }
.aside__menu a:hover,
.aside__menu .current-menu-item > a,
.aside__menu .current-menu-ancestor > a { color: var(--c-red); }
/* Подпункты видны только у раздела, в котором находится посетитель */
.aside__menu .sub-menu { display: none; flex-direction: column; gap: 10px; margin-top: 16px; font-size: 14px; }
.aside__menu .sub-menu .sub-menu { margin-top: 10px; padding-left: 14px; }
.aside__menu .current-menu-item > .sub-menu,
.aside__menu .current-menu-ancestor > .sub-menu { display: flex; }

/* ---------- Общие секции ---------- */
.section { margin-top: var(--gap-section); }
.layout__main > .section:first-child { margin-top: 0; }
.section__title {
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -.72px;
}
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 20px;
    align-items: start;
}

/* ---------- Первый экран ---------- */
.hero { display: flex; flex-direction: column; gap: 23px; }
.hero__title { font-weight: 700; font-size: 36px; letter-spacing: -.72px; }
.hero__text { font-weight: 600; font-size: 16px; }
.hero__image {
    height: 388px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 50px rgba(0, 0, 0, .25);
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }

/* Красная линия с плашкой (ServicesNavigation02) */
.divider {
    position: relative;
    height: 27px;
    margin-top: 42px;
    border-top: 3px solid var(--c-line-red);
}
.divider span {
    position: absolute;
    top: -1px;
    right: 0;
    width: 207px;
    height: 27px;
    background: var(--c-red);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 29.5px 100%);
}
.divider + .section { margin-top: 40px; }

/* ---------- Новости ---------- */
.news-card { display: flex; flex-direction: column; gap: 20px; }
.news-card__image {
    height: 189px;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 50px rgba(0, 0, 0, .15);
}
.news-card__image img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { display: flex; flex-direction: column; gap: 13px; }
.news-card__title { font-weight: 600; font-size: 20px; transition: color .2s; }
a.news-card:hover .news-card__title { color: var(--c-red); }
.news-card__date { font-weight: 400; font-size: 16px; }

/* ---------- Преимущества ---------- */
.benefits__list { display: flex; flex-direction: column; gap: 10px; }
.benefit {
    display: flex;
    gap: 20px;
    min-height: 112px;
    padding: 30px;
    border-radius: 20px;
    /* Обводка «внутрь», как в Figma — не влияет на размеры */
    box-shadow: inset 0 0 0 1px var(--c-red), 0 4px 52.3px rgba(0, 0, 0, .25);
}
.benefit .benefit__icon { margin-bottom: -2px; }
.benefit__icon,
.step__num {
    flex: none;
    display: flex;
    width: 54px;
    height: 54px;
    border-radius: 11.096px;
}
.benefit__icon {
    padding: 12.575px 11.836px 11.836px 12.575px;
    background: linear-gradient(180deg, var(--c-red), var(--c-red-light));
}
.benefit__icon img { width: 29.589px; height: 29.589px; }
.benefit__body,
.step__body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.benefit__title,
.step__title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -.6px;
    text-box: trim-both cap alphabetic;
}
.benefit__text,
.step__text {
    font-weight: 500;
    font-size: 14px;
    letter-spacing: -.42px;
    opacity: .7;
    text-box: trim-both cap alphabetic;
}

/* ---------- Направления ---------- */
.service-card { display: flex; flex-direction: column; min-height: 442px; }
.service-card__image {
    height: 207px;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 4px 50px rgba(0, 0, 0, .15);
}
.service-card__image img { width: 100%; height: 100%; object-fit: cover; }
.services .cards { align-items: stretch; }
.service-card__body { display: flex; flex-direction: column; gap: 13px; margin: 20px 0 16px; }
.service-card__title { font-weight: 600; font-size: 20px; letter-spacing: -.6px; }
.service-card__text { font-weight: 500; font-size: 14px; letter-spacing: -.28px; }
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 10px;
    background: var(--c-gray);
    border-radius: 100px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    transition: background-color .2s;
}
.btn:hover { background: var(--c-red); }
.service-card__btn { margin-top: auto; }

/* ---------- Этапы ---------- */
.process__rows { display: flex; flex-direction: column; gap: 20px; }
.process__row { display: flex; gap: 20px; }
.step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    min-width: 0;
    min-height: 239px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    filter: drop-shadow(0 4px 25px rgba(0, 0, 0, .1));
}
.process__row + .process__row .step { min-height: 202px; }
/* Второй ряд из двух карточек — пропорции 433 / 547 */
@media (min-width: 1024px) {
    .process__row + .process__row .step:first-child:nth-last-child(2) { flex: 433 1 433px; }
    .process__row + .process__row .step:last-child:nth-child(2) { flex: 547 1 547px; }
}
.step__num {
    align-items: center;
    justify-content: center;
    background: var(--c-gray);
    color: #fff;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    letter-spacing: -.72px;
}

/* ---------- Контакты ---------- */
.contacts { display: flex; gap: 20px; }
.contacts__info { flex: none; width: 320px; }
.contacts .section__title { margin-bottom: 85px; }
.contacts__list { display: flex; flex-direction: column; gap: 20px; }
.contacts__item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -.176px;
}
.contacts__label { color: var(--c-muted); line-height: 1.5; text-transform: uppercase; }
.contacts__value { color: var(--c-dark); line-height: 1.2; }
a.contacts__value:hover { color: var(--c-red); }
.socials { display: flex; gap: 4px; }
.socials__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #1f1f1f;
    border-radius: 98px;
    backdrop-filter: blur(10px);
    transition: background-color .2s;
}
.socials__item:hover { background: var(--c-red); }
.socials__item img { width: 24px; height: 24px; }
.contacts__map {
    position: relative;
    flex: 1;
    min-height: 430px;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 4px 50px rgba(0, 0, 0, .1);
}
/* Кадрирование картинки карты как в макете — с сохранением пропорций при любой высоте рамки:
   картинка заполняет рамку (cover) и увеличена в 1.43 раза к точке 94% / 82% —
   на главной (660×430) это тот же кадр, что в Figma; на странице контактов и на телефоне карта не растягивается */
.contacts__map img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 94% 82%;
    transform: scale(1.43);
    transform-origin: 94% 82%;
}
.contacts__map--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contacts__map--static img { object-fit: cover; object-position: center; transform: none; }

/* ---------- Страница / запись ---------- */
.entry { display: flex; flex-direction: column; gap: 23px; }
.entry__content { font-weight: 500; font-size: 16px; line-height: 1.5; }
.entry__content > * + * { margin-top: 1em; }
.entry__content a { color: var(--c-red); text-decoration: underline; }
.entry__content::after { content: ''; display: table; clear: both; }
.entry__content h2,
.entry__content h3 { margin-top: 1.5em; font-weight: 700; font-size: 22px; line-height: 1.25; }
.entry__content ul,
.entry__content ol { padding-left: 1.4em; }
.entry__content ul { list-style: disc; }
.entry__content img { height: auto; border-radius: 12px; }
.entry__content .alignleft { float: left; max-width: 45%; margin: 4px 24px 12px 0; }
.entry__content .alignright { float: right; max-width: 45%; margin: 4px 0 12px 24px; }
.entry__content table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.entry__content td,
.entry__content th { padding: 8px 12px; border: 1px solid #dcdcdc; vertical-align: top; }
.entry__content tr:nth-child(even) td { background: #fff; }

/* Логотипы (абзац из одних картинок, напр. «Клиенты») — сетка белых плашек */
.entry__content .logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.entry__content .logos > * {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    padding: 16px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, .1);
}
.entry__content .logos > img { width: 100%; object-fit: contain; }
.entry__content .logos a img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }

/* Маркировочные знаки — плитка карточек */
.entry__content .marks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px 20px; margin: 16px 0 24px; }
.entry__content .marks p { margin: 0; font-size: 14px; line-height: 1.35; }
.entry__content .marks img { max-height: 110px; width: auto; margin-bottom: 8px; }

/* FAQ (перенесён с rustandard.com) */
.faq { display: flex; flex-direction: column; gap: 10px; }
.entry__content .faq { margin-top: 0; }
.faq details { background: #fff; border-radius: 12px; filter: drop-shadow(0 4px 27.85px rgba(0, 0, 0, .1)); }
.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 24px; height: 24px; background: url(../img/icon-expand.svg) center / contain no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq__answer { padding: 0 20px 16px; font-size: 15px; }

.contacts--page { margin-top: 40px; }
.contacts--page .contacts__list { margin-top: 0; }

/* Пагинация */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: #fff;
    border-radius: 100px;
    font-weight: 600;
    box-shadow: 0 4px 25px rgba(0, 0, 0, .08);
}
.pagination .page-numbers.current,
.pagination a.page-numbers:hover { background: var(--c-gray); color: #fff; }

/* ---------- Подвал ---------- */
.footer { margin-top: var(--gap-section); background: var(--c-footer); color: #fff; }
.footer__main { max-width: 1440px; margin: 0 auto; padding: 44px 0 30px; }
.footer__brand { display: flex; align-items: center; gap: 26px; }
.footer__line { flex: 1; height: 2px; background: rgba(255, 255, 255, .3); }
.footer__logo .logo { width: 320.466px; }
.footer__cols { display: flex; align-items: flex-start; margin-top: 30px; padding-left: 50px; }
.footer__office { display: flex; flex-direction: column; gap: 20px; width: 433px; }
.footer__office--center { margin-left: 20px; text-align: center; }
.footer__title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    letter-spacing: -.48px;
    text-box: trim-both cap alphabetic;
}
.footer__text {
    font-weight: 500;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: -.42px;
    opacity: .7;
    text-box: trim-both cap alphabetic;
}
.footer__contacts { display: flex; flex-direction: column; width: 318px; margin-left: auto; padding-top: 10px; }
.footer__contact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    border-bottom: 2px solid rgba(255, 255, 255, .3);
}
.footer__contact + .footer__contact { margin-top: 22px; }
.footer__contact:hover { color: #fff; opacity: .8; }
.footer__phone-icon { display: flex; align-items: center; width: 32px; height: 32px; opacity: .3; }
.footer__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 50px;
    padding: 0 16px;
    background: var(--c-gray);
    font-weight: 500;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: -.42px;
    text-align: center;
}
.footer__legal > * { opacity: .7; }
.footer__legal a:hover { opacity: 1; }
.footer__sep { margin: 0 .9em; }

/* ---------- Плашка о cookie ---------- */
.cookie {
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(860px, 100% - 2 * var(--page-gutter));
    padding: 16px 16px 16px 24px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 27.85px rgba(0, 0, 0, .18);
}
.cookie[hidden] { display: none; }
.cookie__text { flex: 1; font-weight: 500; font-size: 14px; line-height: 1.4; letter-spacing: -.28px; }
.cookie__text a { color: var(--c-red); text-decoration: underline; white-space: nowrap; }
.cookie__btn { flex: none; min-width: 150px; height: 44px; padding: 10px 24px; }

/* ================= Адаптив ================= */

/* Меню шапки не помещается — бургер */
@media (max-width: 1379px) {
    .header__nav,
    .header__contacts { display: none; }
    .header__burger { display: block; }
    .header__side { gap: 16px; }
}

@media (max-width: 1279px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .footer__cols { flex-wrap: wrap; gap: 30px 20px; padding: 0 var(--page-gutter); }
    .footer__office--center { margin-left: 0; text-align: left; }
    .footer__contacts { margin-left: 0; }
}

/* Одна колонка: сайдбар превращается в аккордеоны над контентом */
@media (max-width: 1023px) {
    :root { --page-gutter: 16px; --gap-section: 60px; }
    body { background: #fff; }

    .header { margin-top: 12px; }
    .header__bar { height: 52px; padding: 0 10px; }
    .header__logo .logo { width: 153px; }

    .layout { flex-direction: column; align-items: stretch; gap: 30px; margin-top: 22px; }
    .layout__main { max-width: none; }

    .aside { width: auto; gap: 8px; }
    .aside__box { gap: 0; padding: 0; border-radius: 12px; }
    .aside__title { height: 50px; padding: 0 20px; font-size: 16px; letter-spacing: -.32px; cursor: pointer; }
    .aside__arrow { display: block; }
    .aside__menu { display: none; gap: 16px; padding: 4px 20px 20px; font-size: 14px; }
    .aside__box.is-open .aside__menu { display: flex; }
    .aside__box.is-open .aside__arrow { transform: rotate(180deg); }

    .process__row { flex-direction: column; }
    .process__row .step,
    .process__row + .process__row .step { flex: none; min-height: 0; justify-content: flex-start; gap: 40px; }

    .contacts { flex-direction: column; }
    .contacts__info { width: auto; }
    .contacts .section__title { margin-bottom: 30px; }
    .contacts__map { flex: none; min-height: 0; height: 214px; border-radius: 20px; }
}

@media (max-width: 767px) {
    .section__title { font-size: 24px; line-height: 29px; letter-spacing: -.48px; }
    .cards { grid-template-columns: 1fr; }

    .hero__title { font-size: 24px; line-height: 29px; letter-spacing: -.48px; }
    .hero__text { font-size: 14px; line-height: 17px; }
    .hero__image { height: 183px; border-radius: 20px; }

    .divider { height: 15.78px; margin-top: 30px; border-top-width: 1.337px; }
    .divider span { top: -.55px; width: 115px; height: 15px; clip-path: polygon(0 0, 100% 0, 100% 100%, 16.39px 100%); }
    .divider + .section { margin-top: 50px; }

    .benefit { min-height: 0; padding: 16px; }
    .entry__content .alignleft,
    .entry__content .alignright { float: none; max-width: 100%; margin: 0 0 16px; }
    .entry__content .logos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .entry__content .logos > * { height: 96px; padding: 12px; border-radius: 16px; }
    .service-card__image { border-radius: 20px; }

    .cookie { flex-direction: column; align-items: stretch; gap: 12px; bottom: 12px; padding: 16px; border-radius: 16px; }
    .cookie__btn { width: 100%; }

    .footer__main { padding: 39.5px 16px 38px; }
    .footer__brand { display: block; }
    .footer__line { display: none; }
    .footer__logo .logo { width: 100%; }
    .footer__cols { flex-direction: column; align-items: stretch; gap: 0; margin-top: 30px; padding: 0; }
    .footer__office { width: auto; gap: 16px; text-align: center; }
    .footer__office--center { margin-top: 30px; text-align: center; }
    .footer__contacts { width: auto; margin-top: 31px; padding-top: 0; align-items: stretch; }
    .footer__contact { justify-content: center; }
    .footer__contact--phone { height: 32px; }
    .footer__contact + .footer__contact { margin-top: 18px; padding-bottom: 0; }

    .footer__legal { flex-direction: column; gap: 24px; min-height: 139px; padding: 16px; }
    .footer__legal > * { text-box: trim-both cap alphabetic; }
    .footer__legal a:first-of-type { line-height: 16px; }
    .footer__sep { display: none; }
}

/* FAQ: даты вопроса и ответа, постраничный вывод (assets/js/main.js) */
.faq details[hidden] { display: none; }
.faq__q { display: flex; flex-direction: column; gap: 6px; }
.faq__date { color: var(--c-muted); font-weight: 500; font-size: 13px; }
.faq__answer > .faq__date { display: block; margin-bottom: 8px; }
.entry__content .faq-pages a { color: inherit; text-decoration: none; }
.faq-pages .page-numbers.prev,
.faq-pages .page-numbers.next { width: auto; padding: 0 16px; }

/* Страница «Контакты»: карта вверху рядом со списком, не растягивается на всю его высоту */
.contacts--page .contacts__map { align-self: flex-start; height: 560px; }
.contacts-extra { margin-top: 30px; }
@media (max-width: 1023px) {
    .contacts--page .contacts__map { align-self: stretch; height: 214px; }
}

/* Текст по ширине (правки клиента): абзацы страниц и новостей, ответы FAQ, тексты блоков главной.
   Переносы по словарю языка страницы (lang у <html>), чтобы в узких колонках не было больших пробелов */
.entry__content p,
.entry__content li,
.faq__answer,
.hero__text,
.benefit__text,
.service-card__text,
.step__text {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Дата актуализации внизу страницы — мельче и отдельно от текста, как на старом сайте */
.entry__content .page-updated {
    margin-top: 2em;
    color: var(--c-red);
    font-size: 13px;
    text-align: left;
}

/* «О компании»: списки со стрелками и документы с круглыми значками (inc/about-format.php) */
.entry__content ul.arrow-list { list-style: none; padding-left: 0; }
.entry__content ul.arrow-list li { position: relative; padding-left: 20px; }
.entry__content ul.arrow-list li + li { margin-top: .35em; }
.entry__content ul.arrow-list li::before { content: '»'; position: absolute; left: 2px; top: 0; color: var(--c-red); font-weight: 700; }
.entry__content ul.doc-links { list-style: none; padding-left: 0; }
.entry__content ul.doc-links li { padding: 12px 0; border-bottom: 1px solid #dcdcdc; }
.entry__content ul.doc-links li + li { margin-top: 0; }
.doc-links__size { color: var(--c-muted); white-space: nowrap; }
/* Круглый значок документа — в списке документов и у ссылок на файлы в тексте */
.entry__content .doc-links li > a:first-child,
.entry__content a.doc-link { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; }
.entry__content .doc-links li > a:first-child::before,
.entry__content a.doc-link::before {
    content: '';
    flex: none;
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--c-red);
    border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7l5 5-5 5' fill='none' stroke='%23de2e31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
    box-sizing: border-box;
}
.entry__content a.doc-link--icon { gap: 0; }

/* Маркировочные знаки — как на старом сайте: по 4 в ряд, знак в одинаковой ячейке по центру, подпись под ним по центру */
.entry__content .marks { grid-template-columns: repeat(4, 1fr); gap: 32px 20px; align-items: start; }
.entry__content .marks p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    hyphens: manual;
    -webkit-hyphens: manual;
    font-size: 13px;
    line-height: 1.35;
}
.entry__content .marks p > br { display: none; }
.entry__content .marks a:has(> img) { display: flex; align-items: center; justify-content: center; width: 100%; height: 110px; }
.entry__content .marks img { width: auto; height: auto; max-width: 100%; max-height: 110px; margin: 0; border-radius: 0; object-fit: contain; }
@media (max-width: 1023px) {
    .entry__content .marks { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .entry__content .marks { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
}

/* Картинки в тексте без обтекания (схемы, образцы знаков) — по центру, как на старом сайте */
/* :where — без веса, чтобы не перебивать сетки логотипов и знаков */
.entry__content :where(img:not(.alignleft):not(.alignright)) { margin-left: auto; margin-right: auto; }

/* Карта сайта (inc/sitemap.php) */
.sitemap h2:first-child { margin-top: 0; }
.sitemap .sitemap__list { margin-top: .6em; }
.sitemap .sitemap__list ul { margin-top: .3em; }
.sitemap li + li { margin-top: .3em; }

/* Значок статуса документа (inc/seo-extra.php) — точка в строке */
.entry__content img.status-dot { display: inline-block; width: 10px; height: 10px; margin: 0 4px 2px 2px; border-radius: 50%; vertical-align: middle; }

/* ---------- FAQ: кнопка «Задать вопрос» и окно с формой ---------- */
.faq-ask { display: inline-flex; align-self: flex-start; min-width: 220px; height: 50px; margin-bottom: 24px; padding: 10px 32px; font-size: 16px; }
.faq-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: var(--c-text);
    box-shadow: 0 4px 50px rgba(0, 0, 0, .25);
}
.faq-dialog::backdrop { background: rgba(25, 25, 25, .55); }
.faq-form { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.faq-dialog__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    color: var(--c-muted);
}
.faq-dialog__close:hover { background: var(--c-bg); color: var(--c-text); }
.faq-dialog__title { padding-right: 40px; font-weight: 700; font-size: 24px; line-height: 29px; letter-spacing: -.48px; }
.faq-dialog__note { font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--c-muted); }
.faq-form__field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.faq-form__field input,
.faq-form__field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    font: 500 16px/1.4 'Montserrat', Arial, sans-serif;
    color: var(--c-dark);
    background: #fff;
}
.faq-form__field textarea { resize: vertical; min-height: 120px; }
.faq-form__field input:focus,
.faq-form__field textarea:focus { outline: none; border-color: var(--c-gray); box-shadow: 0 0 0 3px rgba(122, 118, 117, .15); }
.faq-form__field .is-invalid,
.faq-form__check.is-invalid { border-color: var(--c-red); color: var(--c-red); }
.faq-form__check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 13px; line-height: 1.4; cursor: pointer; }
.faq-form__check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--c-red); }
.faq-form__check a { color: var(--c-red); text-decoration: underline; }
.faq-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.faq-form__msg { min-height: 0; font-weight: 600; font-size: 14px; }
.faq-form__msg:empty { display: none; }
.faq-form__msg.is-error { color: var(--c-red); }
.faq-form__msg.is-ok { color: #2e7d32; }
.faq-form__send { width: 100%; font-size: 16px; }
.faq-form__send[disabled] { opacity: .6; cursor: wait; }
.faq-form.is-sent .faq-form__field,
.faq-form.is-sent .faq-form__check,
.faq-form.is-sent .faq-form__send,
.faq-form.is-sent .faq-dialog__note { display: none; }
@media (max-width: 767px) {
    .faq-ask { align-self: stretch; width: 100%; }
    .faq-form { padding: 24px 16px 16px; }
}
