/* Story Modal — модалка с видеоотзывом пациента.
   Самодостаточные стили (НЕ наследует от .consultation-modal из home.css),
   чтобы JS из main.js (который ищет .consultation-modal для открытия
   consultation-modal при клике на [data-open-consultation]) не находил эту
   модалку по ошибке.
*/

/* Базовый контейнер модалки */
.story-modal[hidden] {
  display: none;
}

.story-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 25, 64, 0.65);
  backdrop-filter: blur(4px);
}

/* Бэкдроп — отдельный слой для клика «закрыть» */
.story-modal__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

/* Диалог */
.story-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 24px 80px rgba(10, 25, 64, 0.25);
}

/* Кнопка закрытия */
.story-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #4b5563;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.story-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0a2540;
}

/* Eyebrow (надзаголовок) */
.story-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #1f5fa6;
  text-transform: uppercase;
}

/* Заголовок */
.story-modal__title {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
  color: #0a2540;
  font-weight: 700;
}

/* Видео-контейнер 16:9 */
.story-modal__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}

.story-modal__video iframe,
.story-modal__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Плейсхолдер, если видео ещё не загружено */
.story-modal__video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #1a2a44, #2d4a7a);
  color: #fff;
  text-align: center;
  padding: 24px;
}

.story-modal__video-placeholder .story-modal__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  pointer-events: none;
}

.story-modal__video-placeholder .story-modal__placeholder-text {
  font-size: 14px;
  opacity: 0.9;
}

/* Полное описание под видео */
.story-modal__body {
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}

.story-modal__body:empty {
  display: none;
}

.story-modal__body h2,
.story-modal__body h3 {
  margin: 18px 0 8px;
  color: #0a2540;
  font-size: 18px;
  line-height: 1.3;
}

.story-modal__body p {
  margin: 0 0 12px;
}

.story-modal__body ul {
  margin: 0 0 12px 20px;
  padding: 0;
}

.story-modal__body li {
  margin-bottom: 6px;
}

/* Мобильные */
@media (max-width: 620px) {
  .story-modal {
    padding: 12px;
  }

  .story-modal__dialog {
    max-width: 96vw;
    padding: 18px;
  }

  .story-modal__title {
    font-size: 22px;
  }
}
