/* =========================================================================
   Module · Carousel / Story Cards — Figma 5495:35694 (page Global: Modules)
   variants 420 5508:36541 · 1024 5495:35633 · 1440 5495:35572 · 1920 5492:17576
   Home (Pages — Homepage 2.0 [09.30]): 7021:54688 · 7021:54677 · 7021:54666 · 7021:54623

   Figma pads "Header" and the controls, not the module, because "Grid"
   runs to the window's edge: the section's own side padding is off and
   each child carries the page margin (--gutter) itself.
   "Carousel" (420) / "Grid+Controls": Grid, then the controls, 24 · 16 ·
   32 · 32 apart (Figma: raw space/24 at 420, 16 at 1024 — not the
   Breakpoint's grid-gutter — then 32). Grid: the cards grid-gutter apart.
   Card widths as Figma draws them against the content: 420 the content
   less 24 (348 of 372: the next card shows past the gap), 1024 354 of
   832, 1440 497.67 of 1200, 1920 620 of 1440 (raw, no variables).
   Card heights: the Home instances fix each card's height (449 · 432.13 ·
   637.81 · 755.55, raw) round a picture Figma draws at 348 × 196, 354 ×
   199.13, 498 × 287.81, 620 × 358.55. The owner's rule makes every video
   preview 16:9 (the block), so the card keeps Figma's height and its words
   take what the picture leaves: the module is Figma's height at every
   breakpoint.
   Controls: Pagination left; from 1024 Back / Next (Button / Round 44,
   Figma: raw 12 apart) right.
   Ground: White, then the Module Background (Figma's two fills).
   ========================================================================= */
.m-carousel-story-cards {
  padding-inline: 0;
  background: linear-gradient(var(--module-background), var(--module-background)), var(--color-white);
}
.m-carousel-story-cards__header {
  align-self: stretch;
  padding-inline: var(--gutter);
}

.m-carousel-story-cards__carousel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);                        /* Figma 420: raw 24 */
}
/* clips the cards parked beyond the edge, sideways only, so a hovered
   card's outline is not sheared off at the top and bottom */
.m-carousel-story-cards__viewport { overflow-x: clip; overflow-y: visible; }

.m-carousel-story-cards__grid {
  display: flex;
  align-items: stretch;
  gap: var(--spacing-grid-gutter);
  padding-inline: var(--gutter);
  transition: transform .7s var(--e-zoom);   /* the old carousel's page turn */
  will-change: transform;
  cursor: grab;
  touch-action: pan-y;
}
.m-carousel-story-cards__carousel.is-dragging .m-carousel-story-cards__grid { transition: none; cursor: grabbing; }
.m-carousel-story-cards__carousel.is-static .m-carousel-story-cards__grid { cursor: auto; }

.m-carousel-story-cards__slide {
  --m-card-w: calc(100% - var(--space-24));   /* 348 of 372 */
  flex: 0 0 var(--m-card-w);
  min-width: 0;
  min-height: 449px;                           /* Figma 420: the card's fixed height */
  display: flex;
  flex-direction: column;
}
.m-carousel-story-cards__slide > .b-card-story { flex: 1 1 auto; }

.m-carousel-story-cards__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
}
.m-carousel-story-cards__arrows { display: none; gap: var(--space-12); }

@media (min-width: 1024px) {
  .m-carousel-story-cards__carousel { gap: var(--space-16); }
  .m-carousel-story-cards__slide { --m-card-w: calc(100% * 354 / 832); min-height: 432.13px; }
  .m-carousel-story-cards__arrows { display: flex; }
}
@media (min-width: 1392px) {
  .m-carousel-story-cards__carousel { gap: var(--space-32); }
  .m-carousel-story-cards__slide { --m-card-w: calc(100% * 497.67 / 1200); min-height: 637.81px; }
}
@media (min-width: 1920px) {
  .m-carousel-story-cards__slide { --m-card-w: calc(100% * 620 / 1440); min-height: 755.55px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-carousel-story-cards__grid { transition: none; }
}
