/* =====================================================
   EHI Hero Slider widget — ehi-slider.css
   Scoped to .ehi-hero to avoid leaking into the page.
   ===================================================== */

/* ── Design tokens ── */
.ehi-hero {
  --ehi-color-primary: #c41e2a;
  --ehi-color-primary-hover: #a8101b;
  --ehi-color-primary-dark: #8b0d15;
  --ehi-color-white: #ffffff;
  --ehi-font-heading: "Bebas Neue", "Arial Black", sans-serif;
  --ehi-font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ehi-nav-height: 72px;
  --ehi-hero-height: calc(100vh - var(--ehi-nav-height));
  --ehi-transition-default: all 0.3s ease;
}

header {
  height: 72px;
}
/* ── Section ── */
.ehi-hero {
  position: relative;
  width: 100%;
  height: var(--ehi-hero-height);
  min-height: var(--ehi-hero-height);
  overflow: hidden;
}

/* ── Swiper container ── */
.ehi-hero-swiper {
  width: 100%;
  height: 100%;
}

.ehi-hero-swiper .swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ───────────────────────────────────────────────
   SLIDE BACKGROUND  — Ken Burns zoom-out
─────────────────────────────────────────────── */
.ehi-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Ken Burns: zoom-out on active slide */
.ehi-slide-bg.ken-burns {
  transform: scale(1.07);
  transition: transform 7s ease;
}

.swiper-slide-active .ehi-slide-bg.ken-burns {
  transform: scale(1);
}

/* ───────────────────────────────────────────────
   SLIDE CONTENT
─────────────────────────────────────────────── */
.ehi-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--ehi-nav-height) + 48px) 24px 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
}

.ehi-slide-inner {
  max-width: 560px;
}

/* ── Overline / eyebrow ── */
.ehi-hero-overline {
  font-family: var(--ehi-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ehi-color-primary);
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

/* ── H1 ── */
.ehi-hero-h1 {
  font-family: var(--ehi-font-heading);
  font-size: clamp(48px, 6.5vw, 82px);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ehi-color-white);
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.55s ease 0.12s,
    transform 0.55s ease 0.12s;
}

/* ── Subtitle ── */
.ehi-hero-subtitle {
  font-family: var(--ehi-font-body);
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease 0.24s,
    transform 0.55s ease 0.24s;
}

/* ── CTA row ── */
.ehi-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease 0.36s,
    transform 0.55s ease 0.36s;
}

/* ── Animate in when slide is active ── */
.swiper-slide-active .ehi-hero-overline {
  opacity: 1;
  transform: translateY(0);
}
.swiper-slide-active .ehi-hero-h1 {
  opacity: 1;
  transform: translateY(0);
}
.swiper-slide-active .ehi-hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}
.swiper-slide-active .ehi-hero-actions {
  opacity: 1;
  transform: translateY(0);
}

/* ───────────────────────────────────────────────
   BUTTONS
─────────────────────────────────────────────── */
.ehi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ehi-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--ehi-transition-default);
}

.ehi-btn-primary {
  background: var(--ehi-color-primary);
  color: var(--ehi-color-white);
  border: 2px solid var(--ehi-color-primary);
}

.ehi-btn-primary:hover {
  background: var(--ehi-color-primary-hover);
  border-color: var(--ehi-color-primary-hover);
  transform: translateY(-2px);
}

.ehi-btn-primary:active {
  background: var(--ehi-color-primary-dark);
  transform: none;
}

.ehi-btn-outline {
  background: transparent;
  color: var(--ehi-color-white);
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.ehi-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ehi-color-white);
  transform: translateY(-2px);
}

/* ───────────────────────────────────────────────
   SWIPER PAGINATION
─────────────────────────────────────────────── */
.ehi-hero .ehi-swiper-pagination {
  bottom: 30px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ehi-hero .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 1;
  border-radius: 50%;
  transition: var(--ehi-transition-default);
  margin: 0 !important;
}

.ehi-hero .swiper-pagination-bullet-active {
  background: var(--ehi-color-white);
  border-color: var(--ehi-color-white);
  transform: scale(1.35);
}

/* ───────────────────────────────────────────────
   PROGRESS BAR
─────────────────────────────────────────────── */
.ehi-slide-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--ehi-color-primary);
  z-index: 10;
  /* transition applied via JS to allow dynamic delay value */
}

/* ───────────────────────────────────────────────
   RESPONSIVE — mobile ≤ 768px
─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ehi-slide-inner {
    max-width: 100%;
  }

  .ehi-hero-h1 {
    font-size: clamp(40px, 11vw, 60px);
  }

  .ehi-hero-subtitle {
    font-size: 14px;
  }

  .ehi-hero-actions {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 12px;
  }

  .ehi-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* ───────────────────────────────────────────────
   RESPONSIVE — small phone ≤ 480px
─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ehi-hero-h1 {
    font-size: clamp(34px, 12vw, 50px);
  }
  .ehi-hero-overline {
    font-size: 11px;
  }
  .ehi-hero-subtitle {
    font-size: 13px;
  }
  .ehi-btn {
    font-size: 12px;
    padding: 13px 22px;
  }
}

/* ───────────────────────────────────────────────
   REDUCED MOTION
─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ehi-slide-bg.ken-burns {
    transition: none !important;
    transform: scale(1) !important;
  }

  .ehi-hero-overline,
  .ehi-hero-h1,
  .ehi-hero-subtitle,
  .ehi-hero-actions {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
