/* ==========================================================
   Roman Story Video — 9:16, load on click
   ========================================================== */

.roman-video-sec {
  padding-top: 32px;
  padding-bottom: 32px;
}

.roman-video-wrap {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.roman-video-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #01696F 0%, #0c4e54 100%);
  box-shadow:
    0 20px 40px -12px rgba(1, 105, 111, 0.35),
    0 8px 16px -8px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  margin: 0 auto;
  isolation: isolate;
}

.roman-video-player {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.roman-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}
.roman-video-player:hover .roman-video-poster {
  transform: scale(1.04);
  filter: brightness(0.85);
}

.roman-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #01696F;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  cursor: pointer;
  box-shadow:
    0 10px 30px -6px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  animation: playPulse 2.4s ease-in-out infinite;
  z-index: 2;
}
.roman-video-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
  box-shadow: 0 14px 40px -6px rgba(0, 0, 0, 0.45);
}
.roman-video-play svg {
  width: 28px;
  height: 32px;
}

@keyframes playPulse {
  0%, 100% { box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70%      { box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.35), 0 0 0 22px rgba(255, 255, 255, 0); }
}

.roman-video-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding: 8px 14px;
  font-family: "Manrope", -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 100px;
  text-align: center;
  text-transform: uppercase;
  z-index: 2;
}

/* Loaded video state */
.roman-video-player.is-playing .roman-video-poster,
.roman-video-player.is-playing .roman-video-play,
.roman-video-player.is-playing .roman-video-badge {
  display: none;
}
.roman-video-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  background: #000;
}

/* Caption */
.roman-video-caption h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  font-style: italic;
  line-height: 1.15;
  margin: 0 0 14px;
  color: #01696F;
}
.roman-video-caption p {
  font-family: "Manrope", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #4a4a48;
  margin: 0;
}

/* Mobile */
@media (max-width: 780px) {
  .roman-video-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .roman-video-frame {
    max-width: 260px;
  }
  .roman-video-caption {
    text-align: center;
  }
  .roman-video-caption h3 { font-size: 24px; }
  .roman-video-caption p { font-size: 15px; }
  .roman-video-play { width: 66px; height: 66px; }
  .roman-video-badge { font-size: 11px; padding: 7px 12px; bottom: 12px; left: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .roman-video-play { animation: none; }
  .roman-video-poster { transition: none; }
}


/* ==========================================================
   16:9 модификатор — about.html
   Родитель .roman-photo был круглый, полностью переопределяем
   ========================================================== */
.roman-photo:has(.roman-video-frame--16-9),
.roman-card .roman-video-frame--16-9,
.roman-video-frame--16-9 {
  aspect-ratio: 16 / 9 !important;
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 20px 40px -12px rgba(1, 105, 111, 0.35) !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #01696F 0%, #0c4e54 100%) !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

.roman-video-frame--16-9 .roman-video-poster,
.roman-video-frame--16-9 video {
  border-radius: 20px !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Родительский .roman-photo с круглыми стилями — сбрасываем */
.roman-photo:has(.roman-video-frame--16-9) {
  border-radius: 20px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Grid: даже на мобилке — 1 колонка, поэтому просто уменьшаем колонки на десктопе */
@media (min-width: 720px) {
  .roman-card:has(.roman-video-frame--16-9) {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}
