/**
 * Header Slider — Swiper-based hero carousel.
 *
 * Every slide has a fixed CSS aspect-ratio so all slides share the same
 * height regardless of the natural aspect of each uploaded image. The
 * <img> uses object-fit: contain so the whole image is always visible
 * (no cropping); any letterboxing falls on the dark slide background.
 *
 * Arrows + dots live in a control strip below the slide so they never
 * overlap image content.
 */

.header-slider {
  position: relative;
  width: 100%;
}

.header-slider .header-slider__swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.header-slide {
  position: relative;
  width: 100%;
  /* Desktop default — matches both current desktop images (~2.27:1). */
  aspect-ratio: 16 / 7;
  background: #111;
  color: #fff;
  text-align: center;
}

@media (max-width: 768px) {
  .header-slide {
    /* Portrait shape for mobile uploads. */
    aspect-ratio: 3 / 4;
  }
}

.header-slide__picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.header-slide__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.header-slide__click-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  text-indent: -9999px;
  overflow: hidden;
}

/* Text overlay — only renders when title/subtitle/description/CTA are set. */
.header-slide__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1rem;
  pointer-events: none;
}

.header-slide__content > * {
  pointer-events: auto;
}

.header-slide__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
}

.header-slide__subtitle {
  margin: 0 0 1.25rem;
  font-size: clamp(1.05rem, 1.5vw, 1.5rem);
  font-weight: 500;
  opacity: 0.95;
}

.header-slide__description {
  margin: 0 0 1.75rem;
  font-size: clamp(0.95rem, 1.1vw, 1.125rem);
  line-height: 1.6;
  opacity: 0.92;
}

.header-slide__cta {
  display: inline-block;
  margin-top: 0.5rem;
  z-index: 3;
  position: relative;
}

/* ---------------- Arrows — circular dark background, white chevron ---------------- */

.header-slider {
  /* Swiper CSS variables — consumed by Swiper's own default selectors,
     so positioning + color flow through without us re-declaring them below. */
  --swiper-theme-color: #ffffff;
  --swiper-navigation-color: #ffffff;
  --swiper-navigation-size: 40px;
  --swiper-navigation-top-offset: 50%;
  --swiper-navigation-sides-offset: 22px;
  --swiper-pagination-color: #ffffff;
  --swiper-pagination-bullet-inactive-color: #ffffff;
  --swiper-pagination-bullet-inactive-opacity: 0.6;
  --swiper-pagination-bullet-horizontal-gap: 5px;
  --swiper-pagination-bottom: 18px;
  --swiper-pagination-top: auto;
}

/* Visual-only overrides. Position/size/offsets are driven by Swiper's defaults
   via the variables above (--swiper-navigation-size, --swiper-navigation-top-offset,
   --swiper-navigation-sides-offset). Padding shrinks Swiper's inline <svg>
   chevron (which fills the button content box) to ~14px so it sits inside
   the circular background. */
.header-slider .swiper-button-prev,
.header-slider .swiper-button-next {
  padding: 13px;
  box-sizing: border-box;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.header-slider .swiper-button-prev:hover,
.header-slider .swiper-button-next:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.7);
}

.header-slider .swiper-button-prev.swiper-button-disabled,
.header-slider .swiper-button-next.swiper-button-disabled {
  opacity: 0.25;
}

/* Safety net for older Swiper builds that use ::after icon text. */
.header-slider .swiper-button-prev::after,
.header-slider .swiper-button-next::after {
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 575px) {
  .header-slider {
    --swiper-navigation-size: 34px;
    --swiper-navigation-sides-offset: 14px;
  }
  .header-slider .swiper-button-prev,
  .header-slider .swiper-button-next {
    padding: 11px;
  }
}

/* ---------------- Dots ---------------- */

/* Position is driven by --swiper-pagination-bottom / --swiper-pagination-top
   declared above; this block is visual-only (size, color, shape). */
.header-slider .swiper-pagination-bullet {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.header-slider .swiper-pagination-bullet-active {
  background: #fff;
  transform: scale(1.2);
}

@media (max-width: 575px) {
  .header-slider {
    --swiper-pagination-bottom: 15px;
  }
}
