/* =============================================
   STORIES - Card-based with Modal
============================================= */
.stories-section {
  padding: var(--section-pad-v) var(--section-pad-h);
  background: var(--bg-white);
}

/* Centre the subtitle */
.stories-section .section-sub {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ── Grid ── */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Story card ── */
.story-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(182, 202, 246, 0.28);
  transition: transform 0.42s var(--ease-out), box-shadow 0.42s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.story-card:focus-visible {
  outline: 3px solid var(--blue-accent);
  outline-offset: 3px;
}

/* Body */
.story-card-body {
  padding: clamp(18px, 2.5vw, 30px);
}

/* Opening quotation mark */
.story-quote {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 16px);
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.75;
  margin-bottom: 28px;
  padding-top: 20px;
  position: relative;
}

.story-quote::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1;
  color: var(--blue-mid);
  position: absolute;
  top: -14px;
  left: -6px;
  opacity: 0.7;
}

/* Author */
.story-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 26px;
}

.story-author strong {
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 600;
  color: var(--text-dark);
}

.story-author span {
  font-size: clamp(11px, 1vw, 13px);
  color: var(--text-light);
  letter-spacing: 0.06em;
}

/* CTA button */
.story-read-btn {
  background: transparent;
  border: 1.5px solid var(--blue-vivid);
  color: var(--blue-vivid);
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.story-read-btn:hover {
  background: var(--blue-vivid);
  border-color: var(--blue-vivid);
  color: white;
}

/* =============================================
   MODAL
============================================= */
/* Photo shown inside modal (not on card) */
.modal-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: clamp(20px, 3vw, 32px);
  background: linear-gradient(135deg, var(--blue-pale) 0%, var(--blue-soft) 100%);
}

.modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius);
  max-width: 660px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 4.5vw, 60px);
  position: relative;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.42s var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: var(--blue-mid) transparent;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

/* Scrollbar in modal */
.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-track { background: transparent; }
.modal-box::-webkit-scrollbar-thumb { background: var(--blue-mid); border-radius: 4px; }

/* Close button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-light);
  border: none;
  font-size: 13px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.modal-close:hover {
  background: var(--text-dark);
  color: white;
}

/* Modal content */
.modal-content h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 10px;
}

.modal-content .modal-role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: 36px;
  display: block;
}

.modal-content p {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--text-mid);
  line-height: 1.95;
  margin-bottom: 22px;
}

.modal-content p:last-child { margin-bottom: 0; }

/* Audio player */
.modal-audio-wrap {
  margin-bottom: clamp(20px, 3vw, 32px);
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.modal-audio {
  width: 100%;
  display: block;
  accent-color: var(--blue-vivid);
  border-radius: var(--radius-pill);
}

/* Video player */
.modal-video-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.modal-video {
  width: 100%;
  max-width: 560px;
  max-height: 55vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1.5px solid rgba(111, 151, 238, 0.22);
  box-shadow: 0 8px 32px rgba(93, 127, 219, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: block;
  background: #000;
}

/* Transcript */
.modal-transcript {
  margin-top: clamp(20px, 3vw, 32px);
  padding: 20px 24px;
  background: var(--bg-light);
  border-radius: var(--radius);
  border-left: 3px solid var(--blue-mid);
}

.modal-transcript-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: 10px !important;
}

/* ── Responsive ── */
@media (min-width: 769px) {
  .modal-box {
    max-width: clamp(480px, 60vw, 1000px);
  }
}

@media (max-width: 1024px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 12px;
  }

  .modal-box {
    max-height: 92vh;
  }
}
