/* =====================================================================
   Evo Hero Slider — Front-end styles
   Uses evo clamp token variables for responsive spacing/type.
   Tokens expected on :root (from your theme/CoreFramework):
     --evotext-*, --evospace-*
   ===================================================================== */

/* Wrapper ------------------------------------------------------------ */
.evo-hero-wrap {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  background-color: #111;
}

/* Background --------------------------------------------------------- */
.evo-hero-bg,
.evo-hero-bg-next {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Bake the dark overlay into each bg layer via ::after so it fades
   with the image — no double-overlay darkening during crossfade */
.evo-hero-bg::after,
.evo-hero-bg-next::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.evo-hero-bg { z-index: 0; }

.evo-hero-bg-next {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.evo-hero-bg-next.evo-bg-visible {
  opacity: 1;
}

/* Overlay div kept for backwards compat but made transparent */
.evo-hero-bg-overlay {
  display: none;
}

/* Content area ------------------------------------------------------- */
.evo-hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--evo-pillars-height, 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--evospace-m, 1.6rem) var(--evospace-l, 2rem);
  text-align: center;
  z-index: 2;
}

/* Eyebrow ------------------------------------------------------------ */
.evo-hero-eyebrow {
  font-size: var(--evotext-s, clamp(1.02rem, 0.35vw + 0.91rem, 1.4rem));
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--evospace-xs, 1rem);
}

/* Heading ------------------------------------------------------------ */
/* .elementor prefix gives class+class specificity, beating theme rules
   like .home h1 (class+tag) without needing !important or hardcoded IDs */
.elementor .evo-hero-title {
  font-size: var(--evotext-2xl, clamp(2.28rem, 1.84vw + 1.69rem, 4.26rem));
  font-weight: 700;
  color: #fff;
  margin: 0 0 var(--evospace-s, 1rem);
  line-height: 1.0;
  max-width: none;
  letter-spacing: 0.01em;
  transition: opacity 0.3s ease;
}

/* Body text ---------------------------------------------------------- */
.evo-hero-sub {
  font-size: var(--evotext-m, clamp(1.6rem, 0.19vw + 1.54rem, 1.8rem));
  color: rgba(255,255,255,0.8);
  margin: 0 0 var(--evospace-m, 1.6rem);
  max-width: 52ch;
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

/* CTA ---------------------------------------------------------------- */
.evo-hero-cta {
  display: inline-block;
  padding: var(--evospace-2xs, 0.82rem) var(--evospace-m, 1.6rem);
  border: 2px solid rgba(255,255,255,0.85);
  color: #fff;
  font-size: var(--evotext-xs, clamp(1.01rem, -0.23vw + 1.34rem, 1.26rem));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.evo-hero-cta:hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
}

/* CTA button group --------------------------------------------------- */
.evo-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

/* CTA 2 -------------------------------------------------------------- */
.evo-hero-cta2 {
  display: inline-block;
  padding: var(--evospace-2xs, 0.82rem) var(--evospace-m, 1.6rem);
  border: 2px solid rgba(255,255,255,0.85);
  color: #fff;
  font-size: var(--evotext-xs, clamp(1.01rem, -0.23vw + 1.34rem, 1.26rem));
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.evo-hero-cta2:hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
}

/* USP bar ------------------------------------------------------------ */
.evo-usp-bar {
  position: absolute;
  bottom: var(--evo-pillars-height, 120px);
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--evospace-m, 1.6rem);
  padding: var(--evospace-2xs, 0.82rem) var(--evospace-s, 1.28rem);
  background: #1a1a1a;
  z-index: 3;
  overflow: hidden;
}

.evo-usp-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--evotext-xs, 1.01rem);
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

.evo-usp-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #fff;
}

.evo-usp-icon svg,
.evo-usp-icon i {
  width: 100%;
  height: 100%;
}

/* Google Reviews badge ----------------------------------------------- */
.evo-reviews-badge {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: var(--evotext-xs, 0.9rem);
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  bottom: calc(var(--evo-pillars-height, 120px) + var(--evospace-s, 1rem));
  right: var(--evospace-s, 1.28rem);
  left: auto;
  transition: background 0.2s;
  white-space: nowrap;
}

a.evo-reviews-badge:hover {
  background: #222;
}

.evo-reviews-badge--bottom-right  { right: var(--evospace-s, 1.28rem); left: auto; }
.evo-reviews-badge--bottom-left   { left:  var(--evospace-s, 1.28rem); right: auto; }
.evo-reviews-badge--bottom-center { left: 50%; right: auto; transform: translateX(-50%); }

.evo-reviews-glogo {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.evo-reviews-rating { font-weight: 700; }
.evo-reviews-stars  { color: #f5a623; letter-spacing: 1px; }
.evo-reviews-count  { opacity: 0.8; }

/* Arrows ------------------------------------------------------------- */
.evo-arrow {
  position: absolute;
  top: calc(50% - var(--evo-pillars-height, 120px) / 2);
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.35);
  border: none;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
  border-radius: 0;
  padding: 0;
}

.evo-arrow:hover {
  background: rgba(0,0,0,0.65);
}

.evo-arrow svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

.evo-arrow-prev { left: var(--evospace-s, 1.28rem); }
.evo-arrow-next { right: var(--evospace-s, 1.28rem); }

/* Progress bar ------------------------------------------------------- */
.evo-progress-bar {
  position: absolute;
  bottom: var(--evo-pillars-height, 120px);
  left: 0;
  height: 3px;
  background: #fff;
  width: 0%;
  transition: width 0.08s linear;
  z-index: 3;
}

/* Pillar nav --------------------------------------------------------- */
.evo-pillars {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(var(--evo-pillar-count, 4), 1fr);
  height: var(--evo-pillars-height, 120px);
  z-index: 3;
}

/* -----------------------------------------------------------------------
   .evo-pillar — position:relative is required for the ::before inner border.
   
   Inner border uses a ::before pseudo positioned absolutely inside the pillar.
   --evo-pillar-inner-border-inset controls how far from each edge the frame
   sits. At the seam between two adjacent pillars the gap is inset×2, which
   is what makes each card look visually distinct from its neighbours.
   Default values produce no visible border until Elementor controls are set.
----------------------------------------------------------------------- */
.evo-pillar {
  position: relative; /* required for ::before inner border */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--evospace-4xs, 0.5rem);
  cursor: pointer;
  background: #1a1a1a;
  border-top: 3px solid transparent;
  padding: 0 var(--evospace-s, 1rem);
  transition: background 0.3s, border-top-color 0.3s;
}

/* Inner border frame — floats inside the pillar, clear of the edges.
   pointer-events: none so it never blocks clicks. z-index above content
   is fine because the interior is transparent — text/icons show through. */
.evo-pillar::before {
  content: '';
  position: absolute;
  inset: var(--evo-pillar-inner-border-inset, 0px);
  border: var(--evo-pillar-inner-border-width, 0px) solid var(--evo-pillar-inner-border-color, transparent);
  pointer-events: none;
  z-index: 4;
  transition: border-color 0.3s;
}

.evo-pillar + .evo-pillar {
  border-left: 1px solid rgba(255,255,255,0.1);
}

.evo-pillar:hover {
  background: #222 !important;
}

.evo-pillar.active {
  background: #111;
  border-top-color: var(--evo-pillar-border, #808080);
}

.evo-pillar-icon {
  width: var(--evotext-l, 1.8rem);
  height: var(--evotext-l, 1.8rem);
  flex-shrink: 0;
}

.evo-pillar-icon svg,
.evo-pillar-icon i {
  width: 100%;
  height: 100%;
}

.evo-pillar-label {
  font-size: var(--evotext-xs, clamp(1.01rem, -0.23vw + 1.34rem, 1.26rem));
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.01em;
  transition: color 0.3s;
}

.evo-pillar.active .evo-pillar-label {
  color: #fff;
}

.evo-pillar-sub {
  font-size: calc(var(--evotext-xs, 1.01rem) * 0.85);
  color: rgba(255,255,255,0.3);
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s;
}

.evo-pillar.active .evo-pillar-sub {
  color: rgba(255,255,255,0.6);
}

/* Tab CTA link ------------------------------------------------------- */
.evo-pillar-cta {
  display: block;
  font-size: calc(var(--evotext-xs, 1.01rem) * 0.82);
  color: rgba(255,255,255,0.5);
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-top: var(--evospace-4xs, 0.3rem);
  padding: var(--evospace-4xs, 0.25rem) 0;
  transition: color 0.25s;
  position: relative;
  z-index: 1;
}

.evo-pillar-cta:hover {
  color: #fff;
  text-decoration: underline;
}

.evo-pillar.active .evo-pillar-cta {
  color: rgba(255,255,255,0.75);
}

/* Fade helpers ------------------------------------------------------- */
.evo-fade-out { opacity: 0; }
.evo-fade-in  { opacity: 1; }

/* =====================================================================
   MOBILE — flex column so progress bar always sits above pillars
   ===================================================================== */
@media (max-width: 640px) {

  .evo-hero-wrap {
    height: auto !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-color: #111;
  }

  .evo-hero-bg,
  .evo-hero-bg-next,
  .evo-hero-bg-overlay {
    display: none;
  }

  .evo-hero-content {
    position: relative;
    bottom: auto;
    flex: 0 0 55vh;
    min-height: 300px;
    padding: var(--evospace-l, 2rem) var(--evospace-s, 1.28rem);
    order: 1;
    overflow: hidden;
    background-color: var(--evo-bg-color, #111);
    background-image: var(--evo-bg-image, none);
    background-size: cover;
    background-position: center;
  }

  .evo-hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
    z-index: 0;
    pointer-events: none;
  }

  .evo-hero-eyebrow,
  .evo-hero-title,
  .evo-hero-sub,
  .evo-hero-cta,
  .evo-hero-ctas {
    position: relative;
    z-index: 1;
  }

  .evo-reviews-badge,
  .evo-reviews-badge--bottom-right,
  .evo-reviews-badge--bottom-left,
  .evo-reviews-badge--bottom-center {
    position: relative !important;
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    order: 5;
    width: fit-content;
    background: #111 !important;
    display: inline-flex;
    align-self: center;
  }

  .evo-progress-bar {
    position: relative;
    bottom: auto;
    height: 3px;
    flex: 0 0 3px;
    order: 2;
    z-index: 2;
  }

  .evo-pillars {
    position: relative !important;
    bottom: auto !important;
    height: auto !important;
    grid-template-columns: repeat(2, 1fr);
    flex: 0 0 auto;
    order: 3;
    z-index: 2;
  }

  .evo-pillar {
    min-height: 80px;
    padding: var(--evospace-xs, 1rem) var(--evospace-2xs, 0.82rem);
    border-top: none;
    border-bottom: 3px solid transparent;
    transition: background 0.3s, border-bottom-color 0.3s;
  }

  .evo-pillar + .evo-pillar {
    border-left: none;
  }

  .evo-pillar:nth-child(2n) {
    border-left: 1px solid rgba(255,255,255,0.1);
  }

  .evo-pillar:nth-child(n+3) {
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .evo-pillar.active {
    border-top-color: transparent;
    border-bottom-color: var(--evo-pillar-border, #808080);
  }

  .evo-arrow {
    display: none !important;
  }

  .evo-hero-content { order: 1; }
  .evo-progress-bar { order: 2; }
  .evo-pillars      { order: 3; }
  .evo-usp-bar      { order: 4; }

  .evo-hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .evo-usp-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    flex: 0 0 auto;
    order: 4;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--evospace-s, 1rem);
  }

  .evo-usp-item {
    white-space: normal;
    text-align: center;
  }
}
