.carousel {
    --gap: 1rem;
    --cols: 1; /* mobile: 1 card per view */
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
    color: #111827;
    background: #fff;

    .active { outline: 3px solid #2563eb; }
  }

  .carousel .track {
    display: grid;
    grid-auto-flow: column;
    /* Each element should be on the screen one at a time */
    grid-auto-columns: 100%;
    gap: var(--gap);

    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable both-edges;

    padding: 1rem var(--gap) 1.25rem;
    margin: 0;
    list-style: none;

    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gap);
    scroll-behavior: smooth; /* disabled for reduced motion below */
    -webkit-overflow-scrolling: touch;
  }

  iframe{
    width: 100%;
    aspect-ratio: 16 / 9;
    height: 100%;
  }

  .carousel .card {
    background: #fff;
    /* border: 1px solid #e5e7eb; */
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    /* padding: 1rem; */
    /* min-height: 14rem; */

    scroll-snap-align: start;
    scroll-snap-stop: always;
    outline: none; /* rely on focus-visible */
    display: flex
;
    flex-direction: column;
    justify-content: center;
  }

  .carousel .card:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
  }

  /* Demo media area; replace with real content/images as needed */
  .media img{
    /* aspect-ratio: 16 / 9; */
    width: 100%;
    border-radius: 8px;
    background: #f3f4f6;
    display: grid;
    place-items: center;
    font-weight: 600;
    color: #6b7280;
    /* margin-bottom: .75rem; */
  }

  .title { font-size: 1rem; margin: 0 auto .25rem auto; }
  .desc  { margin: 0; color: #4b5563; font-size: .95rem; line-height: 1.35; margin: 0 auto; text-align: center;}

  /* Pagination dots that jump to slides via anchors inside the scroller */
  .dots {
    display: flex;
    gap: .5rem;
    justify-content: center;
    padding: 0 1rem 1.25rem;
  }
  .dots a {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
    background: #d1d5db;
    text-decoration: none;
    /* Accessible name via aria-label; no hidden text needed */
    outline-offset: 2px;
  }
  .dots a:focus-visible { outline: 3px solid #2563eb; }



  /* Larger screens: 3 columns */
  @media (min-width: 768px) {
    .carousel { --cols: 3; }
  }

  /* Respect reduced motion preferences */
  @media (prefers-reduced-motion: reduce) {
    .carousel .track { scroll-behavior: auto; }
  }

  /* Optional: nicer horizontal scrollbar where supported */
  .carousel .track::-webkit-scrollbar { height: 10px; }
  .carousel .track::-webkit-scrollbar-track { background: transparent; }
  .carousel .track::-webkit-scrollbar-thumb {
    background: #c7cdd6;
    border-radius: 999px;
  }