/* Carousel window (outer frame) */
.carousel-window {
  width: 100%;
  max-width: 1080px;
  /* stops growing past this */
  overflow: hidden;
  margin: 0 auto;
  cursor: grab;
  user-select: none;
  /* Improve touch scrolling on mobile: allow horizontal pan while preventing vertical
     touch-action interference with the carousel swipe logic. */
  touch-action: pan-x;
}

/* Track (slides container) */
.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Individual cards */
.card {
  height: 542px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  background-color: orange;
  text-align: left;
  /* Responsive cards 
     Default: 1 card per page 
     2 cards per page (481px–767px) 
     3 cards per page (≥768px) */
  display: grid;
  flex: 0 0 100%;
}
@media (min-width: 481px) and (max-width: 767px) {
  .card {
    /* 2 cards with 1 gap */
    flex: 0 0 calc((100% - 20px) / 2);
  }
}
@media (min-width: 768px) {
  .card {
    /* 3 cards with 2 gaps */
    flex: 0 0 calc((100% - 40px) / 3);
  }
}


/* Card content */
.card-content {
  /* background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2) 60%, transparent 100%); */
  color: #fff;
  padding: 40px 30px;
  box-sizing: border-box;
  display: grid;
  align-content: center; /* centers content vertically */
  justify-items: start;  /* optional - aligns items horizontally (left) */
  gap: 12px;
  height: 100%; /* fills the card */
  width: 100%;
  place-content: end;
}
.card-content * {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.card-header {
  margin: 0;
  font-size: 28px;
  font-family: 'Azo_Sans_Regular', 'sans-serif';
}
.card-body {
  flex-grow: 1;
  line-height: 22px;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  /* -webkit-line-clamp: 12; */
  /* limits lines shown */
  -webkit-box-orient: vertical;
  font-family: 'Azo_Sans_Regular', 'sans-serif';
}

.card-body a {
  display: flex;
}


/* Card button variation of fancy-button */
.card-content .fancy-button {
  display: flex;
  gap: 18px;
  align-items: center;
  text-shadow: none;
}
.card-content .fancy-button .icon {
  background: url('/images/icons/video.svg') no-repeat center center;
  background-size: contain;
  height: 20px;
  width: 20px;
  display: inline-block;
}


/* -~-~-~-~-~-~-~-~-~-~-~-~-~
  Carousel Navigation
-~-~-~-~-~-~-~-~-~-~-~-~-~ */
/* Remove default button styles - add a few */
.carousel-nav button {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: none;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  font-size: 25px;
  color: #223842;
}
.carousel-nav {
  padding-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* Navigation buttons */
  /* Focus style for keyboard users */
  /* Pagination dots container */
}
.carousel-nav .nav-btn {
  padding: 0 12px 2px;
  background: unset;
}
.carousel-nav .nav-btn:focus {
  outline: 3px solid #ffa500;
  outline-offset: 2px;
}
.carousel-nav .dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

/* Dot buttons: provide a large touch target while keeping the visible
   dot small via a ::before pseudo-element. This keeps hit areas >=44px
   for accessibility while allowing a compact visual mark. */
.carousel-nav .dots button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


.carousel-nav .dots button::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ABC987;
  display: block;
  transition: transform 160ms ease, background-color 160ms ease;
}

/* Active/selected state */
.carousel-nav .dots button.active::before {
  background: #1D5B2E;
  transform: scale(1.15);
}

/* Make the button focus-visible for keyboard users */
.carousel-nav .dots button:focus-visible {
  outline: 2px solid #ffbf47;
  outline-offset: 4px;
  border-radius: 10px;
}

/* Responsive tweaks for dots as viewport narrows */
@media (max-width: 480px) {
  .carousel-nav .dots {
    gap: 6px;
    /* allow horizontal scrolling if there are many dots */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px;
  }
  .carousel-nav .dots button {
    width: 36px;
    height: 36px;
  }
  .carousel-nav .dots button::before {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 360px) {
  .carousel-nav .dots {
    gap: 4px;
    padding: 4px 6px;
  }
  .carousel-nav .dots button {
    width: 28px;
    height: 28px;
  }
  .carousel-nav .dots button::before {
    width: 6px;
    height: 6px;
  }
}
.carousel-nav .dots.hidden {
  display: none !important;
}

/* Visually-hidden live region used by the carousel for screen-reader announcements.
   Keeps the element accessible to assistive tech while hiding it visually. */
.carousel-live-region {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* When middle dot displays a number, show it visibly and center it */
.carousel-nav .dots button.number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ebf5df;
  color: #123;
  font-weight: 700;
  font-size: 12px;
  line-height: 28px;
  text-indent: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav .dots button.number.active {
  background: #1d5b2e;
  color: #fff;
}