/* =========================================================
   Detective1 — базовые стили статической копии
   ========================================================= */

/* Шрифт хостится локально (fonts/montserrat/), а не через fonts.googleapis.com:
   внешний @import на другой хост блокировал построение CSSOM до второго
   round-trip'а за файлом самого шрифта (DNS+TLS к ещё одному домену) — особенно
   заметно на нестабильных VPN-соединениях. Правила встроены прямо сюда, а не через
   локальный @import, чтобы не создавать тот же блокирующий паттерн внутри одного
   хоста. Только реально используемые начертания (400/500/600/700/800/900) — раньше
   при подключении сразу 18 начертаний одним URL Google Fonts отдавал на все веса
   один и тот же файл обычного начертания (баг многовесового запроса), из-за чего
   жирный текст на сайте фактически не был жирным.
*/
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Hw5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu173w0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu173w9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu173w2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu173w3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCu173w5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvr73w0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvr73w9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvr73w2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvr73w3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvr73w5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvC73w0aXpsog.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvC73w9aXpsog.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvC73w2aXpsog.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvC73w3aXpsog.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/montserrat/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCvC73w5aXo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

/* min-height:100%+flex — футер держится у низа окна на коротких страницах (например,
   анкета специалиста без заполненных необязательных полей), а не "повисает" в середине
   с пустотой под ним. Оверлеи/плавающие кнопки на странице уже position:fixed/absolute,
   поэтому flex-контейнер на body их не задевает. */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 1.5;
    color: #222;
    background: #f4f4f4;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================================
   Топ-бар
   ========================================================= */

#sp-top-bar {
    background: #26282b;
    color: #fff;
    font-size: 14px;
}

#sp-top-bar .container-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.social-icons {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition: background 0.2s, transform 0.2s;
}

.social-icons a svg {
    width: 14px;
    height: 14px;
    display: block;
}

.social-icons a:hover {
    background: #a40000;
    transform: translateY(-1px);
}

.sp-top-bar__right {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.sp-contact-info {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
}

.sp-specialist-links {
    list-style: none;
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 0 0 0 22px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.sp-specialist-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
}

.sp-specialist-links a:hover {
    opacity: 1;
    color: #ff6b6b;
}

.sp-contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    text-decoration: none;
}

.sp-contact-info a svg {
    width: 14px;
    height: 14px;
    flex: none;
    opacity: 0.85;
}

.sp-contact-info a:hover {
    color: #ff6b6b;
}

.sp-contact-info a:hover svg {
    opacity: 1;
}

/* =========================================================
   Шапка / меню
   ========================================================= */

#sp-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

#sp-header .container-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 20px;
}

.logo {
    max-width: 230px;
    min-width: 90px;
    flex-shrink: 1;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.logo img {
    display: block;
    width: 100%;
    height: auto;
}

.sp-megamenu-parent {
    list-style: none;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.sp-megamenu-parent > li > a {
    display: inline-block;
    padding: 9px 11px;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 999px;
    transition: 0.2s;
}

.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li.active > a {
    background: #a40000;
    color: #fff;
}

.d1-header-phone {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #a40000;
    color: #fff !important;
    flex-shrink: 0;
    text-decoration: none;
}

.d1-header-phone svg {
    width: 17px;
    height: 17px;
}

#offcanvas-toggler {
    display: none;
}

.burger-icon {
    width: 26px;
    height: 20px;
    position: relative;
}

.burger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #222;
    border-radius: 2px;
}

.burger-icon span:nth-child(1) { top: 0; }
.burger-icon span:nth-child(2) { top: 9px; }
.burger-icon span:nth-child(3) { top: 18px; }

@media (max-width: 1300px) {
    .sp-megamenu-parent {
        display: none !important;
    }

    #offcanvas-toggler {
        display: flex;
        flex-shrink: 0;
    }
}

@media (max-width: 992px) {
    .logo {
        max-width: 190px;
    }
}

@media (max-width: 400px) {
    .logo {
        max-width: 155px;
    }
}

/* Off-canvas mobile menu */
.offcanvas-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    max-width: 86vw;
    background: #fff;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.2,.7,.3,1);
    box-shadow: -12px 0 32px rgba(0,0,0,0.18);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-top: 4px solid #a40000;
}

.offcanvas-menu.is-open {
    transform: translateX(0);
}

.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,20,20,0.55);
    backdrop-filter: blur(1px);
    z-index: 999;
    display: none;
}

.offcanvas-overlay.is-open {
    display: block;
}

.offcanvas-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
}

.offcanvas-menu__logo {
    display: block;
    width: 100%;
    max-width: 170px;
    height: auto;
}

.offcanvas-menu .close-offcanvas {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f4f4f4;
    color: #222;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.offcanvas-menu .close-offcanvas:hover {
    background: #a40000;
    color: #fff;
    transform: rotate(90deg);
}

.offcanvas-menu__nav {
    list-style: none;
    margin: 0;
    padding: 10px 12px;
    flex: 1;
}

.offcanvas-menu__nav li {
    margin-bottom: 4px;
}

.offcanvas-menu__nav li a {
    display: flex;
    align-items: center;
    padding: 13px 14px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    border-left: 3px solid transparent;
    transition: background 0.2s, color 0.2s, padding-left 0.2s, border-color 0.2s;
}

.offcanvas-menu__nav li a:hover {
    background: #faf1f1;
    border-left-color: #a40000;
    padding-left: 18px;
}

.offcanvas-menu__nav li.active a {
    background: #a40000;
    color: #fff;
    border-left-color: #a40000;
}

.offcanvas-menu__footer {
    padding: 16px 18px 22px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.offcanvas-menu__footer .btn {
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.offcanvas-menu__specialist-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.offcanvas-menu__specialist-links a {
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 999px;
    border: 1.5px solid #a40000;
    color: #a40000;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.offcanvas-menu__footer .btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.offcanvas-menu__footer .social-icons a {
    background: rgba(0,0,0,0.06);
    color: #333;
}

.offcanvas-menu__footer .social-icons a:hover {
    background: #a40000;
    color: #fff;
}

/* =========================================================
   Кнопки
   ========================================================= */

.btn {
    display: inline-block;
    border-radius: 999px;
    padding: 13px 26px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.btn svg {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
    margin-right: 2px;
}

.btn-lg {
    padding: 16px 30px;
    font-size: 18px;
}

.btn-danger {
    background: #a40000;
    border-color: #a40000;
    color: #fff !important;
}

.btn-danger:hover {
    background: #7a0000;
    border-color: #7a0000;
}

.btn-outline-dark {
    background: transparent;
    border-color: #222;
    color: #222 !important;
}

.btn-outline-dark:hover {
    background: #222;
    color: #fff !important;
}

/* =========================================================
   Главная: первый экран
   ========================================================= */

main {
    flex: 1 0 auto;
    padding: 40px 0 60px;
}

.d1-hero {
    background: linear-gradient(135deg, #111 0%, #2a0000 100%);
    color: #fff;
    border-radius: 28px;
    padding: 64px 56px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.d1-hero h1 {
    max-width: 900px;
    font-size: 46px;
    line-height: 1.15;
    font-weight: 900;
    color: #fff;
    margin: 0 0 22px;
}

.d1-hero p {
    max-width: 760px;
    font-size: 21px;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
    margin-bottom: 32px;
}

.d1-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.d1-hero .btn-outline-dark {
    color: #fff !important;
    border-color: rgba(255,255,255,0.65);
}

.d1-hero .btn-outline-dark:hover {
    background: #fff;
    color: #111 !important;
}

/* =========================================================
   Главная: направления
   ========================================================= */

.d1-directions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 32px;
}

.d1-direction-card {
    background: #fff;
    border-radius: clamp(14px, 4vw, 20px);
    padding: clamp(18px, 5vw, 28px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    border-top: 5px solid #a40000;
}

.d1-direction-card h2 {
    font-size: clamp(19px, 5.2vw, 24px);
    font-weight: 800;
    margin: 0 0 14px;
}

.d1-direction-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.d1-direction-card a {
    color: #a40000;
    font-weight: 800;
    text-decoration: none;
}

/* =========================================================
   Страница "Как работаем"
   ========================================================= */

.page-header h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 900;
    margin: 0 0 34px;
    color: #111;
}

.com-content-article__body {
    max-width: 980px;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
    margin: 0 auto;
}

.com-content-article__body h2 {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 850;
    margin-top: 42px;
    margin-bottom: 18px;
    color: #111;
}

.com-content-article__body p {
    margin-bottom: 16px;
}

.com-content-article__body ul {
    margin: 0 0 26px 0;
    padding-left: 24px;
}

.com-content-article__body li {
    margin-bottom: 10px;
}

.d1-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.d1-benefits div {
    background: #fff;
    padding: 18px 20px;
    border-radius: 14px;
    font-weight: 700;
    color: #111;
    border-left: 4px solid #a40000;
}

.d1-benefits div a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.d1-benefits div:hover {
    transform: translateY(-2px);
    transition: 0.2s;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    cursor: pointer;
}

.d1-call {
    margin-top: 50px;
    text-align: center;
    background: linear-gradient(135deg, #111 0%, #2a0000 100%);
    color: #fff;
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 14px 35px rgba(0,0,0,0.16);
}

.d1-call h2 {
    color: #fff !important;
    margin-top: 0 !important;
}

.d1-call p {
    color: rgba(255,255,255,0.9);
    max-width: 720px;
    margin: 0 auto 24px;
}

/* =========================================================
   Блок помощи над поиском специалистов
   ========================================================= */

.d1-search-help {
    background: linear-gradient(135deg, #111 0%, #2a0000 100%);
    color: #fff;
    border-radius: 20px;
    padding: 28px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.d1-search-help h3 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
}

.d1-search-help p {
    margin: 0;
    color: rgba(255,255,255,0.88);
    font-size: 17px;
    line-height: 1.6;
}

.d1-search-help-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
}

.d1-search-help .btn {
    text-align: center;
}

.d1-search-help .btn-outline-dark {
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.5);
}

.d1-search-help .btn-outline-dark:hover {
    background: #fff;
    color: #111 !important;
}

/* =========================================================
   Фильтры
   ========================================================= */

.d1-filter-toggle {
    width: 100%;
    margin: 0 0 22px;
    padding: 14px 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: none;
}

.d1-filter-toggle:hover {
    background: #a40000;
}

.d1-filter-toggle::before {
    content: "▼ ";
}

.d1-filter-toggle.is-open::before {
    content: "▲ ";
}

@media (max-width: 768px) {
    .d1-filter-toggle {
        display: block;
    }

    .d1-filters-hidden {
        display: none;
    }

    #filters.d1-filters-hidden {
        display: none;
    }

    #filters:not(.d1-filters-hidden) {
        position: fixed;
        inset: 0;
        z-index: 700;
        display: flex;
        align-items: flex-end;
        background: rgba(0,0,0,0.5);
        padding: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .d1-filters-panel {
        background: #fff;
        width: 100%;
        max-height: 82vh;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    }

    .d1-filters-panel__header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        font-size: 17px;
        font-weight: 800;
        margin-bottom: 18px;
    }

    .d1-filters-close {
        display: flex !important;
    }

    .d1-filters-apply {
        display: block !important;
        width: 100%;
        margin-top: 6px;
    }
}

.jfilters-filters-container {
    display: flex;
    gap: 30px;
    background: #fff;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 26px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.jfilters-filter-container {
    flex: 1;
    min-width: 220px;
}

.d1-filters-panel__header,
.d1-filters-apply {
    display: none;
}

.d1-filters-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #222;
    cursor: pointer;
    flex-shrink: 0;
}

.d1-filters-close svg {
    width: 16px;
    height: 16px;
}

.d1-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.jfilters-filter-header {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.jfilters-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.d1-city-custom {
    margin-top: 10px;
}

.d1-city-custom .cf-input {
    width: 100%;
    box-sizing: border-box;
}

.jfilters-item-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.jfilters-item-link:hover {
    background: #eee;
}

.jfilters-item-link.is-active {
    background: #a40000;
    color: #fff;
}

.jfilters-item-link--clear {
    font-size: 0;
}

.jfilters-item-link--clear::after {
    content: "✕ Сбросить";
    font-size: 14px;
    color: #a40000;
    font-weight: 600;
}

/* =========================================================
   Список специалистов
   ========================================================= */

.com-finder__results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.com-finder__results-list .result__item {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    border-left: 5px solid #a40000;
}

.d1-finder-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: start;
}

.d1-finder-card__photo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.14);
}

.d1-finder-card__title {
    margin: 0 0 10px;
}

.result__title-link {
    color: #111;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 850;
    text-decoration: none;
}

.result__title-link:hover {
    color: #a40000;
}

.d1-finder-card__speciality {
    margin: -4px 0 12px;
    color: #a40000;
    font-size: 17px;
    font-weight: 800;
}

.d1-finder-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.d1-finder-card__meta span,
.d1-finder-card__badges span {
    background: #f5f5f5;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 700;
}

/* Было #a40000 - тот же тревожный красный, что и у "срочно"/urgent - для положительного
   статуса (специалист лично проверен) это читалось как проблема, а не как достижение. */
.d1-status--verified {
    background: #15803d !important;
    color: #fff !important;
}

.d1-status--pending {
    background: #fff3cd !important;
    color: #7a5b00 !important;
}

.d1-status--not-verified {
    background: #eeeeee !important;
    color: #777 !important;
}

.d1-finder-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.result__description {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 16px;
    max-width: 900px;
}

.d1-finder-card__more {
    display: inline-block;
    margin-top: 4px;
    background: #a40000;
    color: #fff !important;
    border-radius: 999px;
    padding: 9px 22px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.d1-finder-card__more:hover {
    background: #111;
}

.com-finder__counter {
    color: #666;
    font-size: 15px;
    margin: 10px 0 0;
}

.d1-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 28px 0 8px;
}

.d1-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f5f5;
    color: #333;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.d1-page-btn:hover:not(:disabled):not(.is-active) {
    background: #eee;
}

.d1-page-btn.is-active {
    background: #a40000;
    color: #fff;
    cursor: default;
}

.d1-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.d1-page-btn--ellipsis {
    background: transparent;
    cursor: default;
    min-width: 24px;
}

/* =========================================================
   Полная карточка специалиста
   ========================================================= */

.d1-specialist-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px 38px;
}

.d1-specialist-card__photo img {
    width: 100%;
    max-width: 360px;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
    object-fit: cover;
    aspect-ratio: 5/4;
}

img.js-lightbox {
    cursor: zoom-in;
}

.d1-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
}

.d1-lightbox-overlay.is-open {
    display: flex;
}

.d1-lightbox-overlay__img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    object-fit: contain;
}

.d1-specialist-card__title {
    font-size: 38px;
    line-height: 1.15;
    font-weight: 900;
    margin: 0 0 10px;
    color: #111;
}

.d1-specialist-card__specialization {
    color: #a40000;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.d1-specialist-card__specialty {
    color: #555;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 14px;
}

.d1-specialist-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.d1-specialist-card__meta span,
.d1-specialist-badges span {
    background: #f5f5f5;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 700;
}

.d1-specialist-card__meta .is-verified {
    background: #a40000;
    color: #fff;
}

.d1-trust-hint {
    margin: -14px 0 20px;
    font-size: 14px;
    color: #888;
    max-width: 520px;
}

.d1-specialist-card__description {
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

.d1-specialist-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.d1-specialist-card__actions .btn {
    border-radius: 999px;
    padding: 11px 24px;
    font-weight: 700;
}

.d1-specialist-section {
    grid-column: 1 / -1;
    background: #f7f7f7;
    border-radius: 18px;
    padding: 22px 24px;
}

.d1-specialist-section h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 12px;
    color: #111;
}

.d1-specialist-section p {
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    color: #333;
}

.d1-specialist-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.d1-specialist-notice {
    margin: 18px 0 22px;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 500;
}

.d1-specialist-notice strong {
    font-weight: 850;
}

.d1-specialist-notice--unavailable {
    background: #fff3cd;
    color: #6f5400;
    border-left: 5px solid #d9a300;
}

/* =========================================================
   Форма обращения (модалка)
   ========================================================= */

.eb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.eb-overlay.is-open {
    display: flex;
}

.eb-dialog {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.eb-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.eb-close:hover {
    color: #555;
}

.eb-header {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    padding-right: 20px;
}

.cf-fields p {
    color: #555;
    font-size: 15px;
    margin: 0 0 18px;
}

.cf-control-group {
    margin-bottom: 16px;
}

.cf-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.cf-required-label {
    color: #a40000;
}

.cf-password-field {
    position: relative;
}

.cf-password-field .cf-input {
    padding-right: 44px;
}

.cf-password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    color: #888;
    border-radius: 6px;
    cursor: pointer;
}

.cf-password-toggle:hover {
    color: #a40000;
    background: #f5f5f5;
}

.cf-password-toggle:focus-visible {
    outline: 2px solid #a40000;
    outline-offset: 1px;
}

.cf-password-toggle svg {
    width: 20px;
    height: 20px;
}

.cf-password-toggle .cf-eye-off {
    display: none;
}

.cf-password-toggle.is-active .cf-eye-on {
    display: none;
}

.cf-password-toggle.is-active .cf-eye-off {
    display: block;
}

.cf-input {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
}

textarea.cf-input {
    resize: vertical;
}

.cf-radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.cf-radio-group .cf-label {
    display: inline;
    font-weight: 400;
}

.cf-btn {
    background: #f54447;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 13px 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.cf-btn:hover {
    background: #d9302f;
}

.cf-btn--ghost {
    background: transparent;
    color: #a40000;
    border: 2px solid #eee;
}

.cf-btn--ghost:hover {
    background: #f5f5f5;
    color: #a40000;
}

.cf-step-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #a40000;
    margin: 0 0 18px;
}

.cf-radio-group--row {
    flex-wrap: wrap;
    gap: 6px 16px;
}

.cf-radio-group--row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.d1-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.d1-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.d1-chip label {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border: 1.5px solid #ddd;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    transition: background .15s, border-color .15s, color .15s;
}

.d1-chip label:hover {
    border-color: #f54447;
}

.d1-chip input:checked + label {
    background: #f54447;
    border-color: #f54447;
    color: #fff;
}

.d1-chip input:focus-visible + label {
    outline: 2px solid #a40000;
    outline-offset: 2px;
}

.cf-step-actions {
    display: flex;
    gap: 10px;
}

.cf-step-actions .cf-btn {
    width: auto;
    flex: 1;
}

.cf-success-message {
    display: none;
    background: #eafaf1;
    color: #1e7e34;
    padding: 16px 18px;
    border-radius: 10px;
    font-weight: 600;
}

/* =========================================================
   Footer
   ========================================================= */

#sp-footer {
    background: #111;
    color: rgba(255,255,255,0.6);
    padding: 28px 0;
    margin-top: 40px;
    font-size: 14px;
}

#sp-footer .container-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#sp-footer ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

#sp-footer a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}

#sp-footer a:hover {
    color: #fff;
}

/* =========================================================
   Анимации появления при прокрутке
   ========================================================= */

/* Скрываем .reveal-блоки до появления, ТОЛЬКО когда есть JS (класс ставится
   инлайн-скриптом в <head>). Без JS/для краулеров без исполнения скриптов
   контент остаётся видимым по умолчанию — см. head() в generate_site.py. */
html.js-reveal-active .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.reveal {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.d1-directions .reveal:nth-child(2) { transition-delay: 0.08s; }
.d1-directions .reveal:nth-child(3) { transition-delay: 0.16s; }

.com-finder__results-list .reveal { transition-delay: 0s; }

/* Плавный переход при наведении на карточки */
.d1-direction-card,
.d1-finder-card,
.d1-specialist-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.d1-direction-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.12);
}

.com-finder__results-list .result__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

/* =========================================================
   Стрелка-подсказка "листайте вниз" в hero
   ========================================================= */

.d1-scroll-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: 36px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    animation: d1-bounce 1.8s ease-in-out infinite;
}

.d1-scroll-cue:hover {
    background: rgba(255,255,255,0.12);
}

@keyframes d1-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.d1-section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 850;
    margin: 56px 0 28px;
    color: #111;
    scroll-margin-top: 100px;
}

/* =========================================================
   Интерактивная карта процесса (journey map)
   ========================================================= */

.d1-journey {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    background: #fff;
    border-radius: 24px;
    padding: 40px 30px 26px;
    margin-bottom: 40px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

.d1-journey__line {
    position: absolute;
    top: 60px;
    left: 12%;
    right: 12%;
    height: 3px;
    background: repeating-linear-gradient(to right, #a40000 0 10px, transparent 10px 18px);
}

.d1-journey__step {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #222;
    padding: 0 6px;
}

.d1-journey__circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #f5f5f5;
    border: 3px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: #666;
    margin-bottom: 12px;
    transition: 0.25s;
}

.d1-journey__label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.d1-journey__step:hover .d1-journey__circle {
    border-color: #a40000;
    color: #a40000;
    transform: scale(1.08);
}

.d1-journey__step.is-active .d1-journey__circle {
    background: #a40000;
    border-color: #a40000;
    color: #fff;
    transform: scale(1.1);
}

.d1-journey__step.is-active .d1-journey__label {
    color: #a40000;
}

.d1-step {
    scroll-margin-top: 100px;
}

@media (max-width: 768px) {
    .d1-journey {
        flex-wrap: wrap;
        gap: 20px 10px;
        padding: 26px 18px;
    }

    .d1-journey__line {
        display: none;
    }

    .d1-journey__step {
        flex: 1 1 40%;
    }
}

/* =========================================================
   Плавающая кнопка-помощник
   ========================================================= */

.d1-float-help {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #a40000;
    color: #fff !important;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 14px;
    box-shadow: 0 10px 26px rgba(164,0,0,0.35);
    transition: 0.25s;
}

.d1-float-help__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
    animation: d1-pulse 2.2s ease-in-out infinite;
}

.d1-float-help__text {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.d1-float-help:hover {
    background: #7a0000;
    transform: translateY(-2px);
}

@keyframes d1-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

@media (max-width: 576px) {
    .d1-float-help__text {
        display: none;
    }
}

/* =========================================================
   Нижняя мобильная CTA-панель
   ========================================================= */

.d1-mobile-cta-bar {
    display: none;
}

@media (max-width: 768px) {
    .d1-float-help {
        display: none;
    }

    .d1-mobile-cta-bar {
        display: flex;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 600;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        box-shadow: 0 -6px 20px rgba(0,0,0,0.12);
    }

    .d1-mobile-cta-bar .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 10px 6px;
        font-size: clamp(12px, 3.4vw, 16px);
    }

    /* Основная кнопка длиннее по тексту ("Получить консультацию" против "Позвонить") -
       ей нужна бОльшая доля ширины, иначе текст обрезается многоточием. */
    .d1-mobile-cta-bar .btn-danger {
        flex: 1.75;
    }

    body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }
}

/* =========================================================
   Рейтинг специалиста
   ========================================================= */

.d1-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    font-size: 15px;
}

.d1-rating__stars {
    color: #e0a800;
    letter-spacing: 2px;
    font-size: 16px;
}

.d1-rating__value {
    font-weight: 800;
    color: #111;
}

.d1-rating__count {
    color: #777;
    font-size: 13px;
}

.d1-stars {
    display: inline-flex;
    letter-spacing: 1px;
}

.d1-stars__star {
    color: #ddd;
}

.d1-stars__star.is-filled {
    color: #e0a800;
}

/* =========================================================
   Отзывы
   ========================================================= */

.d1-review-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-review-card__reply {
    margin-top: 12px;
    padding: 12px;
    background: #f7f5f0;
    border-radius: 10px;
    font-size: 14px;
}

.d1-rating-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.d1-rating-input label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* =========================================================
   Полоса доверия (гарантии)
   ========================================================= */

.d1-trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0 8px;
}

.d1-trust-item {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.d1-trust-item__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.d1-trust-item__title {
    font-weight: 800;
    font-size: 16px;
    color: #111;
    margin-bottom: 4px;
}

.d1-trust-item__text {
    font-size: 14px;
    color: #666;
    line-height: 1.45;
}

/* =========================================================
   Компактная форма "Перезвоните мне"
   ========================================================= */

.cf-quick-form {
    margin-top: 22px;
    max-width: 520px;
}

.cf-quick-form__label {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    margin-bottom: 10px;
}

.cf-quick-form__row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cf-quick-form .cf-input {
    flex: 1;
    min-width: 220px;
    border: none;
    padding: 13px 16px;
    border-radius: 999px;
    font-size: 16px;
}

.cf-quick-form .btn {
    border-radius: 999px;
    white-space: nowrap;
}

.cf-quick-form .cf-success-message {
    margin-top: 4px;
}

/* =========================================================
   FAQ
   ========================================================= */

.d1-faq {
    max-width: 860px;
    margin: 0 auto 40px;
}

.d1-faq-item {
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.d1-faq-item summary {
    font-weight: 800;
    font-size: 17px;
    color: #111;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.d1-faq-item summary::-webkit-details-marker {
    display: none;
}

.d1-faq-item summary::after {
    content: "+";
    font-size: 22px;
    color: #a40000;
    margin-left: 12px;
    flex-shrink: 0;
}

.d1-faq-item[open] summary::after {
    content: "−";
}

.d1-faq-item p {
    margin: 14px 0 0;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

/* =========================================================
   Похожие специалисты
   ========================================================= */

.d1-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.d1-similar-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 22px rgba(0,0,0,0.07);
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.d1-similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.d1-similar-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.d1-similar-card__body {
    padding: 14px 16px;
}

.d1-similar-card__name {
    font-weight: 800;
    font-size: 16px;
    color: #111;
    margin-bottom: 2px;
}

.d1-similar-card__specialty {
    color: #a40000;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

/* =========================================================
   Сортировка
   ========================================================= */

.d1-sort-select {
    width: 100%;
    padding: 10px 38px 10px 12px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

/* =========================================================
   Блог
   ========================================================= */

.d1-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 20px;
}

.d1-blog-card {
    display: block;
    background: #fff;
    border-radius: 20px;
    padding: 26px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 28px rgba(0,0,0,0.07);
    border-top: 5px solid #a40000;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.d1-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.12);
}

.d1-blog-card__thumb {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff2f2, #ffe1e1);
    color: #a40000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.d1-blog-card__thumb svg {
    width: 30px;
    height: 30px;
}

.d1-blog-post__hero {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 8px;
    height: 140px;
    border-radius: 24px;
    background: linear-gradient(135deg, #a40000, #6e0000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.d1-blog-post__hero svg {
    width: 60px;
    height: 60px;
}

.d1-blog-card__category {
    display: inline-block;
    background: #f5f5f5;
    color: #a40000;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.d1-blog-card__title {
    font-size: 20px;
    font-weight: 850;
    color: #111;
    margin: 0 0 10px;
    line-height: 1.3;
}

.d1-blog-card__excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.55;
    margin: 0 0 14px;
}

.d1-blog-card__meta {
    font-size: 13px;
    color: #999;
    font-weight: 600;
}

.d1-blog-post__category {
    display: inline-block;
    background: #f5f5f5;
    color: #a40000;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.d1-blog-post__meta {
    color: #888;
    font-size: 15px;
    margin: -14px 0 30px;
}

/* =========================================================
   Регистрация специалиста
   ========================================================= */

.d1-register-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px;
    max-width: 720px;
    margin: 0 auto 40px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

.d1-register-card .cf-btn {
    width: auto;
    padding: 13px 30px;
}

.d1-photo-preview {
    margin-top: 10px;
}

.d1-photo-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
}

.cf-error-message {
    display: none;
    background: #fdecea;
    color: #a40000;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 10px;
}

.d1-specialist-card__actions-hint {
    font-size: 13.5px;
    color: #777;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.d1-specialist-card__actions-hint li {
    line-height: 1.5;
}

.d1-specialist-card__actions-hint b {
    color: #333;
}

.cf-specialist-context {
    background: #fff4f0;
    color: #a40000;
    border: 1px solid #f3d6cd;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.d1-register-cta {
    margin-top: 30px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.d1-register-cta p {
    margin: 0 0 14px;
    font-weight: 700;
    color: #333;
}

/* =========================================================
   Аватар-заглушка (инициалы) для зарегистрированных специалистов
   ========================================================= */

.d1-avatar-initials {
    width: 100%;
    height: 100%;
    min-height: 140px;
    border-radius: 16px;
    background: linear-gradient(135deg, #a40000, #2a0000);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 40px;
    letter-spacing: 0.05em;
}

.d1-finder-card__photo .d1-avatar-initials {
    width: 180px;
    height: 180px;
    min-height: 0;
}

.d1-avatar-initials--lg {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 5/4;
    border-radius: 22px;
    font-size: 64px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}

/* =========================================================
   Админ-панель
   ========================================================= */

.d1-admin-login {
    max-width: 320px;
}

.d1-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    font-size: 14px;
}

.d1-admin-table th,
.d1-admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.d1-admin-table th {
    background: #f5f5f5;
    font-weight: 800;
}

.d1-admin-table form {
    margin-bottom: 6px;
}

.d1-admin-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.d1-admin-status--pending {
    background: #fff3cd;
    color: #7a5b00;
}

/* Было #a40000 (тот же тревожный красный, что и "срочно"/"требует внимания") - для
   позитивного статуса (одобрено/принято/активен) это читалось как проблема. */
.d1-admin-status--verified {
    background: #dcfce7;
    color: #166534;
}

.d1-admin-status--rejected {
    background: #eee;
    color: #777;
}

/* Мяч на стороне другого участника - ждём ответа (например "нужны уточнения" у анкеты
   специалиста), в отличие от pending, где решение ещё за нами. */
.d1-admin-status--waiting {
    background: #ccfbf1;
    color: #0f766e;
}

/* Требует внимания прямо сейчас (например "очень срочно" у обращения). */
.d1-admin-status--action {
    background: #fee2e2;
    color: #b91c1c;
}

/* ---- Стадии воронки лидов: 5 цветов с понятным смыслом (не 12 - см. комментарий у
   LEAD_STATUS_COLOR в functions/_leads.js), одинаковые по смыслу во всей админке ---- */
.d1-stage {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.d1-stage--action   { background: #fee2e2; color: #b91c1c; }
.d1-stage--progress { background: #fef3c7; color: #92400e; }
.d1-stage--waiting   { background: #ccfbf1; color: #0f766e; }
.d1-stage--done      { background: #dcfce7; color: #166534; }
.d1-stage--closed    { background: #f3f4f6; color: #4b5563; }

/* ---- Таблица/карточки: desktop = таблица, mobile = карточки (см. @media ниже) ---- */
.d1-admin-table-wrap {
    overflow-x: auto;
}

.d1-admin-cards {
    display: none;
}

.d1-admin-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-admin-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.d1-admin-card__title {
    font-weight: 800;
    font-size: 15px;
}

.d1-admin-card__subtitle {
    color: #777;
    font-size: 13px;
    margin-top: 2px;
}

.d1-admin-card__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #444;
    margin-bottom: 12px;
}

.d1-admin-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.d1-admin-card__actions .btn {
    width: auto;
    padding: 8px 14px;
    font-size: 13px;
}

/* ---- Компактные кнопки действий в десктопной таблице (не в карточках) ---- */
.d1-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.d1-admin-actions .btn {
    width: auto;
    padding: 7px 14px;
    font-size: 13px;
}

.d1-admin-actions form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* ---- Второстепенные действия строки, схлопнутые под "Ещё" (см. actionsGroup в
   _shared.js) — раскрываются вниз внутри той же строки, без абсолютного позиционирования,
   чтобы не обрезаться overflow-x таблицы. ---- */
.d1-actions-more {
    display: inline-block;
}

.d1-actions-more__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #ccc;
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
    color: #333;
    user-select: none;
}

.d1-actions-more__toggle::-webkit-details-marker {
    display: none;
}

.d1-actions-more__toggle::after {
    content: "▾";
    font-size: 10px;
}

.d1-actions-more[open] .d1-actions-more__toggle::after {
    content: "▴";
}

.d1-actions-more__toggle:hover {
    background: #f5f5f5;
}

.d1-actions-more__panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* ---- Дашборд ---- */
.d1-dashboard {
    margin: 22px 0 10px;
}

.d1-dash-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.d1-dash-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-top: 3px solid #a40000;
    color: inherit;
    text-decoration: none;
}

.d1-dash-card--link {
    cursor: pointer;
    transition: box-shadow .15s ease, transform .15s ease;
}

.d1-dash-card--link:hover,
.d1-dash-card--link:focus-visible {
    box-shadow: 0 6px 18px rgba(0,0,0,0.11);
    transform: translateY(-1px);
    color: inherit;
}

.d1-dash-card__value {
    font-size: 26px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.d1-dash-card__label {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.d1-dash-card__hint {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.d1-dash-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

/* ---- Дашборд: ссылки на разделы CRM (каждый раздел — своя страница, дашборд — только сводка) ---- */
.d1-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.d1-quicklink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-top: 3px solid #a40000;
    color: #26282b;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.d1-quicklink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.d1-quicklink__arrow {
    color: #a40000;
    font-size: 18px;
}

/* =========================================================
   Личный кабинет специалиста — сводная плашка и карточки переписок
   ========================================================= */

.d1-kab-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.d1-kab-stat {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-kab-stat--attention {
    background: #fff8e1;
}

.d1-kab-stat__num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #111;
    line-height: 1.1;
}

.d1-kab-stat__label {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #777;
}

.d1-conv-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.d1-conv-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-left: 4px solid #ccc;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.d1-conv-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.d1-conv-card--pending {
    border-left-color: #d4a017;
}

.d1-conv-card--verified {
    border-left-color: #a40000;
}

.d1-conv-card--rejected {
    border-left-color: #bbb;
}

.d1-conv-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.d1-conv-card__name {
    font-weight: 800;
    font-size: 16px;
    color: #111;
}

.d1-conv-card__preview {
    margin: 8px 0 0;
    color: #555;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.d1-conv-card__meta {
    margin-top: 8px;
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: #999;
}

.d1-conv-empty {
    background: #fff;
    border-radius: 14px;
    padding: 32px 20px;
    text-align: center;
    color: #777;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.d1-dash-table th,
.d1-dash-table td {
    text-align: left;
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
}

.d1-dash-table th {
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.d1-dash-empty {
    color: #999;
    font-size: 13px;
    padding: 8px 0;
}

.d1-dash-panel {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-dash-panel__title {
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    margin-bottom: 10px;
}

.d1-sparkline {
    display: block;
}

.d1-dash-source-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 14px;
}

.d1-dash-source-row:last-child {
    border-bottom: none;
}

/* ---- Фильтры ---- */
.d1-admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin: 16px 0 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-admin-filters .cf-control-group {
    margin-bottom: 0;
    min-width: 150px;
}

.d1-admin-filters__actions {
    display: flex;
    gap: 8px;
}

.d1-admin-filters__actions .btn {
    width: auto;
}

.d1-admin-filters__search {
    flex: 1 1 220px;
}

/* ---- Быстрые сохранённые фильтры ---- */
.d1-admin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.d1-admin-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.d1-admin-chip:hover {
    border-color: #a40000;
}

.d1-admin-chip.is-active {
    background: #a40000;
    border-color: #a40000;
    color: #fff;
}

/* ---- SLA-метки в списке лидов ---- */
.d1-sla-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.d1-sla-badge--ok {
    background: #eef7ee;
    color: #2c7a2c;
}

.d1-sla-badge--warn {
    background: #fff3cd;
    color: #7a5b00;
}

.d1-sla-badge--danger {
    background: #fdeaea;
    color: #a40000;
}

/* ---- Пагинация списка лидов ---- */
.d1-admin-pagination {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}

.d1-admin-pagination .btn {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* ---- Предупреждение о возможном дубликате лида ---- */
.d1-lead-warning {
    background: #fff3cd;
    border: 1px solid #f0d98c;
    color: #7a5b00;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 12px 0;
    font-size: 14px;
}

.d1-lead-warning a {
    color: #7a5b00;
    font-weight: 700;
}

/* ---- Карточка обращения ---- */
.d1-lead-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    font-size: 15px;
}

.d1-lead-events {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
}

.d1-lead-events li {
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
    font-size: 14px;
}

.d1-lead-events li:last-child {
    border-bottom: none;
}

/* =========================================================
   Мобильная версия
   ========================================================= */

@media (max-width: 768px) {
    /* Компактная шапка: убираем вторую строку (соцсети/телефон/почта),
       вместо неё — иконка звонка прямо в основной шапке. */
    #sp-top-bar {
        display: none;
    }

    .d1-header-phone {
        display: flex;
    }

    #sp-header .container-inner {
        padding: 10px 16px;
        gap: 10px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .com-content-article__body h2 {
        font-size: 24px;
    }

    .d1-hero {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .d1-hero h1 {
        font-size: 32px;
    }

    .d1-hero p {
        font-size: 17px;
    }

    .d1-hero-actions .btn {
        width: 100%;
    }

    .d1-directions {
        grid-template-columns: 1fr;
    }

    .d1-benefits {
        grid-template-columns: 1fr;
    }

    .d1-call {
        padding: 32px 22px;
        border-radius: 20px;
    }

    .d1-search-help {
        display: block;
        padding: 24px;
    }

    .d1-search-help h3 {
        font-size: 24px;
    }

    .d1-search-help-buttons {
        margin-top: 24px;
        min-width: auto;
    }

    .d1-search-help .btn {
        width: 100%;
    }

    .com-finder__results-list .result__item {
        padding: 20px;
        border-radius: 16px;
    }

    .result__title-link {
        font-size: 21px;
    }

    .result__description {
        font-size: 15px;
    }

    .d1-finder-card {
        display: block;
    }

    .d1-finder-card__photo img {
        width: 100%;
        height: auto;
        margin-bottom: 16px;
    }

    .d1-specialist-card {
        display: block;
        padding: 22px;
        border-radius: 18px;
    }

    .d1-specialist-card__photo img {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .d1-specialist-card__title {
        font-size: 30px;
    }

    .d1-specialist-card__actions .btn {
        width: 100%;
        text-align: center;
    }

    .d1-specialist-section {
        margin-top: 16px;
        padding: 20px;
    }

    .jfilters-filters-container {
        display: block;
    }

    .jfilters-filter-container {
        margin-bottom: 20px;
    }

    .d1-trust-strip {
        grid-template-columns: 1fr;
    }

    .d1-similar-grid {
        grid-template-columns: 1fr;
    }

    .d1-blog-grid {
        grid-template-columns: 1fr;
    }

    .cf-quick-form .cf-input {
        min-width: 100%;
    }

    .cf-quick-form .btn {
        width: 100%;
    }

    /* ---- Админ-панель: карточки вместо таблиц ---- */
    .d1-admin-table-wrap {
        display: none;
    }

    .d1-admin-cards {
        display: block;
    }

    .d1-dash-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .d1-dash-row {
        grid-template-columns: 1fr;
    }

    .d1-admin-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .d1-admin-filters .cf-control-group {
        min-width: 0;
    }

    .d1-lead-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   География и специальности
   ========================================================= */

.d1-geo-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin: 0 0 44px;
    padding: 28px 20px;
    background: #1a1a1a;
    border-radius: 16px;
    color: #fff;
    text-align: center;
}

.d1-geo-stats__num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #ff5c5c;
    line-height: 1.2;
}

.d1-geo-stats__label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-top: 2px;
}

.d1-spec-icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.d1-spec-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-decoration: none;
    color: #222;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.d1-spec-icon-card__icon {
    display: flex;
    width: 44px;
    height: 44px;
}

.d1-spec-icon-card__icon svg {
    width: 100%;
    height: 100%;
}

.d1-spec-icon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(164,0,0,0.18);
    background: #a40000;
    color: #fff;
}

.d1-geo-search {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 480px;
    margin: 0 auto 10px;
}

.d1-geo-search .cf-input {
    flex: 1;
}

.d1-geo-search__count {
    white-space: nowrap;
    color: #777;
    font-size: 14px;
    min-width: 90px;
}

.d1-geo-hint {
    text-align: center;
    color: #777;
    font-size: 14px;
    max-width: 560px;
    margin: 0 auto 32px;
}

.d1-geo-regions {
    max-width: 860px;
    margin: 0 auto 48px;
}

.d1-geo-region {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 4px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.d1-geo-region summary {
    cursor: pointer;
    padding: 16px 0;
    font-weight: 700;
    font-size: 17px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.d1-geo-region summary::-webkit-details-marker {
    display: none;
}

.d1-geo-region summary::before {
    content: "▸";
    color: #a40000;
    transition: transform 0.2s;
}

.d1-geo-region[open] summary::before {
    transform: rotate(90deg);
}

.d1-geo-region__count {
    color: #999;
    font-weight: 500;
    font-size: 14px;
}

.d1-geo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 18px;
}

.d1-geo-chips--intl {
    max-width: 860px;
    margin: 0 auto 48px;
}

.d1-geo-chip {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f2f2f2;
    color: #444;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.d1-geo-chip--active {
    background: #fdeaea;
    color: #a40000;
    font-weight: 600;
}

.d1-geo-chip--active:hover {
    background: #a40000;
    color: #fff;
}

.d1-geo-region.d1-geo-region--hidden,
.d1-geo-chip.d1-geo-chip--hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .d1-spec-icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .d1-geo-stats {
        gap: 28px;
    }

    .d1-geo-search {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   Чат клиент<->специалист
   ========================================================= */

.d1-chat {
    max-width: 640px;
    margin: 0 auto;
    --d1-chat-accent: #a40000;
}

.d1-chat--support {
    --d1-chat-accent: #2c3e50;
}

.d1-chat__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid #eee;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-chat__header-avatar,
.d1-chat__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--d1-chat-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.d1-chat__messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 160px;
    max-height: 60vh;
    height: auto;
    overflow-y: auto;
    padding: 18px;
    background: #f4f4f4;
    margin-bottom: 14px;
}

.d1-chat__header + .d1-chat__messages {
    border-radius: 0 0 14px 14px;
}

.d1-chat > .d1-chat__messages:first-child {
    border-radius: 14px;
}

.d1-chat__bubble-group {
    max-width: 78%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.d1-chat__bubble-group--mine {
    align-self: flex-end;
    align-items: flex-end;
}

.d1-chat__bubble-group--theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.d1-chat__bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.d1-chat__bubble--mine {
    background: var(--d1-chat-accent);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.d1-chat__bubble--theirs {
    background: #fff;
    color: #222;
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.d1-chat__time {
    font-size: 11px;
    color: #999;
    padding: 0 4px;
}

.d1-chat__bubble--system {
    align-self: center;
    background: #fff;
    color: #888;
    font-size: 12px;
    text-align: center;
    max-width: 100%;
    padding: 5px 14px;
    border-radius: 999px;
    font-weight: 600;
}

.d1-chat__bubble--blocked {
    align-self: center;
    max-width: 100%;
    background: #fdecea;
    color: #a40000;
    border: 1px dashed #a40000;
    font-size: 14px;
}

.d1-chat__input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.d1-chat__input-row .cf-input {
    flex: 1;
    resize: vertical;
}

.d1-chat-error {
    display: none;
    background: #fdecea;
    color: #a40000;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.d1-chat__deal-form {
    margin-top: 14px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 12px;
}

.d1-deal-card {
    align-self: center;
    max-width: 92%;
    width: 100%;
    background: #fff;
    border: 2px solid var(--d1-chat-accent, #a40000);
    border-radius: 14px;
    padding: 0;
    margin: 4px 0;
    overflow: hidden;
}

.d1-deal-card__title {
    font-weight: 800;
    color: #fff;
    background: var(--d1-chat-accent, #a40000);
    padding: 8px 18px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.d1-deal-card__body {
    padding: 14px 18px 18px;
}

.d1-deal-card__desc {
    white-space: pre-wrap;
    margin-bottom: 8px;
}

.d1-deal-card__price {
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 8px;
}

.d1-deal-card__status {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #777;
    margin-bottom: 8px;
}

.d1-deal-card--accepted {
    border-color: #1e7e34;
}

.d1-deal-card--accepted .d1-deal-card__status {
    color: #1e7e34;
}

.d1-deal-card--declined {
    border-color: #999;
    opacity: 0.75;
}

.d1-deal-card__actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .d1-chat__bubble,
    .d1-deal-card {
        max-width: 92%;
    }

    .d1-chat__input-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   Оболочка админ-панели: сайдбар (desktop) / выдвижное меню (mobile)
   ========================================================= */

.d1-admin-body {
    background: #f6f6f7;
}

.d1-admin-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.d1-admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.d1-admin-sidebar__brand {
    font-weight: 800;
    font-size: 18px;
    color: #26282b;
    margin-bottom: 12px;
}

.d1-admin-sidebar__brand a {
    color: inherit;
    text-decoration: none;
}

.d1-admin-sidebar__user {
    font-size: 13px;
    color: #666;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.d1-admin-sidebar__nav {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.d1-admin-nav-group {
    margin: 0;
}

.d1-admin-nav-group__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin: 16px 0 6px;
    padding: 4px 2px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    border-radius: 6px;
}

.d1-admin-nav-group__title:hover {
    color: #666;
}

.d1-admin-nav-group__title::-webkit-details-marker {
    display: none;
}

.d1-admin-nav-group__title::after {
    content: "▾";
    font-size: 9px;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.d1-admin-nav-group:not([open]) .d1-admin-nav-group__title::after {
    transform: rotate(-90deg);
}

.d1-admin-sidebar__nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    min-height: 44px;
    line-height: 26px;
}

.d1-admin-sidebar__nav a:hover,
.d1-admin-sidebar__nav a:focus-visible {
    background: #f5f5f5;
}

.d1-admin-sidebar__nav a:focus-visible {
    outline: 2px solid #a40000;
    outline-offset: -2px;
}

.d1-admin-sidebar__nav a.is-active {
    background: #a40000;
    color: #fff;
}

.d1-admin-nav-badge {
    flex-shrink: 0;
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #a40000;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    margin-left: 8px;
}

.d1-admin-sidebar__nav a.is-active .d1-admin-nav-badge {
    background: #fff;
    color: #a40000;
}

.d1-admin-sidebar__logout {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.d1-admin-main {
    flex: 1;
    min-width: 0;
    padding: 32px 28px;
    max-width: 1400px;
}

/* =========================================================
   Справочники — раскрывающиеся описания разделов админки
   ========================================================= */

.d1-ref-section {
    margin: 28px 0 10px;
}

.d1-ref-section__title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin: 0 0 10px;
}

.d1-ref-item {
    background: #fff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.d1-ref-item summary {
    font-weight: 700;
    font-size: 15px;
    color: #111;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.d1-ref-item summary::-webkit-details-marker {
    display: none;
}

.d1-ref-item summary::after {
    content: "▾";
    font-size: 12px;
    color: #a40000;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.d1-ref-item[open] summary::after {
    transform: rotate(180deg);
}

.d1-ref-item__body {
    margin-top: 12px;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

.d1-ref-item__body p {
    margin: 0 0 10px;
}

.d1-ref-item__body ul,
.d1-ref-item__body ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

.d1-ref-item__body li {
    margin-bottom: 4px;
}

.d1-ref-item__body strong {
    color: #111;
}

.d1-ref-item__body code {
    background: #f2f2f2;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 13px;
}

.d1-admin-menu-toggle {
    display: none;
}

.d1-admin-overlay {
    display: none;
}

@media (max-width: 900px) {
    .d1-admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 120;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: #26282b;
        color: #fff;
        border: none;
        font-size: 18px;
    }

    .d1-admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 110;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.15);
        width: 82vw;
        max-width: 300px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
    }

    .d1-admin-sidebar.is-open {
        transform: translateX(0);
    }

    .d1-admin-overlay.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 105;
    }

    .d1-admin-main {
        padding: 70px 16px 32px;
    }
}
