/* Reusable horizontal carousel (views/components/carousel.twig) and media cards. */
.carousel { --carousel-accent: #bc1728; --carousel-gap: 24px; --carousel-per-view: 4; margin-top: 64px; min-width: 0; }
.carousel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.carousel__title { position: relative; margin: 0; padding-bottom: 14px; color: #111827; font-size: 30px; font-weight: 700; line-height: 1.2; }
.carousel__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; border-radius: 2px; background: var(--carousel-accent); }
.carousel__tools { display: flex; align-items: center; gap: 20px; }
.carousel__nav { display: flex; gap: 10px; }
.carousel__nav[hidden] { display: none; }
.carousel__arrow { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #e5e7eb; border-radius: 50%; background: #fff; color: #111827; cursor: pointer; box-shadow: 0 2px 6px rgb(0 0 0 / 6%); transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease; }
.carousel__arrow svg { width: 20px; height: 20px; }
.carousel__arrow:hover:not(:disabled) { background: var(--carousel-accent); border-color: var(--carousel-accent); color: #fff; }
.carousel__arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.carousel__arrow:focus-visible, .carousel__track:focus-visible { outline: 3px solid var(--carousel-accent); outline-offset: 3px; }
.carousel__track { display: flex; gap: var(--carousel-gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; padding: 6px 4px 18px; margin: -6px -4px -18px; scroll-padding-inline: 4px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { flex: 0 0 calc((100% - (var(--carousel-per-view) - 1) * var(--carousel-gap)) / var(--carousel-per-view)); min-width: 0; scroll-snap-align: start; }

.media-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 12px; background: #fff; color: inherit; box-shadow: 0 4px 16px -6px rgb(0 0 0 / 18%); transition: transform .25s ease, box-shadow .25s ease; }
.media-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px -10px rgb(0 0 0 / 28%); }
.media-card:focus-visible { outline: 3px solid var(--carousel-accent, #bc1728); outline-offset: 3px; }
.media-card__image { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e5e7eb; }
.media-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.media-card:hover .media-card__image img { transform: scale(1.05); }
.media-card__play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #2ea44f; color: #fff; transform: translate(-50%, -50%); box-shadow: 0 6px 16px -4px rgb(0 0 0 / 35%); transition: transform .25s ease; }
.media-card__play svg { width: 22px; height: 22px; margin-left: 3px; }
.media-card:hover .media-card__play { transform: translate(-50%, -50%) scale(1.08); }
.media-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.media-card__title { color: #111827; font-size: 16px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-card__date { color: #6b7280; font-size: 13px; }

@media (max-width: 1023px) { .carousel { --carousel-per-view: 3; } }
@media (max-width: 767px) {
  .carousel { --carousel-per-view: 1.6; --carousel-gap: 14px; margin-top: 44px; }
  .carousel__title { font-size: 24px; }
  .carousel__tools { width: 100%; justify-content: space-between; }
  .carousel__arrow { width: 40px; height: 40px; }
}
@media (max-width: 479px) { .carousel { --carousel-per-view: 1.15; } }
@media (prefers-reduced-motion: reduce) {
  .carousel__track { scroll-behavior: auto; }
  .media-card, .media-card__image img, .media-card__play { transition: none; }
  .media-card:hover, .media-card:hover .media-card__image img { transform: none; }
}
