/* ============================================================
   global.css — сброс и базовые стили всего сайта
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    height: -webkit-fill-available;
    /* Цвет футера — показывается в overscroll-зонах iOS Safari (статус-бар и адресная строка) */
    background: #1B2538;
}

body {
    background: linear-gradient(to bottom, #35302c 0%, #1B2538 100%);
    font-family: 'Golos Text', sans-serif;
    color: #1A1A1A;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

* {
    text-wrap: pretty;
}

/* Отступ от фиксированного навбара при прокрутке к якорю */
section[id] {
    scroll-margin-top: 76px;
}

/* Минимальная зона касания */
a, button {
    min-height: 44px;
}
nav a, nav button {
    min-height: unset;
}

/* Цвет выделения текста */
::selection {
    background: rgba(139, 115, 85, 0.2);
    color: #1B2538;
}

/* ---- Адаптив (меньше) ---- */
@media (max-width: 768px) {
    html { font-size: 15px; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
}

/* ---- Адаптив (больше Full HD) ---- */
@media (min-width: 1921px) {
    html { font-size: 18px; }
    section[id] { scroll-margin-top: 88px; }
}

@media (min-width: 2561px) {
    html { font-size: 21px; }
}

@media (min-width: 3841px) {
    html { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}/* ============================================================
   shared.css — общие утилитарные классы, используются в каждой секции
   ============================================================ */

/* ---- Дизайн-токены ---- */
:root {
  --navy:        #1B2538;   /* тёмно-синий — основной */
  --cream:       #F5F2ED;   /* кремовый фон / текст на тёмном */
  --gold:        #8B7355;   /* золотой акцент */
  --gold-light:  #C4A97D;   /* более яркий золотой (для мелкого текста на тёмном) */
  --border:      #D8D4CE;   /* цвет разделителей */
  --bg-white:    #FFFFFF;
  --bg-cream:    #F5F2ED;
  --text-dark:   #1A1A1A;
  --text-mid:    #6B6B6B;
  --text-soft:   #7E7977;

  --font-serif:  'Playfair Display', serif;
  --font-sans:   'Golos Text', sans-serif;

  --section-v:   clamp(64px, 10vw, 140px);   /* вертикальный padding секций */
  --section-h:   clamp(20px, 5vw, 96px);     /* горизонтальный padding секций */
  --max-width:   1280px;

  --radius-card:    24px;
  --radius-pill:    50px;
}

/* ---- Обёртка с ограничением ширины ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-h);
}

/* ---- Маленький надзаголовок (метка секции) ---- */
/* Используется перед h2 в каждой секции.
   Если нужен другой отступ снизу — добавляйте style="margin-bottom:Xpx" прямо на элемент. */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

/* ---- Заголовок секции h2 ---- */
.section-h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Вариант для тёмного фона (блок Записаться) */
.section-h2--light {
  color: var(--cream);
}

/* ---- Стандартный блок-шапка секции (eyebrow + h2) ---- */
.section-header {
  margin-bottom: 52px;
}

/* ---- Большие экраны (> Full HD) ---- */
@media (min-width: 1921px) {
  :root {
    --max-width:   1600px;
    --section-v:   clamp(100px, 9vw, 180px);
    --section-h:   clamp(40px,  5vw, 128px);
  }
  .section-h2  { font-size: clamp(48px, 3.5vw, 80px); }
  .eyebrow     { font-size: 13px; }
  .section-header { margin-bottom: 64px; }
}

@media (min-width: 2561px) {
  :root {
    --max-width:   2100px;
    --section-v:   clamp(120px, 9vw, 220px);
    --section-h:   clamp(60px,  5vw, 180px);
  }
  .section-h2  { font-size: clamp(60px, 3.5vw, 108px); }
  .eyebrow     { font-size: 15px; }
  .section-header { margin-bottom: 80px; }
}

@media (min-width: 3841px) {
  :root {
    --max-width:   2800px;
  }
  .section-h2  { font-size: clamp(80px, 3.5vw, 140px); }
  .eyebrow     { font-size: 18px; }
}
/* ============================================================
   nav.css — навигация
   ============================================================ */

/* ---- Переключение видимости элементов по ширине экрана ---- */
@media (max-width: 1024px) {
  .nav-links      { display: none !important; }
  .nav-wa         { display: none !important; }
  .nav-prodoctorov { display: none !important; }
  .nav-cta        { display: none !important; }
  .burger         { display: flex !important; }
}

/* ---- Большие экраны ---- */
@media (min-width: 1921px) {
  nav                  { min-height: 92px !important; padding: 0 clamp(40px, 5vw, 128px) !important; }
  .nav-links a         { font-size: 18px !important; }
  .nav-links           { gap: 36px !important; }
  .nav-cta             { font-size: 16px !important; padding: 10px 26px !important; }
}

@media (min-width: 2561px) {
  nav                  { min-height: 108px !important; padding: 0 clamp(60px, 5vw, 180px) !important; }
  .nav-links a         { font-size: 20px !important; }
  .nav-links           { gap: 44px !important; }
  .nav-cta             { font-size: 18px !important; padding: 12px 32px !important; }
}
/* ============================================================
   hero.css — первый экран
   ============================================================ */

.hero-section {
  background: var(--navy);
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: clamp(96px, 12vh, 140px) clamp(24px, 5vw, 96px) clamp(48px, 4vh, 48px);
  z-index: 2;
}

.hero-photo {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-mobile {
  display: none;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@keyframes heroBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ---- Большие экраны (> Full HD) ---- */
/* Все значения стартуют от тех же значений, что были на 1920px,
   и масштабируются дальше — нормальные экраны не затронуты. */
@media (min-width: 1921px) {
  .hero-text h1      { font-size: clamp(58px, 4vw, 100px) !important; }
  .hero-subtitle     { font-size: clamp(26px, 2vw, 46px)  !important; }
  .hero-desc         { font-size: clamp(17px, 1vw, 21px)  !important;
                       max-width: clamp(460px, 22vw, 660px) !important; }
  .hero-ctas         { gap: 16px !important; }
  .hero-text         { padding-bottom: clamp(48px, 5vh, 80px) !important; }
}

@media (min-width: 2561px) {
  .hero-text h1      { font-size: clamp(90px, 4vw, 130px) !important; }
  .hero-subtitle     { font-size: clamp(40px, 2vw, 60px)  !important; }
  .hero-desc         { font-size: clamp(19px, 1vw, 26px)  !important;
                       max-width: clamp(540px, 22vw, 780px) !important; }
  .hero-ctas         { gap: 20px !important; }
}

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr !important;
    min-height: 100dvh !important;
    min-height: -webkit-fill-available !important;
  }

  .hero-text   { display: none !important; }
  .hero-photo  { display: none !important; }

  .hero-mobile {
    display: flex !important;
    flex-direction: column;
    position: relative;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .hero-scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
/* ============================================================
   about.css — блок «О враче»
   ============================================================ */

.about-section {
  background: var(--bg-white);
  padding: var(--section-v) var(--section-h);
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .about-inner { grid-template-columns: 1fr !important; }

  .about-photo-col {
    position: relative;
  }

  .about-photo-col img {
    max-width: 100% !important;
    aspect-ratio: 4/5 !important;
    object-position: center 20%;
    border-radius: 20px;
  }

  /* Цитата поверх фото */
  .about-quote {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 !important;
    padding: 32px 20px 24px !important;
    border-left: none !important;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.6));
  }

  .about-quote p {
    color: #fff !important;
  }

  .about-quote footer {
    color: rgba(255, 255, 255, 0.65) !important;
  }
}
/* ============================================================
   services.css — блок «Направления»
   ============================================================ */

.services-section {
  background: var(--bg-cream);
  padding: var(--section-v) var(--section-h) clamp(24px, 4vw, 60px);
  overflow: visible;
}

/* ---- Внешний layout: карточки слева, фото справа ---- */
.services-layout {
  display: grid;
  grid-template-columns: 1fr clamp(280px, 30%, 400px);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* ---- Левая колонка ---- */
.services-cards-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Сетка карточек: 2 столбца × 4 строки ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}

/* ---- Правая колонка — фото ---- */
.services-photo-col {
  position: sticky;
  top: 100px;
}

.services-photo-col img {
  aspect-ratio: 2/3;
  border-radius: var(--radius-card);
  object-fit: cover;
  box-shadow: 0 8px 40px rgba(27, 37, 56, 0.12);
}

/* Мобильный layout скрыт на десктопе */
.services-mobile-layout {
  display: none;
}

/* ---- Средние экраны ---- */
@media (max-width: 1200px) {
  .services-layout {
    grid-template-columns: 1fr clamp(240px, 28%, 360px);
  }
}

/* ---- Планшет ---- */
@media (max-width: 900px) {
  .services-layout {
    grid-template-columns: 1fr;
  }

  .services-photo-col {
    position: static;
    max-width: 480px;
    margin: 0 auto;
  }

  .services-photo-col img {
    aspect-ratio: 3/2;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Мобиль: большое фото + слайдер ---- */
@media (max-width: 580px) {
  .services-section {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }

  .services-section .section-header {
    padding: 0 var(--section-h);
  }

  /* Скрываем десктопный layout */
  .services-layout {
    display: none !important;
  }

  /* Показываем мобильный */
  .services-mobile-layout {
    display: block;
  }

  /* Фото с отступами по бокам для видимости скруглений */
  .services-mobile-photo {
    margin-bottom: 24px;
  }

  .services-mobile-photo img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 20px;
  }

  /* ---- Слайдер ---- */
  .services-slider-wrap {
    padding-bottom: 8px;
  }

  .services-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 4px var(--section-h) 16px;
  }

  .services-slider::-webkit-scrollbar {
    display: none;
  }

  /* Карточка занимает ~82% экрана — следующая выглядывает справа */
  .services-slider-card {
    flex-shrink: 0;
    width: 82%;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    border: 1px solid #D8D4CE;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(27, 37, 56, 0.06);
  }

  .ssc-num {
    font-family: 'Golos Text', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #8B7355;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
  }

  .ssc-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: #1B2538;
    line-height: 1.35;
    margin-bottom: 10px;
    flex: 1;
  }

  .ssc-desc {
    font-family: 'Golos Text', sans-serif;
    font-size: 13px;
    color: #6B6B6B;
    line-height: 1.6;
  }

  /* ---- Точки-индикаторы ---- */
  .services-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0 0;
    line-height: 0;
  }

  .services-dot {
    display: block;
    width: 7px;
    height: 7px;
    min-width: 7px;
    min-height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(139, 115, 85, 0.25);
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 0;
    font-size: 0;
    flex-shrink: 0;
    transition: background 0.3s;
  }

  .services-dot--active {
    background: #8B7355;
    transform: scale(1.6);
    transition: background 0.3s, transform 0.3s;
  }
}
/* ============================================================
   principles.css — блок «Принципы работы»
   ============================================================ */

.principles-section {
  background: var(--bg-white);
  padding: var(--section-v) var(--section-h);
}

.principle-row {
  display: grid;
  grid-template-columns: 90px 1fr 2fr;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(20px, 3vw, 34px) 0;
}

/* ---- Адаптив (меньше) ---- */
@media (max-width: 900px) {
  .principle-row   { grid-template-columns: 60px 1fr !important; }
  .principle-desc  { display: none !important; }
}

@media (max-width: 480px) {
  .principle-row { grid-template-columns: 48px 1fr !important; gap: 12px !important; }
}

/* ---- Большие экраны ---- */
@media (min-width: 1921px) {
  .principle-row { grid-template-columns: 120px 1fr 2fr; }
}

@media (min-width: 2561px) {
  .principle-row { grid-template-columns: 160px 1fr 2fr; }
}
/* ============================================================
   timeline.css — блок «Профессиональный путь»
   ============================================================ */

.timeline-section {
  background: var(--bg-cream);
  padding: var(--section-v) var(--section-h);
}

.timeline-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.timeline-photo {
  width: 100%;
  height: 480px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  object-position: center 20%;
}

/* Заголовок над сеткой — только мобиль */
.timeline-mobile-header {
  display: none;
}

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .timeline-section {
    padding: var(--section-v) var(--section-h) 40px;
    overflow: hidden;
  }

  /* Заголовок появляется над сеткой */
  .timeline-mobile-header {
    display: block;
    margin-bottom: 24px;
  }

  /* Скрываем заголовок и описание в левой колонке */
  .timeline-left-text {
    display: none !important;
  }

  .timeline-inner {
    grid-template-columns: 42% 58% !important;
    gap: 0 !important;
    align-items: stretch !important;
    margin: 0 calc(-1 * var(--section-h));
  }

  .timeline-left {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
  }

  .timeline-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center 20%;
  }

  .timeline-right {
    background: var(--bg-cream);
    padding: 20px 16px 28px 20px;
  }
}

/* ---- Большие экраны ---- */
@media (min-width: 1921px) {
  .timeline-photo { height: clamp(480px, 35vw, 700px); }
}

@media (min-width: 2561px) {
  .timeline-photo { height: clamp(600px, 33vw, 900px); }
}
/* ================= СЕКЦИЯ ОБРАЗОВАНИЯ ================= */
/* ================= СЕКЦИЯ ОБРАЗОВАНИЯ ================= */
.edu-section {
    background: #fff;
    padding: 100px 0;
}

.edu-header-container {
    margin-bottom: 52px;
}

.edu-eyebrow {
    font-family: 'Golos Text', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8B7355;
    margin-bottom: 16px;
}

.edu-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 52px);
    font-weight: 400;
    color: #1B2538;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

.edu-grid {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #D8D4CE; /* Замыкающая линия снизу */
}

.edu-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 20px;
    padding: clamp(16px, 2.5vw, 26px) 0;
    border-top: 1px solid #D8D4CE;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.edu-year {
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 1.5vw, 20px);
    color: #1B2538;
    line-height: 1.3;
}

.edu-desc {
    font-family: 'Golos Text', sans-serif;
    font-size: clamp(13px, 1.2vw, 15px);
    color: #1A1A1A;
    line-height: 1.65;
}

/* Стили для анимации при появлении */
.edu-row.hidden {
    opacity: 0;
    transform: translateY(14px);
}

.edu-row.visible {
    opacity: 1;
    transform: none;
}

/* ================= СЕЛЕКТОР СЕРТИФИКАТОВ ================= */
.cert-layout {
    display: grid;
    /* Уменьшаем колонку с кнопками до 320px, а карточке отдаем весь остаток */
    grid-template-columns: 1fr 1fr;
    gap: 80px; /* Увеличил отступ для «воздуха» */
    margin-top: 80px;
    align-items: center; /* Центрируем по вертикали, чтобы превью было в фокусе */
}

.cert-drum-viewport {
    height: 570px;
    border: 1px solid #8B7355;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

.cert-drum-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 175px;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.cert-pill {
    all: unset;
    box-sizing: border-box;
    width: 90%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: #F7F5F2;
    border: 1px solid #E0DCD6;
    border-radius: 50px;
    cursor: pointer;
    height: 46px;
    margin-bottom: 14px;
    transition: all 0.4s ease;
}

.cert-pill--active { background: #8B7355; border-color: #8B7355; color: #fff; scale: 1.05; }
.cert-pill-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.cert-pill-tag { display: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }

.cert-active-label { display: none; }

.cert-drum-wrapper { display: contents; }

.cert-card-area {
    position: relative;
    width: 100%;
    max-width: 500px; /* Ограничиваем, чтобы не было гигантизма */
    max-height: 80vh;
    aspect-ratio: 2 / 3;
    background: #1B2538;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.25); /* Сделали тень чуть глубже для объема */
    border-radius: 4px;
}

.cert-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.card-bg {
    position: absolute; inset: 0; z-index: 0; opacity: 1;
}

.card-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 1; opacity: 1; object-fit: cover; border: none; pointer-events: none;
}

.card-overlay {
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 45%, transparent 70%);
}

.card-placeholder {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 16px; opacity: 0.5; pointer-events: none;
}

.placeholder-icon { opacity: 0.7; }

.placeholder-tag {
    font-size: 10px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 3px 10px; border-radius: 2px;
}

.placeholder-label {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-size: 14px; color: rgba(255,255,255,0.5);
    text-align: center; padding: 0 24px; line-height: 1.4;
}

.card-info { position: relative; z-index: 3; color: #fff; }
.card-tag { display: inline-block; padding: 4px 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); border-radius: 2px; font-size: 10px; font-weight: 700; margin-bottom: 20px; }
.card-title { font-family: 'Playfair Display', serif; font-size: 32px; margin-bottom: 15px; font-style: italic; }
.card-hint { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.7; display: flex; align-items: center; gap: 10px; }
.card-hint::after { content: ''; width: 30px; height: 1px; background: #fff; opacity: 0.5; }

/* ================= ОБНОВЛЕННОЕ КОМПАКТНОЕ ОКНО ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-container-box {
    background: #fff;
    width: 95%;
    max-width: 1100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(0,0,0,0.3);
    border-radius: 12px;
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.modal-header {
    height: 90px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E0DCD6;
    flex-shrink: 0;
}

.modal-header-left .modal-eyebrow {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 700;
}

.modal-header-left .modal-title-main {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #2A2A2A;
    margin: 0;
    font-weight: 400;
}

.modal-close-btn {
    all: unset;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border: 1px solid #E0DCD6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.2s;
}
.modal-close-btn:hover { background: #F7F5F2; border-color: #8B7355; color: #8B7355; }

.modal-main-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 320px;
    overflow: hidden;
}

.modal-viewer-area {
    background: #F0EDE8;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    display: block;
}

.modal-sidebar {
    border-left: 1px solid #E0DCD6;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #fff;
    overflow-y: auto;
}

.sidebar-info-block label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 700;
}

.sidebar-info-block p { font-size: 15px; line-height: 1.5; color: #2A2A2A; margin: 0; }

.modal-footer-minimal {
    height: 60px;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #E0DCD6;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    flex-shrink: 0;
}

.footer-link { color: #2A2A2A; text-decoration: none; border-bottom: 1px solid #2A2A2A; padding-bottom: 2px; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- Большие экраны (> Full HD) ---- */
@media (min-width: 1921px) {
  .edu-section   { padding: clamp(100px, 8vw, 180px) 0; }
  .edu-desc      { font-size: clamp(15px, 1.1vw, 22px); }
  .edu-year      { font-size: clamp(18px, 1.4vw, 28px); }
  .edu-row       { grid-template-columns: 140px 1fr; }
  .cert-card-area { max-width: 640px; }
  .cert-drum-viewport { height: 720px; }
  .cert-drum-track    { padding-top: 225px; }
  .cert-layout   { gap: 100px; }
  .card-title    { font-size: 40px; }
}

@media (min-width: 2561px) {
  .edu-section   { padding: clamp(120px, 8vw, 220px) 0; }
  .edu-desc      { font-size: clamp(17px, 1.1vw, 28px); }
  .edu-year      { font-size: clamp(22px, 1.4vw, 36px); }
  .edu-row       { grid-template-columns: 180px 1fr; }
  .cert-card-area { max-width: 800px; }
  .cert-drum-viewport { height: 900px; }
  .cert-drum-track    { padding-top: 280px; }
  .cert-layout   { gap: 120px; }
  .card-title    { font-size: 52px; }
}

@media (max-width: 1024px) {
    .cert-layout { grid-template-columns: 1fr; gap: 40px; }

    .cert-drum-viewport {
        width: 100%;
        min-width: 0;
        height: auto;
        border: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 0 12px;
        /* Угасание справа — намекает на скролл */
        -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
        mask-image: linear-gradient(to right, black 75%, transparent 100%);
        scrollbar-width: none;
    }
    .cert-drum-viewport::-webkit-scrollbar { display: none; }

    .cert-drum-track {
        flex-direction: row;
        flex-wrap: nowrap;
        padding-top: 0;
        padding-left: 2px;   /* первая пилюля не обрезается слева */
        padding-right: 48px; /* место до правого угасания */
        transform: none !important;
        width: max-content;
        gap: 8px;
    }

    /* Пилюли на мобильном — компактные чипы с коротким тегом */
    .cert-pill {
        width: auto;
        height: 32px;
        padding: 0 14px;
        margin: 0;
        border-radius: 6px;
        white-space: nowrap;
    }
    .cert-pill-label { display: none; }
    .cert-pill-tag { display: inline; }

    /* Подпись с полным названием под треком пилюль */
    .cert-drum-wrapper { display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 100%; }
    .cert-active-label { display: none; }

    .cert-card-area { max-width: 320px; margin: 0 auto; }
    .modal-container-box { width: 100%; height: 100vh; border-radius: 0; }
    .modal-main-layout { grid-template-columns: 1fr; }
    .modal-sidebar { display: none; }
}/* ============================================================
   booking.css — блок «Запись на консультацию»
   ============================================================ */

.booking-section {
  background: var(--navy);
  padding: clamp(36px, 5vw, 72px) var(--section-h);
  position: relative;
  overflow: hidden;
}

/* ---- Фоновое фото слева ---- */
.booking-photo-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 52%;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  will-change: transform;
}

.booking-photo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.32) translateY(-48px);
  opacity: 0.8;
  display: block;
  transition: none !important;
}

/* Градиент: прозрачный сверху, темнеет снизу и вправо */
.booking-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(27, 37, 56, 0.1) 0%,
      rgba(27, 37, 56, 0.55) 60%,
      rgba(27, 37, 56, 0.85) 80%
    ),
    linear-gradient(to right,
      transparent 0%,
      rgba(27, 37, 56, 0.5) 70%,
      var(--navy) 100%
    );
}

/* ---- Контент поверх фона ---- */
.booking-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 96px);
  align-items: end;
  position: relative;
  z-index: 1;
}

/* Левая колонка: небольшой отступ сверху чтобы текст был чуть ниже */
.booking-left {
  padding-top: clamp(32px, 5vw, 64px);
}

/* Placeholder в полях формы */
::placeholder {
  color: rgba(245, 242, 237, 0.28);
}

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .booking-inner {
    grid-template-columns: 1fr !important;
  }

  /* Фото только в правой половине — контейнер начинается с 45% ширины */
  .booking-photo-bg {
    left: 12%;
    right: 0;
    width: auto;
  }

  .booking-photo-bg img {
    object-position: 30% 15%;
    transform: scale(1.32) translateY(0%);
    transition: none !important;
  }

  /* Градиент: слева navy → справа прозрачный, лицо видно справа */
  .booking-photo-overlay {
    background: linear-gradient(to right,
      var(--navy) 0%,
      rgba(27, 37, 56, 0.5) 40%,
      transparent 100%
    );
  }

  /* Текст ярче на мобиле — фон сложнее */
  .booking-desc {
    color: rgba(245, 242, 237, 0.78) !important;
  }

  .booking-alt-label {
    color: rgba(245, 242, 237, 0.55) !important;
  }

  /* Ограничиваем ширину только заголовка и описания — кнопки остаются полной ширины */
  .booking-section .section-h2 {
    max-width: 70%;
  }

  .booking-section .booking-desc {
    max-width: 70% !important;
  }
}
/* ============================================================
   contacts.css — блок «Прямая связь с врачом»
   ============================================================ */

.contacts-section {
  background: var(--bg-cream);
  padding: var(--section-v) var(--section-h);
}

.contacts-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

/* Overlay-текст скрыт на десктопе */
.contacts-photo { position: relative; }
.contacts-photo-text { display: none; }

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .contacts-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Фото на всю ширину */
  .contacts-photo {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 28px;
  }

  .contacts-photo img {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    aspect-ratio: 2/3 !important;
    object-fit: cover;
  }

  /* Тёмный градиент для читаемости текста */
  .contacts-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 35%, rgba(10,15,30,0.82) 100%);
    pointer-events: none;
  }

  /* Белый текст поверх фото */
  .contacts-photo-text {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 24px 32px;
    z-index: 1;
  }

  .contacts-eyebrow-overlay {
    color: rgba(255,255,255,0.65) !important;
    margin-bottom: 8px;
  }

  .contacts-h2-overlay {
    color: #fff !important;
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.2 !important;
    margin-bottom: 10px !important;
  }

  .contacts-p-overlay {
    font-family: 'Golos Text', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin: 0;
    max-width: 300px;
  }

  /* Заголовок в карточке на десктопе скрываем на мобиле */
  .contacts-desktop-text { display: none; }
}
/* ============================================================
   footer.css — футер
   ============================================================ */

.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(139, 115, 85, 0.5);
  padding: clamp(32px, 5vw, 64px) var(--section-h);
  padding-bottom: max(clamp(32px, 5vw, 64px), env(safe-area-inset-bottom));
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Мобиль ---- */
@media (max-width: 768px) {
  .site-footer { padding: 24px 20px 28px !important; }

  .footer-top   { margin-bottom: 16px !important; }
  .footer-links { display: none !important; }

  .footer-bottom {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* Скрываем предупреждение о противопоказаниях на мобиле */
  .footer-bottom > div:nth-child(2) { display: none !important; }
}
