/* The Headlight Guy — interactive before/after hero
   All selectors are prefixed "hg-" to avoid collisions with your site CSS. */

.hg-compare-card {
  --hg-pos: 48%;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border-radius: clamp(18px, 2vw, 28px);
  background: #06111c;
  border: 1px solid rgba(36, 173, 239, 0.46);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255,255,255,0.025);
}

.hg-compare-card:focus-within {
  outline: 2px solid rgba(50, 190, 255, 0.92);
  outline-offset: 4px;
}

.hg-compare-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hg-before-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: polygon(0 0, var(--hg-pos) 0, var(--hg-pos) 100%, 0 100%);
  will-change: clip-path;
}

.hg-compare-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 8, 15, .24) 0%, transparent 25%),
    linear-gradient(0deg, rgba(2, 8, 15, .42) 0%, transparent 27%);
}

.hg-compare-label {
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  z-index: 6;
  min-width: clamp(136px, 15vw, 184px);
  padding: 13px 17px 12px 20px;
  border-radius: 13px;
  color: #fff;
  line-height: 1.05;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 27, 43, .92) 0%, rgba(5, 16, 28, .90) 62%, rgba(2, 10, 18, .94) 100%);
  border: 1px solid rgba(122, 214, 252, .26);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -10px 18px rgba(0,0,0,.16);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  pointer-events: none;
}

.hg-compare-label strong {
  display: block;
  font: 800 clamp(.82rem, 1.12vw, 1rem)/1.02 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0,0,0,.30);
}

.hg-compare-label span {
  display: block;
  margin-top: 6px;
  font: 530 clamp(.61rem, .84vw, .75rem)/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .025em;
  color: rgba(227, 240, 248, .88);
}

.hg-label-before {
  left: clamp(16px, 2vw, 24px);
}

.hg-label-after {
  right: clamp(16px, 2vw, 24px);
  text-align: right;
  background:
    linear-gradient(180deg, rgba(17, 71, 120, .94) 0%, rgba(9, 43, 81, .92) 55%, rgba(4, 22, 42, .94) 100%);
  border-color: rgba(130, 223, 255, .34);
}

.hg-compare-divider {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: var(--hg-pos);
  width: 2px;
  transform: translateX(-1px);
  background:
    linear-gradient(180deg, rgba(167,243,255,.92) 0%, rgba(106,228,255,.98) 40%, rgba(98,221,255,.98) 60%, rgba(167,243,255,.92) 100%);
  box-shadow:
    0 0 4px rgba(165, 241, 255, .95),
    0 0 14px rgba(72, 203, 255, .72),
    0 0 26px rgba(24, 164, 255, .42);
  pointer-events: none;
}

.hg-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(42px, 4.2vw, 50px);
  height: clamp(42px, 4.2vw, 50px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 35%, rgba(35, 84, 110, .95), rgba(9, 28, 45, .98) 48%, rgba(3, 12, 22, .99) 100%);
  border: 2px solid rgba(126, 229, 255, .96);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 18px rgba(34, 159, 233, .16),
    0 0 0 3px rgba(8, 31, 48, .52),
    0 0 10px rgba(107, 229, 255, .55),
    0 0 24px rgba(44, 180, 255, .38);
}

.hg-compare-handle svg {
  width: 48%;
  height: 48%;
  stroke: rgba(247, 252, 255, .99);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.28));
}

.hg-compare-range {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.hg-compare-footer {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: clamp(14px, 1.8vw, 22px);
  transform: translateX(-50%);
  width: min(88%, 980px);
  padding: clamp(13px, 1.45vw, 18px) clamp(24px, 3vw, 40px) clamp(12px, 1.35vw, 16px);
  border-radius: 20px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 21, 34, .84) 0%, rgba(4, 13, 23, .88) 52%, rgba(2, 9, 17, .93) 100%);
  border: 1px solid rgba(61, 197, 255, .74);
  box-shadow:
    0 16px 36px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -16px 24px rgba(0,0,0,.16),
    0 0 14px rgba(38, 184, 255, .20);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  pointer-events: none;
}

.hg-compare-footer strong {
  display: block;
  font: 790 clamp(1.06rem, 2vw, 1.72rem)/1.03 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #f3fbff;
  text-shadow:
    0 1px 0 rgba(0,0,0,.26),
    0 0 10px rgba(85, 201, 255, .18);
}

.hg-compare-footer span {
  display: block;
  margin-top: 7px;
  font: 620 clamp(.56rem, .88vw, .84rem)/1.18 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(223, 242, 251, .90);
  text-shadow: 0 1px 0 rgba(0,0,0,.20);
}

.hg-compare-card[data-interacted="false"] .hg-compare-handle::after {
  content: "DRAG TO COMPARE";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px 5px;
  border-radius: 999px;
  color: rgba(250, 254, 255, .96);
  background:
    linear-gradient(180deg, rgba(7,20,34,.94), rgba(3,12,22,.96));
  border: 1px solid rgba(122, 223, 255, .42);
  box-shadow:
    0 6px 16px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 10px rgba(30,166,240,.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font: 780 8px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .10em;
  white-space: nowrap;
}

.hg-compare-card[data-interacted="false"] .hg-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(42px, 4.2vw, 50px);
  height: clamp(42px, 4.2vw, 50px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 35%, rgba(35, 84, 110, .95), rgba(9, 28, 45, .98) 48%, rgba(3, 12, 22, .99) 100%);
  border: 2px solid rgba(126, 229, 255, .96);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 18px rgba(34, 159, 233, .16),
    0 0 0 3px rgba(8, 31, 48, .52),
    0 0 10px rgba(107, 229, 255, .55),
    0 0 24px rgba(44, 180, 255, .38);
}

@keyframes hgHandleHint {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .hg-compare-card[data-interacted="false"] .hg-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(42px, 4.2vw, 50px);
  height: clamp(42px, 4.2vw, 50px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 38% 35%, rgba(35, 84, 110, .95), rgba(9, 28, 45, .98) 48%, rgba(3, 12, 22, .99) 100%);
  border: 2px solid rgba(126, 229, 255, .96);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 0 18px rgba(34, 159, 233, .16),
    0 0 0 3px rgba(8, 31, 48, .52),
    0 0 10px rgba(107, 229, 255, .55),
    0 0 24px rgba(44, 180, 255, .38);
}
}

@media (max-width: 620px) {
  .hg-compare-card {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
  }
}

  .hg-compare-label {
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  z-index: 6;
  min-width: clamp(136px, 15vw, 184px);
  padding: 13px 17px 12px 20px;
  border-radius: 13px;
  color: #fff;
  line-height: 1.05;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 27, 43, .92) 0%, rgba(5, 16, 28, .90) 62%, rgba(2, 10, 18, .94) 100%);
  border: 1px solid rgba(122, 214, 252, .26);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -10px 18px rgba(0,0,0,.16);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  pointer-events: none;
}

.hg-compare-label::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(197,245,255,.96), rgba(46,184,255,.82));
  box-shadow: 0 0 10px rgba(72, 204, 255, .36);
}
.hg-compare-label::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 34%),
    linear-gradient(100deg, transparent 0%, rgba(116,214,255,.06) 55%, transparent 100%);
  pointer-events: none;
}
.hg-label-before::before { left: 10px; }
.hg-label-after::before { right: 10px; }

@media (max-width: 620px) {
  .hg-compare-label {
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  z-index: 6;
  min-width: clamp(136px, 15vw, 184px);
  padding: 13px 17px 12px 20px;
  border-radius: 13px;
  color: #fff;
  line-height: 1.05;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 27, 43, .92) 0%, rgba(5, 16, 28, .90) 62%, rgba(2, 10, 18, .94) 100%);
  border: 1px solid rgba(122, 214, 252, .26);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .32),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -10px 18px rgba(0,0,0,.16);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  pointer-events: none;
}
}

.hg-compare-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 28%),
    radial-gradient(ellipse at center, rgba(67,191,255,.12), transparent 62%),
    linear-gradient(90deg, transparent 0%, rgba(122,221,255,.10) 50%, transparent 100%);
  pointer-events: none;
}


.hg-compare-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(77,203,255,.9), rgba(77,203,255,.9)) left 34px center / 18% 1px no-repeat,
    linear-gradient(90deg, rgba(77,203,255,.9), rgba(77,203,255,.9)) right 34px center / 18% 1px no-repeat,
    linear-gradient(90deg, rgba(60,197,255,.1), rgba(60,197,255,.9), rgba(60,197,255,.1)) center calc(100% - 14px) / 78px 2px no-repeat;
  opacity: .9;
  pointer-events: none;
}

@media (max-width: 620px) {
  .hg-compare-footer {
    width: calc(100% - 18px);
    border-radius: 16px;
    padding: 10px 16px 12px;
  }
  .hg-compare-footer strong {
    letter-spacing: .10em;
    font-size: clamp(.92rem, 4.6vw, 1.22rem);
  }
  .hg-compare-footer span {
    letter-spacing: .15em;
    font-size: clamp(.48rem, 2.3vw, .64rem);
  }
  .hg-compare-footer::after {
    background:
      linear-gradient(90deg, rgba(77,203,255,.9), rgba(77,203,255,.9)) left 18px center / 16% 1px no-repeat,
      linear-gradient(90deg, rgba(77,203,255,.9), rgba(77,203,255,.9)) right 18px center / 16% 1px no-repeat,
      linear-gradient(90deg, rgba(60,197,255,.1), rgba(60,197,255,.9), rgba(60,197,255,.1)) center calc(100% - 10px) / 56px 2px no-repeat;
  }
}

/* V230 integration: the V5 component owns only the existing homepage media slot. */
.hg-compare-host{
  min-height:0!important;
  aspect-ratio:16 / 9!important;
  border-radius:clamp(18px,2vw,28px)!important;
  transform:none!important;
}
.hg-compare-host>.hg-compare-card{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  border:0;
  border-radius:inherit;
}
@media(max-width:620px){
  .hg-compare-host{aspect-ratio:4 / 3!important}
}
