/* Existing student portraits and copy, presented as a featured story and story list. */
.testimonials-section { padding: clamp(44px, 5vw, 76px) 0; background: #faf7ff; }
.stories-shell { width: min(calc(100% - 64px), 1120px); margin-inline: auto; }
.stories-heading { max-width: 1000px; margin-inline: auto; }
.stories-heading .eyebrow { margin-bottom: 10px; color: #664095; }
.stories-heading h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.18; }
.stories-heading > p:last-child { font-size: clamp(16px, 1.5vw, 21px); margin-top: 18px; }
.stories-layout { display: grid; grid-template-columns: minmax(0, 424px) minmax(0, 492px); justify-content: space-between; align-items: center; gap: clamp(40px, 7vw, 160px); margin-top: 36px; }
.story-feature { overflow: hidden; border-radius: 20px; background: #e9e7eb; box-shadow: 0 2px 5px #0002; }
.story-feature-play { display: block; position: relative; width: 100%; padding: 0; aspect-ratio: 424 / 600; background: #ece2f8; overflow: hidden; }
.story-feature-image { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.story-play-icon { position: absolute; left: 50%; top: 57%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: white; box-shadow: 0 3px 10px #0002; transition: scale 160ms ease; }
.story-play-icon::after { content: ''; width: 0; height: 0; margin-left: 6px; border-top: 15px solid transparent; border-bottom: 15px solid transparent; border-left: 25px solid #664095; }
.story-feature-play:hover .story-play-icon { scale: 1.06; }
.story-feature-play:focus-visible { outline: 3px solid #f26233; outline-offset: -4px; }
.story-feature figcaption { position: relative; padding: 18px 28px 18px 48px; min-height: 86px; display: grid; gap: 4px; font-size: 16px; }
.story-feature figcaption::before { content: ''; position: absolute; width: 4px; top: 18px; bottom: 18px; left: 28px; background: #ff6033; }
.story-feature figcaption strong { font-size: 23px; }
.stories-side { min-width: 0; }
.stories-list-panel { padding: 30px; background: white; border: 1px solid #e3dfe8; border-radius: 16px; box-shadow: 0 1px 4px #0002; }
.stories-list-panel h3 { font: 600 24px/1.3 var(--font-body); }
.stories-list-panel h3::after { display: block; content: ''; width: 49px; height: 3px; margin-top: 9px; background: #ff6033; }
.stories-list { margin-top: 10px; }
.story-choice { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) 34px; align-items: center; gap: 18px; padding: 24px 8px; background: transparent; text-align: left; border-bottom: 1px solid #e1e1e1; }
.story-choice:last-child { border-bottom: 0; padding-bottom: 12px; }
.story-choice > img { width: 56px; height: 56px; object-fit: cover; object-position: center 20%; border-radius: 50%; }
.story-choice-copy { display: grid; gap: 3px; }
.story-choice-copy strong { font-size: 19px; line-height: 1.2; }
.story-choice-copy small { color: #77717e; font-size: 12px; }
.story-watch { margin-top: 5px; font-size: 13px; font-weight: 600; color: #664095; }
.story-choice-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d8d5dc; border-radius: 50%; font-size: 23px; }
.story-choice:hover, .story-choice[aria-pressed='true'] { background: #faf7ff; }
.story-choice:focus-visible { outline: 2px solid #664095; outline-offset: -2px; }
.stories-counselling { width: 100%; min-width: 0; margin-top: 24px; }
.story-dialog { width: min(360px, calc(100vw - 32px), calc((100dvh - 48px) * 9 / 16)); max-width: none; max-height: none; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 17px; background: #171020; color: white; overflow: hidden; box-shadow: 0 20px 80px #0005; }
.story-dialog::backdrop { background: #271b3b99; backdrop-filter: blur(6px); }
body:has(.story-dialog[open]) { overflow: hidden; }
.story-dialog-close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: #0009; color: white; font: 26px/1 Arial, sans-serif; }
.story-player, .story-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.story-unavailable { display: grid; align-content: center; gap: 16px; height: 100%; padding: 30px; text-align: center; line-height: 1.5; }
.story-unavailable img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin-inline: auto; }
@media (max-width: 900px) {
  .stories-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 28px; }
  .stories-list-panel { padding: 22px 16px; }
  .stories-list-panel h3 { font-size: 21px; }
  .story-choice { gap: 10px; grid-template-columns: 44px minmax(0, 1fr) 28px; padding-inline: 0; }
  .story-choice > img { width: 44px; height: 44px; }
  .story-choice-copy strong { font-size: 16px; }
  .story-choice-arrow { width: 28px; height: 28px; }
  .stories-counselling { padding-inline: 14px; font-size: 14px; }
}
@media (max-width: 650px) {
  .stories-shell { width: calc(100% - 40px); }
  .stories-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 28px; }
  .story-feature { width: min(100%, 360px); justify-self: center; }
  .stories-side { width: min(100%, 440px); justify-self: center; }
  .story-play-icon { width: 66px; height: 66px; }
  .stories-heading h2 br { display: none; }
  .story-feature figcaption { padding-left: 36px; }
  .story-feature figcaption::before { left: 20px; }
  .story-feature figcaption strong { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .story-play-icon { transition: none; } }

/* Compact, overlapping testimonial deck for phones. */
.stories-mobile-stack { display: none; }
@media (max-width: 650px) {
  .testimonials-section { padding: 16px 0 22px; background: #ece2f8; }
  .stories-shell { width: calc(100% - 40px); }
  .stories-heading { max-width: 360px; }
  .stories-heading .eyebrow { display: none; }
  .stories-heading h2 { font-size: 18px; line-height: 1.25; letter-spacing: -.35px; }
  .stories-heading h2 br { display: block; }
  .stories-heading > p:last-child { font-size: 12px; line-height: 1.4; margin-top: 10px; }
  .stories-layout { display: none; }
  .stories-mobile-stack {
    position: relative;
    display: block;
    width: min(100%, 336px);
    aspect-ratio: 336 / 304;
    margin: 28px auto 0;
    touch-action: pan-y;
    isolation: isolate;
  }
  .story-stack-card {
    position: absolute;
    left: calc(var(--depth) * 9%);
    top: calc(var(--depth) * 5%);
    width: 72%;
    height: calc(100% - var(--depth) * 4.5%);
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #fff;
    border-radius: 11px;
    box-shadow: 0 3px 5px #0002;
    overflow: hidden;
    text-align: left;
    transition: left 220ms ease, top 220ms ease, height 220ms ease;
  }
  .story-stack-card > img { width: 100%; height: 73%; flex: 0 0 73%; object-fit: cover; object-position: center 25%; border-radius: 5px; }
  .story-stack-card .story-play-icon { width: 44px; height: 44px; top: 37%; }
  .story-stack-card .story-play-icon::after { border-top-width: 10px; border-bottom-width: 10px; border-left-width: 16px; margin-left: 4px; }
  .story-stack-card:not([aria-current='true']) .story-play-icon { visibility: hidden; }
  .story-stack-caption { display: grid; gap: 5px; padding: 18px 2px 0; }
  .story-stack-caption strong { font: 600 14px/1.2 var(--font-body); }
  .story-stack-caption > span { font: 400 11px/1.2 var(--font-body); }
  .story-stack-card:focus-visible { outline: 3px solid #664095; outline-offset: -3px; }
}
@media (max-width: 359px) {
  .stories-heading h2 { font-size: 16px; }
  .story-stack-caption { padding-top: 12px; gap: 4px; }
  .story-stack-caption strong { font-size: 12px; }
  .story-stack-caption > span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .story-stack-card { transition: none; } }

/* --- Festive decorations for the testimonials section -------------------- */
/* The section is already the positioning container: .testimonials-section
   carries .page-section, which sets position:relative + overflow:hidden, so
   no duplicate position/overflow rules are needed here. */
.testimonial-decoration {
  position: absolute;
  z-index: 0;
  display: block;
  height: auto;
  pointer-events: none;
}

/* Hanging golden lamps, one per top corner. gold-lamp.png is 53x334 (aspect
   .159) and already contains its own string, so top:0 hangs it from the edge. */
.testimonial-lamp {
  top: 0;
  width: clamp(24px, 2.4vw, 32px);
  filter: drop-shadow(0 2px 8px rgba(255, 176, 60, 0.28));
  transform-origin: 50% 0;
  animation: testimonialLampSway 5s ease-in-out infinite;
}
.testimonial-lamp--left { left: clamp(4px, 1.4vw, 44px); }
.testimonial-lamp--right { right: clamp(4px, 1.4vw, 44px); }
@keyframes testimonialLampSway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}

/* Cracker peeking from behind the card's top-left corner. It is a sibling of
   the card, which is position:relative + z-index:1, so the opaque card hides
   the inner portion. Percentages inside translate() resolve against the
   cracker's own size, so the visible share is identical at every breakpoint. */
.story-feature-wrap { position: relative; min-width: 0; }
.story-feature { position: relative; z-index: 1; }
.testimonial-cracker {
  top: 0;
  left: 0;
  width: clamp(74px, 6.4vw, 96px);
  transform: translate(-30%, -58%);
  filter: drop-shadow(0 1px 6px rgba(255, 150, 40, 0.3));
}

@media (max-width: 1023px) {
  .testimonial-lamp { width: clamp(22px, 3vw, 28px); }
  .testimonial-cracker { width: clamp(67px, 8vw, 80px); }
}
@media (max-width: 767px) {
  .testimonial-lamp { width: clamp(16px, 4.6vw, 22px); }
  .testimonial-lamp--left { left: 5px; }
  .testimonial-lamp--right { right: 5px; }
  .testimonial-cracker {
    width: 48px;
    transform: translate(-30%, -50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .testimonial-decoration { animation: none !important; }
}
