/* Heidel theme — дизайн по макету Kimi_Agent_Редизайн heidel.ru.
   Палитра: антрацит + красный/золото немецкого флага. Шрифты: Onest + Playfair Display (self-host). */

:root {
    --anthracite: #3a3a3d;
    --anthracite-2: #2e2e31;
    --brand-red: #d1232a;
    --brand-red-soft: #e41138;
    --brand-gold: #fcdb00;
    --slate: #6c7f93;
    --slate-soft: #8d9caa;
    --paper: #ffffff;
    --panel: #f4f4f5;
    --line: #e3e3e6;
    --text: #404040;
    --text-soft: #6b6b70;
    --radius: 14px;
    --shadow: 0 18px 40px -24px rgba(46, 46, 49, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Onest', Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--paper);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-red); text-decoration: none; transition: color .25s; }
a:hover { color: var(--brand-red-soft); }
.wrap { max-width: 1344px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ===== полоска флага ===== */
.flag-strip { height: 12px; background: url('../img/flag-strip.webp') center/cover no-repeat; }

/* ===== топбар ===== */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; min-height: 52px; flex-wrap: wrap; font-size: 14px; }
.topbar a { color: var(--text-soft); }
.topbar a:hover { color: var(--brand-red); }
.topbar .spacer { flex: 1; }
.topbar .contacts { display: flex; align-items: center; gap: 18px; font-weight: 500; }
.topbar .contacts a { color: var(--anthracite); font-weight: 600; }
.callback-link { cursor: pointer; border-bottom: 1px dashed var(--brand-red); color: var(--brand-red); }

/* ===== шапка ===== */
.site-header { padding: 34px 0 26px; background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 18px; }
.brand img { width: 92px; height: 92px; }
.brand .name { font-size: 34px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.brand .name a { color: var(--anthracite); }
.brand .tag { font-size: 14px; color: var(--slate); max-width: 420px; line-height: 1.5; }
.header-cta { margin-left: auto; }
.btn {
    display: inline-block; background: var(--brand-red); color: #fff;
    padding: 14px 30px; border: none; border-radius: 8px;
    font: 600 15px/1 'Onest', Arial, sans-serif; cursor: pointer;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), background .25s, box-shadow .25s;
    box-shadow: 0 12px 24px -14px rgba(209, 35, 42, .55);
}
.btn:hover { background: var(--brand-red-soft); color: #fff; transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

/* ===== главное меню ===== */
.mainnav { background: var(--anthracite); position: sticky; top: 0; z-index: 50; }
.mainnav .wrap { display: flex; align-items: center; }
.mainnav ul { display: flex; list-style: none; flex-wrap: wrap; margin: 0; padding: 0; }
.mainnav a {
    display: block; color: #f2f2f4; padding: 16px 26px; font-size: 15px; font-weight: 500;
    transition: background .25s, color .25s;
}
.mainnav a:hover, .mainnav li.current-menu-item a, .mainnav li.current_page_item a { background: var(--brand-red); color: #fff; }
.mainnav .burger { display: none; background: none; border: none; color: #fff; padding: 16px; cursor: pointer; }
.mainnav .burger svg { width: 26px; height: 26px; }

/* ===== hero ===== */
.hero { position: relative; overflow: hidden; background: var(--anthracite-2); }
.hero img { width: 100%; height: auto; min-height: 260px; object-fit: cover; display: block; }
.hero-caption { display: none; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(46, 46, 49, .35)); pointer-events: none; }
@media (max-width: 768px) {
    .hero { min-height: 300px; }
    .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 88% 30%; opacity: .32; }
    .hero-caption {
        display: block; position: relative; z-index: 2; padding: 56px 28px; max-width: 520px;
        color: #fff; font-family: 'Playfair Display', Georgia, serif;
    }
    .hero-caption h3 { font-size: 22px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
    .hero-caption p { font-style: italic; font-size: 16px; line-height: 1.7; margin: 0; }
}

/* ===== фичи (Новости/Информация/Отзывы) ===== */
.features { padding: 64px 0 8px; }
.features .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.feature {
    background: var(--panel); border-radius: var(--radius); padding: 34px 30px;
    border-top: 4px solid transparent; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-top-color: var(--brand-red); }
.feature img { width: 74px; height: 74px; object-fit: cover; border-radius: 50%; margin-bottom: 18px; }
.feature h3 { font-size: 21px; color: var(--anthracite); margin: 0 0 10px; font-weight: 600; }
.feature p { font-size: 15px; color: var(--text-soft); margin: 0; }

/* ===== раскладка: каталог слева, контент справа ===== */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; padding: 52px 0 64px; align-items: start; }

/* ===== каталог услуг (сайдбар-аккордеон) ===== */
.catalog { background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.catalog__head {
    font-size: 18px; font-weight: 600; color: #fff; background: var(--anthracite);
    padding: 16px 22px; margin: 0; display: flex; justify-content: space-between; align-items: center;
}
.catalog__head .chev { width: 9px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); transition: transform .3s; flex: none; }
.catalog .group { border-bottom: 1px solid var(--line); }
.catalog .group__btn {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    padding: 14px 22px; font: 500 15px/1.4 'Onest', Arial, sans-serif; color: var(--anthracite);
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    transition: color .25s, background .25s;
}
.catalog .group__btn:hover { color: var(--brand-red); background: #fff; }
.catalog .group__btn .chev { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--slate-soft); border-bottom: 2px solid var(--slate-soft); transform: rotate(45deg); transition: transform .3s; }
.catalog .group.open > .group__btn { color: var(--brand-red); }
.catalog .group.open > .group__btn .chev { transform: rotate(-135deg); border-color: var(--brand-red); }
.catalog ul { list-style: none; margin: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.catalog .group.open ul { max-height: 700px; }
.catalog ul a {
    display: block; padding: 9px 22px 9px 38px; font-size: 14px; color: var(--slate);
    position: relative; transition: color .25s, padding-left .25s;
}
.catalog ul a::before { content: ''; position: absolute; left: 24px; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--slate-soft); }
.catalog ul a:hover { color: var(--brand-red); padding-left: 42px; }
.catalog ul li.current a { color: var(--brand-red); font-weight: 600; }

/* ===== контент ===== */
.breadcrumbs { font-size: 14px; color: var(--text-soft); margin-bottom: 14px; }
.breadcrumbs a { color: var(--slate); }
.content .entry-title, .content h1 {
    font-size: clamp(28px, 3.4vw, 40px); color: var(--anthracite); font-weight: 700;
    letter-spacing: -.6px; line-height: 1.2; margin: 0 0 8px;
}
.entry-content > p:first-of-type { font-size: 18px; color: var(--slate); margin-bottom: 22px; max-width: 65ch; }
.entry-content p { margin: 0 0 16px; max-width: 72ch; }
.entry-content h2, .entry-content h3 { color: var(--anthracite); line-height: 1.3; }
.entry-content ul, .entry-content ol { max-width: 72ch; }
.entry-content table { max-width: 100%; border-collapse: collapse; }
.entry-content table td, .entry-content table th { padding: 8px 12px; border: 1px solid var(--line); }
.entry-content img { height: auto; }

/* принципы (золотая плашка) */
.principles {
    border-left: 4px solid var(--brand-gold); background: var(--panel);
    padding: 24px 28px; border-radius: 0 var(--radius) var(--radius) 0; margin: 28px 0;
}
.principles h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; color: var(--anthracite); margin: 0 0 8px; }
.principles p { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: var(--text-soft); font-size: 16px; margin: 0; }

/* ===== клиенты ===== */
.clients { padding: 12px 0 64px; }
.clients h2 { font-size: clamp(22px, 2.6vw, 30px); color: var(--anthracite); font-weight: 700; letter-spacing: -.4px; margin: 0 0 6px; }
.clients .sub { color: var(--text-soft); margin: 0 0 26px; }
.clients .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.clients .cell {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; padding: 18px; min-height: 110px;
    filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s, transform .3s, box-shadow .3s;
}
.clients .cell:hover { filter: none; opacity: 1; transform: translateY(-4px); box-shadow: var(--shadow); }
.clients .cell img { max-height: 64px; width: auto; max-width: 100%; }

/* ===== секция заказа ===== */
.order { background: var(--anthracite); padding: 64px 0; border-radius: var(--radius) var(--radius) 0 0; }
.order .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.order h2 { color: #fff; font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.5px; margin: 0 0 12px; }
.order .note { color: #b9b9bf; max-width: 46ch; margin: 0; }
.order .note b, .order .note a { color: var(--brand-gold); }
.order__form, .order form { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.order .heidel-form { max-width: none; }

/* ===== футер ===== */
.site-footer { background: var(--anthracite-2); color: #cfcfd4; position: relative; overflow: hidden; }
.site-footer .skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; opacity: .35; pointer-events: none; }
.site-footer .wrap { position: relative; padding: 56px 40px 90px; display: grid; grid-template-columns: auto 1fr auto; gap: 44px; align-items: center; }
.site-footer img.flogo { width: 96px; height: auto; }
.site-footer .fname { color: #fff; font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.site-footer .fline { font-size: 14px; color: #a9a9af; max-width: 52ch; }
.site-footer .fmenu { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; }
.site-footer .fmenu a { color: #a9a9af; }
.site-footer .fmenu a:hover { color: #fff; }
.site-footer .fcontacts { text-align: right; font-size: 15px; }
.site-footer .fcontacts a { color: #fff; font-weight: 600; font-size: 19px; }
.site-footer .fcontacts .mail { color: var(--brand-gold); }
.site-footer .faddr { color: #a9a9af; font-size: 14px; margin-top: 6px; }
.copy { background: #232326; color: #8b8b92; font-size: 13px; text-align: center; padding: 16px; position: relative; }

/* ===== форма (каркас серии) ===== */
.heidel-form { max-width: 520px; }
.heidel-form .pf-row { margin: 0 0 14px; }
.heidel-form label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--anthracite); }
.heidel-form input[type="text"],
.heidel-form input[type="tel"],
.heidel-form input[type="email"],
.heidel-form select,
.heidel-form textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--line); border-radius: 8px;
    font: 400 15px 'Onest', Arial, sans-serif; color: var(--text); background: #fff;
    transition: border-color .25s, box-shadow .25s;
}
.heidel-form textarea { min-height: 96px; resize: vertical; }
.heidel-form input:focus, .heidel-form select:focus, .heidel-form textarea:focus {
    outline: none; border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(209, 35, 42, .12);
}
.heidel-form .pf-req { color: var(--brand-red); }
/* Чекбокс согласия: селектор обязан оставаться с префиксом .heidel-form
   (иначе его перебивает .heidel-form .pf-row > label и flex ломается - прецедент print5.ru). */
.heidel-form .pf-consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13px; color: var(--text-soft); }
.heidel-form .pf-consent input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand-red); }
.heidel-form .pf-consent span { flex: 1; }
.heidel-form .pf-captcha-note { font-size: 12px; color: var(--text-soft); }
.heidel-form .pf-hp { display: none; }
.heidel-form .pf-submit {
    padding: 14px 30px; border: 0; border-radius: 8px;
    background: var(--brand-red); color: #fff;
    font: 600 15px/1 'Onest', Arial, sans-serif; cursor: pointer;
    transition: background .25s, transform .18s;
}
.heidel-form .pf-submit:hover { background: var(--brand-red-soft); transform: translateY(-2px); }
.heidel-form .pf-submit:disabled { opacity: .6; cursor: default; transform: none; }
.heidel-form .pf-result { margin-top: 10px; font-size: 14px; }
.heidel-form .pf-result.pf-ok { color: #1a7a1a; }
.heidel-form .pf-result.pf-error { color: var(--brand-red); }

/* ===== попап с формой (видимость только классом .is-open) ===== */
.heidel-popup {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(23, 23, 26, .66); overflow-y: auto;
}
.heidel-popup.is-open { display: flex; }
body.heidel-popup-open { overflow: hidden; }
.heidel-popup__box {
    position: relative; width: 100%; max-width: 420px; margin: auto;
    background: #fff; border-radius: 16px; padding: 30px;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .4);
    animation: heidel-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes heidel-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* Крестик без фона (правило 45). */
.heidel-popup__close {
    position: absolute; top: 12px; right: 16px;
    appearance: none; border: 0; background: none;
    font-size: 22px; line-height: 1; color: var(--text-soft); cursor: pointer;
    width: auto; height: auto; padding: 4px;
}
.heidel-popup__close:hover { color: var(--brand-red); }
.heidel-popup__title { margin: 0 0 8px; font-size: 20px; color: var(--anthracite); }
.heidel-popup__sub { margin: 0 0 16px; color: var(--text-soft); font-size: 14px; }
/* Компактная форма в попапе (ТЗ п.16). */
.heidel-popup .heidel-form { max-width: none; }
.heidel-popup .pf-row { margin-bottom: 10px; }
.heidel-popup .heidel-form input[type="text"],
.heidel-popup .heidel-form input[type="tel"],
.heidel-popup .heidel-form input[type="email"] { height: 42px; padding: 8px 12px; }
.heidel-popup .heidel-form textarea { min-height: 76px; }
.heidel-popup .heidel-form label { font-size: 13px; }
.heidel-popup .pf-submit { width: 100%; height: 46px; padding: 8px 20px; }
/* Режим «Заказать звонок»: только имя и телефон. */
.heidel-popup--callback .pf-row--email,
.heidel-popup--callback .pf-row--message,
.heidel-popup--callback .pf-row--product { display: none; }

/* ===== куки-баннер ===== */
.cookie-notice {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    background: var(--anthracite-2); color: #e8e8ea; padding: 14px 24px;
    box-shadow: 0 -6px 24px rgba(0,0,0,.3);
}
.cookie-notice__inner { max-width: 1344px; margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.cookie-notice__text { margin: 0; flex: 1 1 auto; }
.cookie-notice__more { color: var(--brand-gold); margin-left: 6px; white-space: nowrap; }
.cookie-notice__accept {
    flex: 0 0 auto; padding: 8px 20px; border: 0; border-radius: 8px;
    background: var(--brand-red); color: #fff; font: inherit; cursor: pointer; white-space: nowrap;
}
@media (max-width: 600px) {
    .cookie-notice__inner { flex-direction: column; align-items: stretch; text-align: center; }
    .cookie-notice__accept { width: 100%; }
}
.cookie-notice[hidden] { display: none; }

/* ===== форма под текстом типовой страницы ===== */
.page-feedback {
    margin-top: 40px; padding: 28px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.page-feedback h2 { margin: 0 0 8px; font-size: 24px; color: var(--anthracite); }
.page-feedback > p { margin: 0 0 20px; color: var(--text-soft); font-size: 14px; }

/* ===== 404 ===== */
.error-404 { padding: 60px 0; text-align: center; }
.error-404 h1 { font-size: clamp(40px, 8vw, 72px); color: var(--anthracite); margin: 0 0 12px; }

/* ===== адаптив ===== */
@media (max-width: 1024px) {
    .features .grid { grid-template-columns: 1fr 1fr; }
    .clients .grid { grid-template-columns: repeat(3, 1fr); }
    .order .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .features .grid { grid-template-columns: 1fr; }
    .clients .grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer .wrap { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .site-footer .fcontacts { text-align: center; }
    .site-footer .fmenu { justify-content: center; }
    .header-cta { margin-left: 0; width: 100%; }
    .header-cta .btn { width: 100%; }
    .mainnav .burger { display: block; }
    .mainnav ul { display: none; flex-direction: column; width: 100%; }
    .mainnav.open ul { display: flex; }
    .mainnav .wrap { flex-direction: column; align-items: stretch; padding: 0 16px; }
    .mainnav a { padding: 14px 10px; border-top: 1px solid rgba(255, 255, 255, .08); }
    .brand .tag { display: none; }
    /* Каталог на мобильном свернут целиком (правило 42). */
    .catalog__head { cursor: pointer; }
    .catalog .catalog__body { display: none; }
    .catalog.is-open .catalog__body { display: block; }
    .catalog.is-open .catalog__head .chev { transform: rotate(-135deg); }
}
@media (min-width: 769px) {
    /* На десктопе шеврон шапки каталога неактивен, группы-аккордеоны работают. */
    .catalog__head .chev { display: none; }
}
/* form-style-20261116:strict */
form[action*="admin-ajax"] :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=range]), select, textarea){border-radius:0;border-style:solid;border-width:2px;box-shadow:none;transition:border-color .18s,box-shadow .18s,background .18s}
form[action*="admin-ajax"] textarea{border-radius:0;}
form[action*="admin-ajax"] :is(button[type=submit], input[type=submit], .pf-submit, .form-submit){border-radius:0;letter-spacing:.02em;}
