/* =========================================================
   SPEAKER PAGE SECTIONS
   Photo cards, Sofiat in Action, Words that travel farther
   than the stage, Media & Interviews.
   Loaded by speaking.html after speaking.css.
   ========================================================= */

#watch, #testimonials, #media { scroll-margin-top: var(--nav-height, 80px); }

/* ---------- About me as a speaker ---------- */
.sp-about__text .sp-about__audacity {
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--plum, #5E2A41);
  padding-left: 1rem;
  border-left: 2px solid #D97706;
}

/* "Continue reading": the story fades out mid-paragraph, the button sits right under it */
.sp-story > p:last-child { margin-bottom: 0; }
.sp-story.is-collapsed {
  max-height: 9.5em; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 35%, transparent 100%);
}
.sp-more-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin: 0.35rem 0 var(--space-lg, 1.5rem); padding: 0.35rem 0;
  font: inherit; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--plum, #5E2A41); background: none;
  border: 0; border-bottom: 1px solid rgba(217, 119, 6, 0.6); border-radius: 0; cursor: pointer;
}
.sp-more-btn:hover, .sp-more-btn:focus-visible { border-bottom-color: #D97706; }
.sp-more-btn__icon { font-size: 1rem; line-height: 1; color: #D97706; }
.sp-more-btn__icon::before { content: "+"; }
.sp-more-btn[aria-expanded="true"] .sp-more-btn__icon::before { content: "\2212"; }
.sp-more-btn__close, .sp-more-btn[aria-expanded="true"] .sp-more-btn__open { display: none; }
.sp-more-btn[aria-expanded="true"] .sp-more-btn__close { display: inline; }
.sp-story:not(.is-collapsed) + .sp-more-btn { margin-top: 1rem; }

/* ---------- Video rows ---------- */
.ia-videos .sp-video:last-child { grid-column: auto !important; }
.ia-videos:empty { display: none; }
.ia-videos .sp-video__title { font-size: 1.0625rem; }
.ia-videos .sp-video__meta { margin-top: 0.25rem; }
@media (min-width: 861px) {
  .sp-videos.ia-videos { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; gap: clamp(1.25rem, 2.5vw, 2rem); }
}
/* Sofiat in Action: the videos sit centred at a steady card size */
.sp-videos.ia-videos--fit { display: flex; flex-wrap: wrap; justify-content: center; }
.ia-videos--fit > .sp-video { flex: 0 1 calc((100% - 2 * clamp(1.25rem, 2.5vw, 2rem)) / 3); min-width: 0; }
/* Media & Interviews: four across on wide screens */
@media (min-width: 1100px) {
  .sp-videos.ia-videos--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Words that travel farther than the stage ---------- */
.ia-subhead {
  margin: 0 0 1.25rem;
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber-text, #B45309);
}
.sp-words { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.sp-words__list { display: block !important; }
.sp-words__list .sp-video { width: 100%; }
.sp-words__quotes .h-testimonials { background: #fff; border-radius: 12px; padding: clamp(1rem, 2.5vw, 2rem) clamp(0.5rem, 2vw, 1.5rem); box-shadow: 0 24px 48px -36px rgba(61, 26, 43, 0.45); }
.sp-words__quotes .h-testimonial .testimonial-card__text { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
.sp-words__quotes .h-testimonial.testimonial-card { padding-top: 0.5rem; }

/* ---------- Smaller screens ---------- */
@media (max-width: 860px) {
  .ia-videos--fit > .sp-video { flex-basis: calc((100% - 0.75rem) / 2); }
  .sp-words { grid-template-columns: minmax(0, 1fr); }
  .sp-words .ia-subhead { text-align: center; }
  .sp-words__video { max-width: 420px; width: 100%; margin-inline: auto; }
}
/* Speaker page: sections land just below both menus */
#about-speaker, #signature-talks, #watch, #testimonials, #media { scroll-margin-top: calc(var(--nav-height, 80px) + 3.25rem); }

/* ---------- Sofiat in Action: reels, then photo cards per event ---------- */
.ia-subhead--center { text-align: center; }
.ia-subhead--gap { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.sp-video__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.1rem; }
.sp-video__links .sp-video__yt { margin: 0; }
button.sp-video__yt {
  font: inherit; font-size: 0.8125rem; background: none; border: 0; padding: 0; cursor: pointer;
}
.ev-card__frame img { object-position: center 35%; }
.ev-card__frame::after { background: linear-gradient(to top, rgba(42, 18, 32, 0.45), transparent 45%) !important; }
.ev-card__count {
  position: absolute; z-index: 1; left: 0.75rem; bottom: 0.7rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  background: rgba(252, 248, 245, 0.95); color: var(--plum, #5E2A41);
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.ev-card__frame:hover img { transform: scale(1.05); }

/* photo viewer */
.ev-viewer {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: rgba(20, 8, 14, 0.94);
}
.ev-viewer[hidden] { display: none; }
.ev-viewer__fig { margin: 0; display: grid; justify-items: center; gap: 0.75rem; min-width: 0; }
.ev-viewer__fig img { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 60px -30px #000; }
.ev-viewer__fig figcaption { display: grid; justify-items: center; gap: 0.25rem; text-align: center; color: #FCF8F5; }
.ev-viewer__title { font-family: var(--font-serif); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.ev-viewer__count { font-size: 0.75rem; letter-spacing: 0.12em; color: rgba(252, 248, 245, 0.7); }
.ev-viewer__nav, .ev-viewer__close {
  border: 0; cursor: pointer; color: #FCF8F5; background: rgba(252, 248, 245, 0.14);
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1;
}
.ev-viewer__nav:hover, .ev-viewer__close:hover { background: rgba(252, 248, 245, 0.28); }
.ev-viewer__close { position: absolute; top: clamp(0.75rem, 2vw, 1.25rem); right: clamp(0.75rem, 2vw, 1.25rem); font-size: 1.75rem; z-index: 1; }
@media (max-width: 600px) {
  .ev-viewer { grid-template-columns: minmax(0, 1fr); padding-bottom: 5rem; }
  .ev-viewer__nav { position: absolute; bottom: 1.25rem; }
  .ev-viewer__prev { left: calc(50% - 60px); }
  .ev-viewer__next { right: calc(50% - 60px); }
  .ev-card__count { font-size: 0.5625rem; left: 0.5rem; bottom: 0.5rem; padding: 0.25rem 0.5rem; }
  button.sp-video__yt { font-size: 0.75rem; }
}
.sp-video__links { margin-top: 0.6rem; }
button.sp-video__yt { padding: 0 0 1px; }
button.sp-video__yt { border-bottom: 1px solid var(--amber-deep, #D97706); font-weight: 600; color: var(--plum, #5E2A41); }
.sp-about__text > .sp-more-btn { justify-self: start; width: auto; max-width: max-content; }
/* when the story is opened, the photo stays beside the text instead of drifting down */
@media (min-width: 861px) {
  .sp-about:has(.sp-story:not(.is-collapsed)) { align-items: start; }
  .sp-about:has(.sp-story:not(.is-collapsed)) .sp-about__media { position: sticky; top: calc(var(--nav-height, 80px) + 4.5rem); }
}
