/* ============================================
   Aplus Pest Control — Creative Hero Slider
   ============================================ */

.hero-showcase {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  overflow-x: clip;
  background: var(--charcoal);
  width: 100%;
  max-width: 100%;
}

.hero-showcase__slides {
  position: absolute;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  left: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.9s;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* Background */
.hero-slide__bg {
  position: absolute;
  inset: 0;
}

.hero-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 7s ease;
}

.hero-slide.is-active .hero-slide__bg img {
  transform: scale(1);
}

.hero-slide__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(13, 27, 42, 0.94) 0%,
    rgba(13, 27, 42, 0.72) 42%,
    rgba(24, 119, 242, 0.35) 100%
  );
}

/* Diagonal accent stripe */
.hero-slide__stripe {
  position: absolute;
  top: -10%;
  right: 18%;
  width: 4px;
  height: 120%;
  background: linear-gradient(180deg, transparent, var(--blue), transparent);
  transform: rotate(18deg);
  opacity: 0.5;
  z-index: 2;
}

/* Main grid layout */
.hero-showcase__inner {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 160px;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: grid;
  grid-template-columns: 72px 1fr minmax(280px, 38%);
  grid-template-rows: 1fr auto;
  gap: 24px 40px;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Vertical slide rail — fixed on desktop */
.hero-rail--fixed {
  position: absolute;
  left: max(20px, calc((100% - 1280px) / 2 + 20px));
  top: calc(var(--nav-h) + 12vh);
  transform: translateY(-20%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-rail-spacer {
  display: block;
}

.hero-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: center;
}

.hero-rail__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-body);
  text-align: left;
  transition: var(--transition);
}

.hero-rail__btn:hover { color: rgba(255, 255, 255, 0.9); }

.hero-rail__btn.is-active { color: var(--white); }

.hero-rail__num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 28px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  transition: color var(--transition), font-size var(--transition);
}

.hero-rail__btn:hover .hero-rail__num {
  color: rgba(255, 255, 255, 0.92);
}

.hero-rail__btn.is-active .hero-rail__num {
  color: var(--blue-mid);
  font-size: 1.5rem;
  text-shadow: 0 0 20px rgba(66, 147, 245, 0.45);
}

.hero-rail__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  color: var(--white);
  transition: max-width 0.4s ease, opacity 0.3s;
  pointer-events: none;
}

.hero-rail__btn:hover .hero-rail__label {
  max-width: 120px;
  opacity: 1;
}

/* Content panel — glass skew card */
.hero-slide__content {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  min-width: 0;
  max-width: 100%;
}

.hero-slide.is-active .hero-slide__content {
  opacity: 1;
  transform: translateX(0);
}

.hero-slide__panel {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 40px 44px;
  transform: skewY(-1.5deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  max-width: 100%;
  box-sizing: border-box;
}

.hero-slide__panel > * { transform: skewY(1.5deg); }

.hero-slide__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 22px;
}

.hero-slide__tag-dot {
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

.hero-slide h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 18px;
}

.hero-slide h1 em {
  font-style: italic;
  color: var(--blue-accent);
}

.hero-slide__desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 100%;
}

.hero-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Feature card — 3D tilt stack */
.hero-slide__feature {
  position: relative;
  align-self: center;
  opacity: 0;
  transform: translateX(50px) rotate(4deg);
  transition: opacity 0.8s ease 0.25s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
  min-width: 0;
  max-width: 100%;
}

.hero-slide.is-active .hero-slide__feature {
  opacity: 1;
  transform: translateX(0) rotate(-2deg);
}

.hero-slide__feature-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  border: 3px solid rgba(255, 255, 255, 0.15);
}

.hero-slide__feature-frame img {
  width: 100%;
  height: clamp(260px, 38vh, 380px);
  object-fit: cover;
  display: block;
}

.hero-slide__feature-chip {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-slide__feature-chip svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
  flex-shrink: 0;
}

.hero-slide__feature-chip strong {
  display: block;
  font-size: 0.92rem;
  color: var(--charcoal);
  font-weight: 700;
}

.hero-slide__feature-chip span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Layout variants per slide */
.hero-slide--b.is-active .hero-slide__content {
  transform: translateX(0);
}

.hero-slide--b .hero-slide__panel {
  border-left: 4px solid var(--blue-mid);
}

.hero-slide--c .hero-slide__stripe { right: 42%; transform: rotate(-12deg); }

.hero-slide--d .hero-slide__panel {
  background: linear-gradient(135deg, rgba(24, 119, 242, 0.25), rgba(255, 255, 255, 0.06));
}

/* Bottom progress + pill nav */
.hero-showcase__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  background: linear-gradient(to top, rgba(13, 27, 42, 0.95), transparent);
  padding: 0 24px 28px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-showcase__footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: end;
  width: 100%;
  min-width: 0;
}

/* Pill nav + progress */
.hero-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hero-pills__track {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.hero-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.hero-pill.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(24, 119, 242, 0.45);
}

.hero-progress {
  width: min(320px, 100%);
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.hero-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-mid), var(--blue));
  border-radius: 3px;
  transition: width 0.1s linear;
}

/* Arrows */
.hero-arrows {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.hero-arrow:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.hero-arrow svg { width: 20px; height: 20px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-rail--fixed { display: none; }

  .hero-showcase__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 32px 20px 200px;
    gap: 20px;
  }

  .hero-rail-spacer { display: none; }

  .hero-slide__feature {
    grid-column: 1 / -1;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    transform: translateY(30px) rotate(0deg);
  }

  .hero-slide.is-active .hero-slide__feature {
    transform: translateY(0) rotate(0deg);
  }

  .hero-slide__content {
    transform: none;
  }

  .hero-slide.is-active .hero-slide__content {
    transform: none;
  }

  .hero-slide__panel {
    transform: none;
  }

  .hero-slide__panel > * { transform: none; }

  .hero-arrows { display: none; }

  .hero-pills { align-items: stretch; }
  .hero-pills__track { justify-content: stretch; }
  .hero-progress { width: 100%; }
}

@media (max-width: 768px) {
  .hero-showcase__inner {
    padding: 20px 16px 210px;
    gap: 16px;
  }

  .hero-showcase__footer {
    padding: 0 16px 20px;
  }

  .hero-slide__panel {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .hero-slide h1 {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.12;
  }

  .hero-slide__desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .hero-slide__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-slide__actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .hero-slide__feature {
    max-width: 100%;
  }

  .hero-slide__feature-frame img {
    height: 220px;
  }

  .hero-slide__feature-chip {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 12px 14px;
  }

  .hero-pills__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-pill {
    width: 100%;
    padding: 10px 8px;
    font-size: 0.72rem;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero-slide h1 { font-size: 1.7rem; }
  .hero-pills__track { gap: 6px; }
  .hero-pill { font-size: 0.68rem; padding: 9px 6px; }
}
