/* ====================================================
   Трезвость и Здоровье — Custom Styles (on top of Bootstrap 5)
   Лечение алкоголизма в Брянске · Метод Довженко
   Общая таблица стилей: подключается на всех страницах сайта
   ==================================================== */

/* ==================== TOKENS ==================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-soft: #dbeafe;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --ink: #0f172a;
    --slate: #475569;
    --slate-light: #64748b;
    --slate-on-dark: #94a3b8;
    --mist: #f1f5f9;
    --white: #ffffff;
    --soft-border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --shadow: 0 4px 20px rgba(15,23,42,.08);
    --shadow-lg: 0 20px 50px rgba(15,23,42,.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --maxw: 1200px;
    --bs-body-font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--slate);
    --bs-body-font-size: 1rem;
    --bs-headings-font-family: 'Manrope', sans-serif;
    --bs-primary: var(--primary);
    --bs-link-color: var(--primary-dark);
    --bs-link-hover-color: #1e40af;
}

/* ==================== BASE ==================== */
body {
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-family: var(--bs-headings-font-family);
    color: var(--ink);
    font-weight: 800;
    line-height: 1.25;
    text-wrap: balance;
}

p { text-wrap: pretty; }

section[id] { scroll-margin-top: 90px; }
.section { padding: 90px 0; }
.section--soft { background: var(--mist); }
.section--teal {
    background: linear-gradient(135deg, #1e40af 0%, var(--primary-dark) 55%, var(--primary) 100%);
    color: var(--white);
}
.section--npt { padding-top: 0; }

.section-head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section-head .section-sub { margin-left: auto; margin-right: auto; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--bs-headings-font-family);
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary-dark); background: var(--primary-soft);
    padding: 6px 16px; border-radius: 100px; margin-bottom: 18px;
}
.section--teal .eyebrow { background: rgba(30,64,175,.6); color: var(--white); }
.hero .eyebrow { background: rgba(255,255,255,.6); color: var(--primary-dark); }

.section-title { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.section--teal .section-title { color: var(--white); }
.section-sub { font-size: 1.08rem; max-width: 720px; margin-bottom: 0; }

.muted-sm { color: var(--slate-light); font-size: .875rem; }
.text-on-teal { color: var(--white); }

/* ==================== BUTTONS ==================== */
.btn { font-family: var(--bs-headings-font-family); font-weight: 700; border-radius: 100px; padding: 14px 30px; transition: all .25s; white-space: normal; }
.btn-lg { padding: 16px 38px; font-size: 1.05rem; }
.btn-sm { padding: 10px 22px; font-size: .9rem; }
.btn--primary { background: var(--accent); color: var(--ink); border: none; box-shadow: 0 4px 16px rgba(245,158,11,.35); }
.btn--primary:hover { background: var(--accent-dark); color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,158,11,.4); }
.btn--ghost { background: var(--white); color: var(--primary-dark); border: 2px solid var(--primary-soft); }
.btn--ghost:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.btn--white { background: var(--white); color: var(--primary-dark); border: none; }
.btn--white:hover { background: var(--primary-soft); color: var(--primary-dark); transform: translateY(-2px); }

/* ==================== TOPBAR ==================== */
.topbar { background: var(--ink); color: #cbd5e1; font-size: .85rem; padding: 8px 0; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: var(--white); }
.topbar__dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
/* ==================== NAVBAR ==================== */
.navbar-custom {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--soft-border);
    box-shadow: none;
}
.navbar-custom .nav-link {
    font-family: var(--bs-headings-font-family); font-weight: 600; font-size: .95rem;
    color: var(--slate) !important; padding: 10px 18px !important; border-radius: 100px; transition: all .2s;
    white-space: nowrap;
}
.navbar-custom .nav-link:hover { background: var(--mist); color: var(--ink) !important; }

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo__mark {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 50%; display: grid; place-items: center; overflow: hidden;
}
.logo__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__name { font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo__tag { font-size: .78rem; color: var(--slate-light); font-weight: 600; letter-spacing: .02em; }

/* ==================== HERO ==================== */
.hero {
  position: relative; overflow: hidden;
  background-color: #d8e7f5;
  background-image:
    radial-gradient(ellipse 480px 320px at 18% 35%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.55) 35%, transparent 70%),
    radial-gradient(ellipse 520px 300px at 55% 25%, rgba(255,255,255,.85) 0%, rgba(255,255,255,.40) 40%, transparent 75%),
    radial-gradient(ellipse 600px 360px at 80% 70%, rgba(255,255,255,.75) 0%, rgba(255,255,255,.30) 45%, transparent 80%),
    radial-gradient(circle 90px at 88% 18%, rgba(255,255,255,.85), transparent 75%),
    radial-gradient(circle 70px at 78% 42%, rgba(255,255,255,.80), transparent 75%),
    radial-gradient(circle 55px at 92% 60%, rgba(255,255,255,.70), transparent 75%),
    linear-gradient(135deg, #eaf4fb 0%, #cfe2f2 35%, #b3d2ea 70%, #7fb0dc 100%);
  padding: 70px 0 80px;
}
.hero--page { padding: 48px 0 56px; }
.hero__title { font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.15; margin-bottom: 22px; }
.hero--page .hero__title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-bottom: 14px; }
.hero__title span { color: var(--primary); }
.hero__desc { font-size: 1.15rem; margin-bottom: 32px; max-width: 560px; }
.hero--page .hero__desc { font-size: 1.05rem; margin-bottom: 26px; }

.hero__stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hero__stat { display: flex; flex-direction: column; gap: 6px; }
.hero__stat-num { font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 2rem; color: var(--ink); line-height: 1; }
.hero__stat-label { font-size: .875rem; color: var(--slate); font-weight: 600; }

.hero__card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 36px; position: relative;
    border: 1px solid var(--soft-border);
}
.hero__card-badge {
    position: absolute; top: -18px; right: 28px;
    background: var(--accent); color: var(--ink);
    font-family: var(--bs-headings-font-family); font-weight: 700; font-size: .82rem;
    padding: 8px 20px; border-radius: 100px; box-shadow: 0 4px 14px rgba(245,158,11,.4);
}
.hero__card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.hero__card-sub { color: var(--slate-light); font-size: .9rem; margin-bottom: 24px; }
.hero__card-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--soft-border); }
.hero__card-row:last-of-type { border-bottom: none; }
.hero__card-row-label { font-size: .92rem; color: var(--slate); display: flex; align-items: center; gap: 10px; }
.hero__card-row-label svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.hero__card-row-val { font-family: var(--bs-headings-font-family); font-weight: 700; color: var(--ink); text-align: right; }
.hero__card-btn { width: 100%; margin-top: 12px; }

/* ==================== TRUST ==================== */
.trust { background: var(--white); border-bottom: 1px solid var(--soft-border); }
.trust__item { display: flex; align-items: center; gap: 12px; height: 100%; }
.trust__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; }
.trust__icon svg { width: 24px; height: 24px; color: var(--primary-dark); }
.trust__text { font-family: var(--bs-headings-font-family); font-weight: 700; font-size: .95rem; color: var(--ink); line-height: 1.3; }
.trust__sub { display: block; font-weight: 500; font-size: .85rem; color: var(--slate-light); margin-top: 2px; }
.trust__text a { color: inherit; text-decoration: none; }
.trust__text a:hover { text-decoration: underline; }

/* ==================== SERVICE CARDS ==================== */
.service-card {
    background: var(--white); border: 1px solid var(--soft-border); border-radius: var(--radius-lg);
    padding: 38px 32px; transition: all .3s; position: relative; overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 24px; }
.service-card__icon svg { width: 32px; height: 32px; }
.service-card__icon--a { background: #dbeafe; } .service-card__icon--a svg { color: #2563eb; }
.service-card__icon--b { background: #fef3c7; } .service-card__icon--b svg { color: #d97706; }
.service-card__icon--c { background: #e0e7ff; } .service-card__icon--c svg { color: #4f46e5; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { font-size: 1rem; margin-bottom: 22px; }
.service-card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.service-card__link {
    font-family: var(--bs-headings-font-family); font-weight: 700; font-size: .95rem;
    color: var(--primary-dark); text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.service-card__link svg { width: 16px; height: 16px; transition: transform .2s; }
.service-card__link:hover { color: #1e40af; }
.service-card__link:hover svg { transform: translateX(3px); }

/* ==================== METHOD ==================== */
.method__visual { position: relative; }
.method__visual-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: top center; }
@media (min-width: 768px) and (max-width: 991.98px) {
    /* на планшете фото во всю ширину получаются слишком высокими */
    .method__visual-img { aspect-ratio: 16/10; }
    .doctor__photo { aspect-ratio: 16/10; }
}

.method__list { list-style: none; margin: 28px 0; padding: 0; }
.method__list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--soft-border); }
.method__list li:last-child { border-bottom: none; }
.method__check { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }
.method__check svg { width: 15px; height: 15px; color: var(--primary-dark); }
.method__list strong { color: var(--ink); }

/* ==================== PROCESS ==================== */
.process__step {
    background: var(--white); border-radius: var(--radius); padding: 32px 26px;
    border: 1px solid var(--soft-border); position: relative; transition: all .3s; height: 100%;
}
.process__step:hover { box-shadow: var(--shadow); border-color: var(--primary-soft); }
.process__num {
    font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 2.6rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1; margin-bottom: 16px;
}
.process__step h3 { font-size: 1.15rem; margin-bottom: 10px; }
.process__step p { font-size: .95rem; }

/* ==================== DOCTOR ==================== */
.doctor__photo-wrap { position: relative; }
.doctor__photo {
    width: 100%; height: auto; border-radius: var(--radius-lg); aspect-ratio: 3/4; object-fit: cover; object-position: top center;
    box-shadow: var(--shadow-lg);
}
.doctor__role { color: var(--white); font-family: var(--bs-headings-font-family); font-weight: 700; font-size: 1.1rem; margin-bottom: 24px; display: block; }
.doctor__facts { list-style: none; margin: 0 0 22px; padding: 0; }
.doctor__facts li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.22); font-size: .98rem; line-height: 1.55; }
.doctor__facts li:first-child { padding-top: 0; }
.doctor__facts li:last-child { border-bottom: none; }
.doctor__year { font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 1.05rem; flex-shrink: 0; }
.credential {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary-soft); color: var(--primary-dark);
    font-family: var(--bs-headings-font-family); font-weight: 600; font-size: .85rem;
    padding: 8px 16px; border-radius: 100px; text-decoration: none;
}
.credential:hover { background: var(--white); color: var(--primary-dark); }
.credential svg { width: 16px; height: 16px; flex-shrink: 0; }
.doctor__actions { margin-top: 28px; }

/* ==================== FAQ ==================== */
.faq { max-width: 820px; margin: 0 auto; }
.faq .accordion-item { border: 1px solid var(--soft-border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px; background: var(--white); }
.faq .accordion-button { font-family: var(--bs-headings-font-family); font-weight: 700; color: var(--ink); padding: 20px 24px; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { background: var(--primary-soft); color: var(--primary-dark); box-shadow: none; }
.faq .accordion-button:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; box-shadow: none; }
.faq .accordion-body { padding: 0 24px 22px; color: var(--slate); line-height: 1.65; }

.faq-cta {
    max-width: 820px; margin: 40px auto 0; padding: 28px 32px; border-radius: var(--radius-lg);
    background: var(--white); border: 1px solid var(--soft-border);
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
}
.faq-cta h3 { font-size: 1.2rem; margin-bottom: 6px; }
.faq-cta p { margin: 0; }
.faq-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==================== DOCUMENTS ==================== */
.docs-group + .docs-group { margin-top: 44px; }
.docs-group__title { font-size: 1.2rem; margin-bottom: 18px; }
.docs-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}
.docs-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.doc-thumb {
    display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 0; font: inherit; text-align: left;
    border-radius: var(--radius-md); background: var(--white);
    box-shadow: var(--shadow-sm); cursor: pointer;
    border: 1px solid rgba(37,99,235,.10);
    transition: transform .25s ease, box-shadow .25s ease;
}
.doc-thumb__frame { position: relative; overflow: hidden; background: var(--mist); aspect-ratio: 218 / 300; }
.docs-grid--4 .doc-thumb__frame { aspect-ratio: 3 / 2; }
.doc-thumb__frame::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(37,99,235,.18));
    opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.doc-thumb:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doc-thumb:hover .doc-thumb__frame::after { opacity: 1; }
.doc-thumb img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block;
    transition: transform .35s ease;
}
.doc-thumb:hover img { transform: scale(1.04); }
.doc-thumb__caption {
    padding: 12px 14px 14px; background: var(--white);
    font-family: var(--bs-headings-font-family); font-weight: 700; font-size: .85rem; line-height: 1.35; color: var(--ink);
    hyphens: auto; overflow-wrap: anywhere;
}
.doc-thumb__caption span {
    display: block; margin-top: 4px;
    font-family: var(--bs-body-font-family); font-weight: 600; font-size: .78rem; color: var(--slate-light);
}
.doc-thumb:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.doc-modal .modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); color: var(--white); }
.doc-modal .modal-header { border-bottom: 1px solid rgba(255,255,255,.12); padding: 14px 20px; }
.doc-modal .modal-title { font-family: var(--bs-headings-font-family); font-weight: 700; font-size: 1rem; color: var(--white); }
.doc-modal .modal-body { position: relative; padding: 16px; background: var(--ink); }
.doc-modal-img { display: block; max-width: 100%; margin: 0 auto; border-radius: 6px; background: var(--white); object-fit: contain; }
.doc-modal__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center;
    box-shadow: var(--shadow); transition: background .2s;
}
.doc-modal__nav:hover { background: var(--white); }
.doc-modal__nav svg { width: 22px; height: 22px; }
.doc-modal__nav--prev { left: 26px; }
.doc-modal__nav--next { right: 26px; }
.doc-modal__counter { margin-top: 12px; text-align: center; font-size: .875rem; color: var(--slate-on-dark); }

/* ==================== CONTACTS ==================== */
.contact-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 40px 36px;
    border: 1px solid var(--soft-border); transition: all .3s; height: 100%;
    display: flex; flex-direction: column;
}
.contact-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-soft); }
.contact-card__city {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 1.4rem; color: var(--ink); margin-bottom: 24px;
}
.contact-card__city-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; }
.contact-card__city-icon svg { width: 22px; height: 22px; color: var(--primary-dark); }
.contact-card__row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--soft-border); }
.contact-card__row:last-of-type, .contact-card__row:has(+ .contact-card__hours), .contact-card__row:has(+ .contact-card__hint) { border-bottom: none; }
.contact-card__row svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.contact-card__row-label { font-size: .8rem; color: var(--slate-light); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.contact-card__row-val { font-family: var(--bs-headings-font-family); font-weight: 700; color: var(--ink); font-size: 1rem; }
.contact-card__row-val a { color: var(--ink); }
.contact-card__hours {
    background: var(--mist); border-radius: 12px; padding: 18px 20px; margin-top: 20px;
    display: flex; gap: 12px; align-items: flex-start;
}
.contact-card__hours svg { width: 20px; height: 20px; color: var(--accent-dark); flex-shrink: 0; margin-top: 2px; }
.contact-card__hours-text { font-size: .88rem; color: var(--slate); }
.contact-card__hours-text strong { color: var(--ink); }
.contact-card__hint {
    background: var(--primary-soft); border-radius: 12px; padding: 18px 20px; margin-top: 12px;
    display: flex; gap: 12px; align-items: flex-start;
}
.contact-card__hint svg { width: 20px; height: 20px; color: var(--primary-dark); flex-shrink: 0; margin-top: 2px; }
.contact-card__hint strong { display: block; font-family: var(--bs-headings-font-family); font-size: .95rem; color: var(--ink); margin-bottom: 2px; }
.contact-card__hint-text { font-size: .9rem; color: var(--slate); }
.contact-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.contact-map {
    position: relative;
    height: 100%; min-height: 420px;
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--soft-border); box-shadow: var(--shadow-sm); background: var(--mist);
}
.contact-map #map { width: 100%; height: 100%; }
/* подпись видна, пока не загрузился API карт (и остаётся без JavaScript) */
.contact-map__loading {
    position: absolute; inset: 0; margin: 0; padding: 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    font-size: .95rem; color: var(--slate); text-align: center;
}

/* ==================== FOOTER ==================== */
.footer { background: var(--ink); color: var(--slate-on-dark); padding: 60px 0 30px; }
.footer__brand .logo__name { color: var(--white); }
.footer .logo__tag { color: var(--slate-on-dark); }
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer a { color: var(--slate-on-dark); }
.footer a:hover { color: var(--primary-light); }
.footer li { overflow-wrap: anywhere; }
.footer__bottom { border-top: 1px solid #1e293b; padding-top: 24px; }
.footer__disclaimer { font-size: .875rem; color: var(--slate-on-dark); margin-top: 16px; max-width: 720px; }

/* ==================== FLOATING CALL (desktop) / MOBILE BAR ==================== */
.float-call {
    position: fixed; bottom: 24px; right: 24px; z-index: 1030;
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--accent); display: none; place-items: center;
    box-shadow: 0 8px 24px rgba(245,158,11,.45);
    animation: pulse 2s infinite; transition: transform .2s;
    text-decoration: none;
}
.float-call:hover { transform: scale(1.1); }
.float-call svg { width: 28px; height: 28px; color: var(--ink); }
.float-call:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
@keyframes pulse {
    0% { box-shadow: 0 8px 24px rgba(245,158,11,.45), 0 0 0 0 rgba(245,158,11,.4); }
    70% { box-shadow: 0 8px 24px rgba(245,158,11,.45), 0 0 0 18px rgba(245,158,11,0); }
    100% { box-shadow: 0 8px 24px rgba(245,158,11,.45), 0 0 0 0 rgba(245,158,11,0); }
}

.mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: none; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--white); border-top: 1px solid var(--soft-border);
    box-shadow: 0 -8px 24px rgba(15,23,42,.10);
}
.mobile-bar .btn { flex: 1 1 0; min-width: 0; padding: 12px 14px; font-size: .95rem; }
.mobile-bar .btn svg { width: 18px; height: 18px; }

/* ==================== CALLBACK MODAL ==================== */
.callback-modal .modal-content {
    border: none; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.callback-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white); border-bottom: none; padding: 28px 32px 24px;
    position: relative;
}
.callback-modal .modal-header h5 { font-family: var(--bs-headings-font-family); font-weight: 800; padding-right: 40px; }
.callback-modal .modal-header p { color: rgba(255,255,255,.95); font-size: .92rem; margin: 4px 0 0; }
.callback-modal .btn-close { opacity: .9; position: absolute; top: 22px; right: 22px; }
.callback-modal .modal-body { padding: 32px; }
.callback-form .form-control, .callback-form .form-select {
    border: 2px solid var(--soft-border); border-radius: var(--radius-sm);
    padding: 12px 16px; font-size: 1rem; transition: border-color .2s;
}
.callback-form .form-control:focus, .callback-form .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.callback-form .form-label { font-family: var(--bs-headings-font-family); font-weight: 700; font-size: .88rem; color: var(--ink); margin-bottom: 6px; }
.callback-form__submit { width: 100%; margin-top: 8px; }
.callback-success { text-align: center; padding: 24px 0 8px; }
.callback-success__icon {
    width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft);
    display: grid; place-items: center; margin: 0 auto 20px;
}
.callback-success__icon svg { width: 34px; height: 34px; color: var(--primary); }
.callback-success h5 { color: var(--ink); margin-bottom: 8px; }
.callback-success p { color: var(--slate); font-size: .95rem; }

/* ==================== INNER PAGES ==================== */
.article-wrap { background: var(--mist); padding: 56px 0 90px; }
.article {
    background: var(--white); border: 1px solid var(--soft-border); border-radius: var(--radius-lg);
    padding: 48px; max-width: 880px; margin: 0 auto;
}
.article h2 { font-size: 1.5rem; margin: 48px 0 16px; padding-top: 32px; border-top: 1px solid var(--soft-border); }
.article > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article p, .article li { font-size: 1.0625rem; line-height: 1.7; }
.article p.article__lead { font-size: 1.2rem; line-height: 1.6; font-weight: 600; color: var(--ink); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article li::marker { color: var(--primary); }
.article a { font-weight: 600; }

.article .steps, .article .timeline { list-style: none; margin: 16px 0; padding: 0; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--soft-border); }
.steps li:last-child { border-bottom: none; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-family: var(--bs-headings-font-family); font-weight: 800; display: grid; place-items: center; }

.timeline { border-left: 2px solid var(--soft-border); }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline__year { font-family: var(--bs-headings-font-family); font-weight: 800; color: var(--primary-dark); }

.article .price { display: inline-block; background: var(--primary-soft); border-radius: 12px; padding: 14px 20px; font-family: var(--bs-headings-font-family); font-weight: 800; font-size: 1.4rem; color: var(--primary-dark); margin: 8px 0 16px; }
.notice { background: #fef3c7; border-radius: 12px; padding: 18px 20px; color: #78350f; margin: 20px 0; }
.notice p { margin: 0; }

.doctor-mini {
    display: flex; gap: 18px; align-items: center; margin-top: 32px;
    padding: 20px; background: var(--mist); border: 1px solid var(--soft-border); border-radius: var(--radius);
}
.doctor-mini img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex-shrink: 0; }
.doctor-mini strong { display: block; font-family: var(--bs-headings-font-family); font-size: 1.05rem; color: var(--ink); margin-bottom: 4px; }
.doctor-mini p { margin: 0; font-size: .98rem; min-width: 0; hyphens: auto; overflow-wrap: anywhere; }

.cta {
    display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
    background: var(--primary-soft); border-radius: var(--radius-lg); padding: 28px; margin-top: 40px;
}
.cta p { margin: 0; }
.cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==================== RESPONSIVE TWEAKS ==================== */
/* Строки с g-5 (отступ 3rem) вылезают за стандартные поля .container (0.75rem):
   увеличиваем поля контейнера той же переменной гаттера, чтобы строка
   не выходила за границы экрана на мобильных и при ширине ~992px */
.hero > .container, #doctor > .container, #method > .container { --bs-gutter-x: 3rem; }

@media (min-width: 768px) and (max-width: 991.98px) {
    /* третья карточка услуг занимает всю строку: иконка слева, текст справа */
    .service-card--wide { display: grid; grid-template-columns: 64px 1fr; column-gap: 24px; align-items: start; }
    .service-card--wide .service-card__icon { grid-row: 1 / span 2; margin-bottom: 0; }
    .service-card--wide > :not(.service-card__icon) { grid-column: 2; }
}
@media (min-width: 992px) {
    .float-call { display: grid; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* при ширине 992–1199 px логотип и меню не помещаются в контейнер со стандартными отступами */
    .navbar-custom .nav-link { padding-left: 8px !important; padding-right: 8px !important; }
    .navbar-custom .navbar-nav .btn { padding: 12px 20px; }
}
@media (max-width: 1199.98px) {
    .docs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .docs-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    /* на планшетах и телефонах вместо плавающего круга — панель внизу экрана */
    .mobile-bar { display: flex; }
    .footer { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
    /* полоса преимуществ: сетка 2×2, иконка рядом с заголовком, пояснение на всю ширину ячейки */
    .trust__item { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 4px; }
    .trust__icon { grid-column: 1; grid-row: 1; width: 38px; height: 38px; border-radius: 10px; }
    .trust__icon svg { width: 20px; height: 20px; }
    .trust__text { display: contents; }
    .trust__title { grid-column: 2; grid-row: 1; }
    .trust__sub { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 767.98px) {
    .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* окно документа: стрелки под картинкой, а не поверх неё */
    .doc-modal__nav { position: static; transform: none; }
    .doc-modal__controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
    .doc-modal__counter { margin-top: 0; }
    .contact-map { min-height: 320px; }
}
@media (max-width: 575px) {
    .section { padding: 60px 0; }
    .hero { padding: 32px 0 56px; }
    .hero--page { padding: 32px 0 44px; }
    /* логотип и кнопка меню должны помещаться в одну строку */
    .logo { gap: 10px; }
    .logo__mark { width: 44px; height: 44px; }
    .logo__name { font-size: 1.05rem; }
    .logo.navbar-brand { margin-right: 0; }
    .navbar-toggler { padding: .25rem .55rem; }
    /* топбар в две строки отнимает первый экран: на телефоне остаётся одна строка с номером
       (увеличиваем и высоту касания), запись — кнопкой в панели внизу */
    .topbar__phone { padding: 8px 0; margin: -8px 0; font-weight: 700; }
    .hero__desc { margin-bottom: 24px; }
    .hero .btn-lg { width: 100%; }
    /* кнопки действия ставим сразу под заголовком: на маленьких экранах описание
       сдвигало их за первый экран */
    .hero .col-lg-7 { display: flex; flex-direction: column; align-items: flex-start; }
    .hero .col-lg-7 > .eyebrow { order: 1; }
    .hero .col-lg-7 > .hero__title { order: 2; }
    .hero .col-lg-7 > .d-flex.gap-3 { order: 3; margin-bottom: 24px; }
    .hero .col-lg-7 > .hero__desc { order: 4; }
    .hero .col-lg-7 > .hero__stats { order: 5; }
    /* полоса преимуществ: на узком экране заголовки не помещаются в две колонки,
       показываем компактный список из иконок и заголовков */
    .trust .col-6 { width: 100%; }
    .trust__item { grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
    .trust__icon { width: 32px; height: 32px; border-radius: 9px; }
    .trust__icon svg { width: 18px; height: 18px; }
    .trust__sub { display: none; }
    /* адрес не должен рваться: подпись над значением */
    .hero__card { padding: 28px 22px; }
    .hero__card-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .hero__card-row-val { text-align: left; }
    .article { padding: 26px 20px; }
    .article h2 { margin-top: 36px; padding-top: 24px; }
    .faq-cta { padding: 22px 20px; }
    .cta { padding: 22px 20px; }
    .doctor-mini { flex-direction: column; gap: 14px; }
}
@media (max-width: 374.98px) {
    .logo__name { font-size: .95rem; }
    .logo__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
