/* ============================================
   EPIVANTAGE — HERO SLIDER
   ============================================ */

body { padding-top: 0; }

/* ---- SLIDER WRAPPER ---- */
.ev-hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  max-height: 920px;
  overflow: hidden; /* CRITICAL — clips slides to wrapper bounds */
  background: #f4f6ff;
  /* Sits below the fixed nav */
  z-index: 0;
}

/* ---- ALL SLIDES STACK ABSOLUTELY ---- */
.ev-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  /* Always offset by fixed nav height */
  padding-top: calc(var(--nav-height) + var(--space-10));
  padding-bottom: calc(var(--space-12) + 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.75s ease, visibility 0.75s ease;
  z-index: 1;
  /* Prevent slide content from leaking above nav */
  overflow: hidden;
}

.ev-slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Admin bar extra offset */
.admin-bar .ev-slide {
  padding-top: calc(var(--nav-height) + 32px + var(--space-8));
}
@media screen and (max-width: 782px) {
  .admin-bar .ev-slide {
    padding-top: calc(var(--nav-height) + 46px + var(--space-6));
  }
}

/* Content entrance */
.ev-slide--active .ev-slide__content {
  animation: ev-fadeUp 0.65s ease both;
}
@keyframes ev-fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ---- SLIDE BACKGROUND ---- */
.ev-slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.ev-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.97) 0%,
    rgba(255,255,255,0.88) 40%,
    rgba(255,255,255,0.25) 68%,
    rgba(255,255,255,0.02) 100%
  );
  z-index: 1;
}

.ev-slide__dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #BEBEBE 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 2;
}

.ev-slide__dotcluster {
  position: absolute;
  bottom: -50px;
  left:   -50px;
  width:  280px;
  height: 280px;
  background-image: radial-gradient(circle, rgba(192,0,0,0.18) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* ---- CONTENT ---- */
.ev-slide__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  /* Use the container max-width and padding */
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
  padding-top: 100px;
}

.ev-slide__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 600px;
}

/* Eyebrow */
.ev-slide__content .ev-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0;
  display: none !important;
}
.ev-slide__content .ev-eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* Title */
.ev-slide__title {
  font-family: var(--font-heading) !important;
  font-size: 36px;
  font-weight: 600;
  color: var(--color-black);
  line-height: 48px;
  letter-spacing: 1%;
  margin: 0;
}
.ev-slide__title .accent { color: var(--color-primary); }

/* Subtitle */
.ev-slide__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-black);
  line-height: var(--lh-relaxed);
  max-width: 700px;
  margin: 0;
}

/* ---- CTA BOX ---- */
.ev-slide__cta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  width: fit-content;
  backdrop-filter: blur(6px);
  margin-top: var(--space-2);
}

.ev-slide__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 20;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: 1%;
  text-decoration: none;
  white-space: nowrap;
  transition: gap var(--transition-base), color var(--transition-fast);
}
.ev-slide__link:hover { gap: var(--space-3); color: var(--color-black); }
.ev-slide__link svg { flex-shrink: 0; transition: transform var(--transition-base); }
.ev-slide__link:hover svg { transform: translateX(3px); }

.ev-slide__cta-sep {
  width: 1px; height: 18px;
  background: rgba(0,0,0,0.12);
  flex-shrink: 0;
}

/* ---- TRUST ROW ---- */
.ev-slide__trust {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: var(--space-10);
  border-top: 1px solid rgba(0,0,0,0.09);
  flex-wrap: wrap;
}

.ev-trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 14;
  color: #595959;
  font-weight: var(--fw-medium);
}
.ev-trust-item svg,
.ev-trust-item img {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ---- DOT NAV ---- */
.ev-slider__dots {
  position: absolute;
  bottom: var(--space-8);
  left: var(--container-px);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 10;
  padding-inline: var(--container-px);
}

.ev-slider__dot {
  width: 26px; height: 3px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.18);
  border: none; padding: 0; cursor: pointer;
  transition: background var(--transition-base), width var(--transition-base);
}
.ev-slider__dot.active {
  background: var(--color-primary);
  width: 42px;
}
.ev-hero-slider:not(.has-bg) .ev-slider__dot { background: var(--color-border); }
.ev-hero-slider:not(.has-bg) .ev-slider__dot.active { background: var(--color-primary); }

/* ---- PROGRESS BAR ---- */
.ev-slider__progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--color-primary);
  width: 0%;
  z-index: 11;
  transition: width linear;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .ev-slide__content { max-width: 100%; }
}

@media (max-width: 768px) {
  .ev-hero-slider {
    height: auto;
    min-height: 88vh;
    max-height: none;
  }
  .ev-slide {
    position: relative;
    display: none;
    opacity: 1; visibility: visible;
    min-height: 88vh;
    padding-bottom: calc(var(--space-10) + 52px);
  }
  .ev-slide--active { display: flex; }
  .ev-slide__cta { width: 100%; }
  .ev-slide__trust { gap: var(--space-4); }
  .ev-slider__dots { bottom: var(--space-5); }
}

@media (max-width: 480px) {
  .ev-slide__cta { flex-direction: column; align-items: flex-start; }
  .ev-slide__cta-sep { display: none; }
  .ev-slide__title { font-size: clamp(1.9rem, 7vw, 2.6rem) !important; line-height: 2.4rem;}
}

@media (prefers-reduced-motion: reduce) {
  .ev-slide { transition: none; }
  .ev-slide--active .ev-slide__content { animation: none; }
}
