/* components/banner.css
   Styles for the rotating homepage banner (components/banner.php) */

.bg-banner {
  /* Outer band: full width, carries the dark background edge-to-edge
     across the row. Nothing else lives on this element. */
  width: 100%;
  background: #1a1a1a;
}

.bg-banner__inner {
  /* Inner box: images + arrows + dots all live in here, capped and
     centered — this is what used to be on .bg-banner itself. Giving
     it position: relative means the arrows/dots (position: absolute)
     anchor to this centered box instead of the full-width band. */
  position: relative;
  width: 100%;
  max-width: 1376px;
  max-height: 768px;
  margin: 0 auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.bg-banner__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.bg-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}
.bg-banner__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.bg-banner__slide img {
  display: block;
  width: 100%;
  height: 100%;
  /* contain (not cover): the whole image is always visible, no
     top/bottom or left/right cropping, no matter what the source
     file's actual ratio turns out to be. Any leftover space is
     letterboxed with the .bg-banner background color instead. */
  object-fit: contain;
  object-position: center;
}

.bg-banner__caption {
  position: absolute;
  left: 5%;
  bottom: 8%;
  max-width: 90%;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.bg-banner__caption h2 {
  margin: 0 0 0.25em;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  line-height: 1.15;
}
.bg-banner__caption p {
  margin: 0 0 0.75em;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  opacity: 0.9;
}
.bg-banner__cta {
  display: inline-block;
  padding: 0.6em 1.4em;
  background: #fff;
  color: #111;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

.bg-banner__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-banner__arrow--prev { left: 12px; }
.bg-banner__arrow--next { right: 12px; }
.bg-banner__arrow:hover { background: rgba(0, 0, 0, 0.55); }
.bg-banner__arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bg-banner__dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.bg-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
}
.bg-banner__dot.is-active { background: #fff; }
.bg-banner__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .bg-banner__slide { transition: none; }
}