/* ==========================================================================
   Новый дизайн страниц: все страницы в оформлении главной.
   Подключается только при выключателе «Настройки сайта → Новый дизайн страниц», на главной не загружается.
   Значения взяты с главной: заголовки 48/400, секции 96 px, карточки 16 px с рамкой и жёлтой обводкой при наведении.
   ========================================================================== */
html[data-zh-ds] {
    --ds-bg: #FFFFFF;
    --ds-alt: #FAFAFA;
    --ds-card: #FFFFFF;
    --ds-line: #E9E9E9;
    --ds-text: #0A0A0A;
    --ds-muted: rgba(10, 10, 10, .68);
    --ds-accent: #FFD003;
    --ds-shadow: 0 4px 24px rgba(10, 10, 10, .05);
    --ds-sec: 96px;
    --ds-cta: linear-gradient(180deg, #FFDE4D 0%, #FFD003 55%, #F5C400 100%);
}
html.dark[data-zh-ds] {
    --ds-bg: #0A0B0D;
    --ds-alt: #0F1114;
    --ds-card: #16181C;
    --ds-line: rgba(255, 255, 255, .1);
    --ds-text: #F4F5F6;
    --ds-muted: rgba(244, 245, 246, .7);
    --ds-shadow: none;
}
@media (max-width: 768px) {
    html[data-zh-ds] { --ds-sec: 64px; }
}

/* --- Первый экран --- */
html[data-zh-ds] #main .main h1 { font-weight: 300; }
html[data-zh-ds] #main .main h1 span { font-weight: 500; }
html[data-zh-ds] #main.zh-phero--short { height: auto; min-height: clamp(480px, 66vh, 640px); }
html[data-zh-ds] #main.zh-phero--short > .main {
    position: relative;
    min-height: clamp(480px, 66vh, 640px);
    padding-top: 110px;
    padding-bottom: 55px;
}
html[data-zh-ds] #main.zh-phero--short .main h1 { margin-bottom: 20px; font-size: clamp(2rem, 3.6vw, 3.25rem); overflow-wrap: break-word; }
html[data-zh-ds] #main.zh-phero .main .title { max-width: 860px; }
html[data-zh-ds] #main .zh-phero__sub {
    width: 100%;
    max-width: 670px;
    margin: 0 0 25px;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 140%;
    color: #FFFFFF;
}
html[data-zh-ds] .zh-phero .zh-hero-actions { flex-wrap: wrap; }
@media (max-width: 768px) {
    /* Высота по содержимому: длинный заголовок и подзаголовок не наезжают на шапку */
    html[data-zh-ds] #main.zh-phero { height: auto; min-height: 480px; }
    html[data-zh-ds] #main.zh-phero > .main {
        position: relative;
        min-height: 480px;
        padding-top: 96px;
        padding-bottom: 40px;
    }
    html[data-zh-ds] #main.zh-phero--short .main h1 { font-size: clamp(1.5rem, 7vw, 2rem); }
}

/* --- Страницы, где контент идёт сразу за первым экраном --- */
html[data-zh-ds] main:has(> #main.zh-phero) { padding-top: 0; }
html[data-zh-ds] main:has(> #main.zh-phero) > .container,
html[data-zh-ds] main:has(> #main.zh-phero) > .max-w-5xl,
html[data-zh-ds] main:has(> #main.zh-phero) > .max-w-4xl { margin-top: 48px; }
html[data-zh-ds] main.zhebe-track-page:has(> #main.zh-phero) { padding-bottom: var(--ds-sec); }
html[data-zh-ds] .zh-dq:has(> #main.zh-phero),
html[data-zh-ds] .zh-legal:has(> #main.zh-phero),
html[data-zh-ds] .zh-gloss:has(> #main.zh-phero) { padding-top: 0; }

/* --- Отступы между секциями --- */
html[data-zh-ds] #description,
html[data-zh-ds] #sub-services,
html[data-zh-ds] #park,
html[data-zh-ds] #calculator,
html[data-zh-ds] #feedback,
html[data-zh-ds] #clients,
html[data-zh-ds] #employees,
html[data-zh-ds] #about,
html[data-zh-ds] #reviews,
html[data-zh-ds] #faq,
html[data-zh-ds] .ds-contacts-page #contacts,
html[data-zh-ds] main > section.px-4.py-12 {
    padding-top: var(--ds-sec);
    padding-bottom: var(--ds-sec);
}
html[data-zh-ds] #process.zh-svc-block,
html[data-zh-ds] .zh-svc-block { padding-top: var(--ds-sec); padding-bottom: var(--ds-sec); }

/* --- Заголовки секций --- */
html[data-zh-ds] main section:not(#main) > .container > .title h2,
html[data-zh-ds] #clients h2,
html[data-zh-ds] #reviews h2,
html[data-zh-ds] #cases h2,
html[data-zh-ds] #employees .title h2,
html[data-zh-ds] #park .title h2 {
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
}
html[data-zh-ds] main section:not(#main) h2 span { font-weight: inherit; }
html[data-zh-ds] #geo:not(.zh-vmap) h2 { text-transform: none; }

/* --- Вводный текст услуг --- */
html[data-zh-ds] #description { background: none; }
html[data-zh-ds] #description + .zh-svc-block,
html[data-zh-ds] .zh-svc-block + #sub-services:not(.zh-svc-block--grey) { padding-top: 0; }
html[data-zh-ds] #description h4 {
    max-width: 920px;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.6;
    text-align: left;
    color: var(--ds-muted);
}

/* --- Единая карточка: класс главной zh-hover-card (подсветка и подъём при наведении заданы в tailwind-utilities и zhebe-dark).
   Здесь только то, чего нет у старых блоков: фон, обводка, скругление. На телефоне наведения нет, обводка остаётся. --- */
html[data-zh-ds] .zh-hover-card {
    background-color: var(--ds-card);
    border: 1px solid var(--ds-line);
    border-radius: 16px;
    box-shadow: var(--ds-shadow);
}
html[data-zh-ds] .zh-hover-card--static:hover {
    transform: none;
}
/* Старые стили по id сильнее класса: обводка 2 px сверху и жёлтая рамка по касанию на телефоне */
html[data-zh-ds] #sub-services .item.zh-hover-card {
    border: 1px solid var(--ds-line);
}
@media (hover: hover) {
    html[data-zh-ds] #sub-services .item.zh-hover-card:hover {
        border-color: #FFD000;
    }
}

/* --- Подуслуги: карточки главной вместо строк с линией --- */
html[data-zh-ds] #sub-services .title { margin-bottom: 48px; }
html[data-zh-ds] #sub-services .sub-title { margin-bottom: 20px; }
html[data-zh-ds] #sub-services .sub-title h2 { font-size: 1.5rem; font-weight: 500; line-height: 1.25; text-transform: none; }
html[data-zh-ds] #sub-services .flex.wrap { gap: 16px; }
html[data-zh-ds] #sub-services .col { width: calc(50% - 8px); }
html[data-zh-ds] #sub-services .wrap > .item { width: calc(50% - 8px); }
html[data-zh-ds] #sub-services .item {
    min-height: 76px;
    padding: 18px 64px 18px 24px;
    background-position: right 20px center;
}
html[data-zh-ds] #sub-services .col .item { margin-bottom: 12px; }
html[data-zh-ds] #sub-services .item h5 { max-width: none; font-weight: 400; color: var(--ds-text); }
@media (max-width: 768px) {
    html[data-zh-ds] #sub-services .col,
    html[data-zh-ds] #sub-services .wrap > .item { width: 100%; }
}

/* --- Оперируемый парк --- */
html[data-zh-ds] #park .park { margin: 48px 0; }
html[data-zh-ds] #park .slick-slide { margin-right: 16px; }
html[data-zh-ds] #park .item {
    width: 340px;
    max-width: calc(100vw - 48px);
    min-height: 300px;
    padding: 28px;
}
html[data-zh-ds] #park img { margin-bottom: 28px; }
html[data-zh-ds] #park h4 { font-weight: 500; text-transform: none; color: var(--ds-text); }
html[data-zh-ds] #park h6 { color: var(--ds-muted); }

/* --- Кнопка расчёта на старых формах: как жёлтая кнопка главной --- */
html[data-zh-ds] #calculator .calc-submit,
html[data-zh-ds] #calculator button[type="submit"]:not(.zh-cta),
html[data-zh-ds] [data-rail-form] button[type="submit"],
html[data-zh-ds] [data-rail-request] button[type="submit"],
html[data-zh-ds] [data-open-request],
html[data-zh-ds] .zhebe-track-page form button[type="submit"],
html[data-zh-ds] .zh-search-page__form button {
    min-height: 56px;
    padding: 0 28px;
    background: var(--ds-cta);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 -2px 0 rgba(0, 0, 0, .08) inset, 0 10px 24px -8px rgba(230, 180, 0, .55);
    font-size: 17px;
    font-weight: 600;
    color: #0A0A0A;
    transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s;
}
@media (hover: hover) {
    html[data-zh-ds] #calculator .calc-submit:hover,
    html[data-zh-ds] #calculator button[type="submit"]:not(.zh-cta):hover,
    html[data-zh-ds] [data-rail-form] button[type="submit"]:hover,
    html[data-zh-ds] [data-rail-request] button[type="submit"]:hover,
    html[data-zh-ds] [data-open-request]:hover,
    html[data-zh-ds] .zhebe-track-page form button[type="submit"]:hover,
    html[data-zh-ds] .zh-search-page__form button:hover { transform: translateY(-2px); background: var(--ds-cta); }
}

/* --- О компании --- */
html[data-zh-ds] #about { background: none; }
html[data-zh-ds] #about .row { margin-bottom: 48px; }
html[data-zh-ds] #about .row:last-child { margin-bottom: 0; }
html[data-zh-ds] #about .since {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 24px;
    width: calc(100% - 30px);
    max-width: 1160px;
    margin: 0 auto;
    padding: 0;
    align-items: stretch;
}
html[data-zh-ds] #about .since .box {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    padding: 40px;
    background: var(--ds-accent);
    border-radius: 16px;
}
html[data-zh-ds] #about .since .container { padding: 0; max-width: none; }
html[data-zh-ds] #about .since .text { max-width: none; }
html[data-zh-ds] #about .since .text h4,
html[data-zh-ds] #about .since .text h6 { color: #0A0A0A; font-weight: 400; }
html[data-zh-ds] #about .image { position: static; grid-column: 2; grid-row: 1; width: auto; height: auto; }
html[data-zh-ds] #about .image img { position: static; transform: none; display: block; width: 100%; height: 100%; min-height: 340px; object-fit: cover; border-radius: 16px; }
html[data-zh-ds] #about .description {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: none;
    margin: 0;
}
html[data-zh-ds] #about .description h4 {
    margin: 0;
    padding: 28px;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--ds-muted);
}
html[data-zh-ds] #about .description h4 span { display: block; margin-bottom: 8px; font-size: 1.3rem; font-weight: 500; line-height: 1.25; color: var(--ds-text); }
html[data-zh-ds] #about .direction .slick-slide img,
html[data-zh-ds] #about .direction img { border-radius: 16px; }
@media (max-width: 768px) {
    html[data-zh-ds] #about .since { grid-template-columns: 1fr; }
    html[data-zh-ds] #about .since .box { grid-row: 2; grid-column: 1; padding: 28px; }
    html[data-zh-ds] #about .image { grid-row: 1; grid-column: 1; }
    html[data-zh-ds] #about .image img { min-height: 220px; }
}

/* --- Команда --- */
html[data-zh-ds] #employees { background: none; }
html[data-zh-ds] #employees .flex { justify-content: flex-start; gap: 24px; }
html[data-zh-ds] #employees .item {
    margin: 0;
    padding: 16px;
}
html[data-zh-ds] #employees .item img { border-radius: 12px; }
html[data-zh-ds] #employees .item h4 { font-weight: 500; color: var(--ds-text); }
html[data-zh-ds] #employees .item p { color: var(--ds-muted); }

/* --- Контакты --- */
html[data-zh-ds] .ds-contacts-page #contacts { background: none; }
html[data-zh-ds] .ds-contacts-page #contacts .container > .flex {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 40px;
    align-items: start;
}
html[data-zh-ds] .ds-contacts-page #contacts .col { width: auto; min-width: 0; margin: 0; }
html[data-zh-ds] .ds-contacts-page #contacts .col > .flex {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}
html[data-zh-ds] .ds-contacts-page #contacts .col > .flex > .item { width: auto; margin: 0; }
html[data-zh-ds] .ds-contacts-page #contacts form {
    padding: 32px;
}
html[data-zh-ds] .ds-contacts-page #contacts .item {
    padding: 20px 24px;
}
html[data-zh-ds] .ds-contacts-page #contacts .item h4 { font-weight: 500; color: var(--ds-text); }
html[data-zh-ds] .ds-contacts-page #contacts .email { display: block; margin-top: 8px; color: var(--ds-muted); }
html[data-zh-ds] .ds-contacts-page #contacts h6 { color: var(--ds-muted); }

/* --- Страницы на утилитах: тариф, отслеживание, кейсы, справочник --- */
html[data-zh-ds] .zhebe-track-page h2,
html[data-zh-ds] .ds-media-page main > .container h2,
html[data-zh-ds] .ds-media-page main > .max-w-4xl h2 { font-weight: 500; letter-spacing: 0; }
html[data-zh-ds] .ds-track-page main section > div:has(> h2) {
    padding: 28px;
}
html[data-zh-ds] .ds-track-page main h2 { font-size: 1.75rem; font-weight: 400; color: var(--ds-text); }

@media (max-width: 900px) {
    html[data-zh-ds] .ds-contacts-page #contacts .container > .flex { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    html[data-zh-ds] .ds-contacts-page #contacts .col > .flex { grid-template-columns: minmax(0, 1fr); }
    html[data-zh-ds] .ds-contacts-page #contacts form { padding: 24px; }
}

html[data-zh-ds] [data-rail-result] > [aria-hidden="true"] { display: none; }
html[data-zh-ds] [data-rail-result] > .relative { margin-right: 0; }

html[data-zh-ds] .ds-media-page main > .max-w-4xl img { border-radius: 16px; }

/* --- Служебные страницы --- */
html[data-zh-ds] .zh-search-page { padding-top: var(--ds-sec); }
html[data-zh-ds] .zh-ds-404 { padding: var(--ds-sec) 0; text-align: center; }
html[data-zh-ds] .zh-ds-404 h2 { font-weight: 400; color: var(--ds-text); line-height: 1.15; }
