/* ==========================================================================
   OUSL Library — Premium Hero Section
   Redesigned 2026 · Award-Quality Carousel Experience
   ========================================================================== */

/* --------------------------------------------------------------------------
   §1  Layout Shell
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  max-height: 1080px;
  overflow: hidden;
  background: #0c0e13;
  margin-top: -50px;          /* keep original offset for navbar overlap */
  font-family: 'Poppins', sans-serif;
}

/* --------------------------------------------------------------------------
   §2  Background slides (full-viewport images)
   -------------------------------------------------------------------------- */
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide.is-exiting {
  opacity: 0;
  z-index: 1;
}

.hero-slide-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 8s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

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

/* Cinematic overlay — dark gradient anchoring text to the left */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    /* left text-safe zone */
    linear-gradient(90deg,
      rgba(12, 14, 19, 0.90) 0%,
      rgba(12, 14, 19, 0.74) 35%,
      rgba(12, 14, 19, 0.32) 65%,
      rgba(12, 14, 19, 0.12) 100%),
    /* right-side preview backdrop for contrast */
    linear-gradient(270deg,
      rgba(12, 14, 19, 0.72) 0%,
      rgba(12, 14, 19, 0.28) 22%,
      transparent 42%),
    /* bottom anchoring */
    linear-gradient(to top,
      rgba(12, 14, 19, 0.82) 0%,
      rgba(12, 14, 19, 0.30) 25%,
      transparent 50%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   §3  Content panels (text + CTA)
   -------------------------------------------------------------------------- */
.hero-content-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.hero-content-panels {
  width: 100%;
  position: relative;
}

.hero-panel {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  padding: 0 clamp(32px, 6vw, 120px);
  max-width: min(720px, calc(100vw - 160px));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.7s;
  pointer-events: none;
}

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

/* Staggered entrance children */
.hero-panel.is-active .hero-tag          { animation: heroFadeUp 0.6s ease both 0.15s; }
.hero-panel.is-active .hero-headline,
.hero-panel.is-active .hero-headline-group { animation: heroFadeUp 0.7s ease both 0.30s; }
.hero-panel.is-active .hero-description  { animation: heroFadeUp 0.6s ease both 0.50s; }
.hero-panel.is-active .hero-actions      { animation: heroFadeUp 0.6s ease both 0.65s; }

/* Exit animation */
.hero-panel.is-exiting .hero-tag,
.hero-panel.is-exiting .hero-headline,
.hero-panel.is-exiting .hero-headline-group,
.hero-panel.is-exiting .hero-description,
.hero-panel.is-exiting .hero-actions {
  animation: heroFadeOut 0.35s ease both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-14px); }
}

/* Tag / badge */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 12px;
  background: rgba(224, 91, 29, 0.15);
  border: 1px solid rgba(224, 91, 29, 0.30);
  border-radius: 100px;
  color: #ffa238;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-tag i {
  font-size: 0.85rem;
}

/* Sub-headline (small text above main headline) */
.hero-sub-headline {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 2px !important;
  line-height: 1.2;
}

/* Main headline */
.hero-headline {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0 !important;
}

.hero-headline-group {
  margin-bottom: 0;
}

/* Description */
.hero-description {
  font-size: clamp(0.92rem, 1.3vw, 1.08rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 18px !important;
  margin-bottom: 0 !important;
  max-width: 520px;
  font-weight: 400;
}

/* CTA buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.hero-btn i {
  font-size: 1rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-btn-primary {
  background: var(--color-red-orange, #e05b1d);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(224, 91, 29, 0.35);
}

.hero-btn-primary:hover {
  background: var(--color-hover-orange, #c95000);
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(224, 91, 29, 0.50);
  transform: translateY(-2px);
}

.hero-btn-primary:hover i {
  transform: translateX(4px);
}

.hero-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(224, 91, 29, 0.25);
}

/* --------------------------------------------------------------------------
   §4  Right-Side Vertical Navigation — Thumbnails + Slide Counter
   -------------------------------------------------------------------------- */
.hero-side-nav {
  position: absolute;
  right: clamp(18px, 3.5vw, 48px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

/* Vertical Thumbnails */
.hero-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-thumb {
  position: relative;
  flex-shrink: 0;
  width: 78px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 14, 19, 0.6);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.hero-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2px 4px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

.hero-thumb:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateX(-4px);
}

.hero-thumb:hover img {
  opacity: 0.85;
  transform: scale(1.06);
}

.hero-thumb.is-active {
  border-color: var(--color-red-orange, #e05b1d);
  box-shadow: 0 4px 18px rgba(224, 91, 29, 0.45);
  transform: translateX(-6px);
}

.hero-thumb.is-active img {
  opacity: 1;
}

.hero-thumb.is-active .hero-thumb-label {
  opacity: 1;
  background: linear-gradient(to top, rgba(224, 91, 29, 0.9), transparent);
  color: #ffffff;
  font-weight: 700;
}

/* Focus visible for keyboard a11y */
.hero-thumb:focus-visible {
  outline: 2px solid #ffa238;
  outline-offset: 2px;
}

/* Slide counter wrapper below the vertical thumbnails */
.hero-counter-box {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(12, 14, 19, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease;
}

.hero-counter-box:hover {
  border-color: rgba(224, 91, 29, 0.5);
}

/* Progress ring & counter */
.hero-progress-ring {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.hero-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.hero-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 2.5;
}

.hero-ring-fill {
  fill: none;
  stroke: var(--color-red-orange, #e05b1d);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 0.1s linear;
}

.hero-slide-counter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.04em;
}

.hero-counter-current {
  color: #ffffff;
  font-size: 0.68rem;
}

.hero-counter-sep {
  opacity: 0.4;
  margin: 0 1px;
}

/* --------------------------------------------------------------------------
   §5  Top progress bar
   -------------------------------------------------------------------------- */
.hero-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.08);
}

.hero-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-red-orange, #e05b1d), #ffa238);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* --------------------------------------------------------------------------
   §6  Responsive — Tablet
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  .hero-section {
    min-height: 520px;
    max-height: 900px;
  }

  .hero-panel {
    max-width: calc(100% - 110px);
    padding: 0 clamp(20px, 4vw, 48px);
  }

  .hero-headline {
    font-size: clamp(2rem, 5vw, 3.2rem);
  }

  .hero-sub-headline {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
  }

  .hero-side-nav {
    right: 16px;
    gap: 8px;
  }

  .hero-thumbs {
    gap: 8px;
  }

  .hero-thumb {
    width: 66px;
    height: 44px;
    border-radius: 8px;
  }

  .hero-thumb-label {
    font-size: 0.5rem;
    padding: 1px 3px;
  }

  .hero-progress-ring {
    width: 38px;
    height: 38px;
  }
}

/* --------------------------------------------------------------------------
   §7  Responsive — Mobile
   -------------------------------------------------------------------------- */
@media screen and (max-width: 690px) {
  .hero-section {
    height: 100vh;
    height: 100dvh;
    min-height: 480px;
    max-height: 820px;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg,
        rgba(12, 14, 19, 0.55) 0%,
        rgba(12, 14, 19, 0.65) 30%,
        rgba(12, 14, 19, 0.85) 70%,
        rgba(12, 14, 19, 0.95) 100%),
      linear-gradient(270deg,
        rgba(12, 14, 19, 0.70) 0%,
        rgba(12, 14, 19, 0.25) 25%,
        transparent 50%);
  }

  .hero-panel {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    max-width: calc(100% - 74px);
    padding: 0 16px;
  }

  .hero-headline {
    font-size: clamp(1rem, 6.5vw, 2.3rem);
  }

  .hero-sub-headline {
    font-size: 0.92rem;
  }

  .hero-description {
    font-size: 0.86rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }

  .hero-tag {
    font-size: 0.68rem;
    padding: 4px 10px 4px 8px;
    margin-bottom: 12px;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-btn {
    padding: 10px 22px;
    font-size: 0.85rem;
  }

  .hero-side-nav {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    gap: 6px;
  }

  .hero-thumbs {
    gap: 6px;
  }

  .hero-thumb {
    width: 50px;
    height: 34px;
    border-radius: 6px;
  }

  .hero-thumb-label {
    display: none;
  }

  .hero-counter-box {
    margin-top: 2px;
    padding: 2px;
  }

  .hero-progress-ring {
    width: 34px;
    height: 34px;
  }

  .hero-slide-counter {
    font-size: 0.50rem;
  }

  .hero-counter-current {
    font-size: 0.60rem;
  }
}

/* --------------------------------------------------------------------------
   §8  Responsive — Very small screens
   -------------------------------------------------------------------------- */
@media screen and (max-width: 400px) {
  .hero-panel {
    max-width: calc(100% - 60px);
    padding: 0 12px;
  }

  .hero-headline {
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 0.80rem;
    -webkit-line-clamp: 2;
  }

  .hero-side-nav {
    right: 6px;
    gap: 4px;
  }

  .hero-thumbs {
    gap: 4px;
  }

  .hero-thumb {
    width: 42px;
    height: 28px;
    border-radius: 5px;
  }

  .hero-progress-ring {
    width: 30px;
    height: 30px;
  }
}

/* --------------------------------------------------------------------------
   §9  Reduced-motion preference
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide-img,
  .hero-panel,
  .hero-thumb,
  .hero-thumb img,
  .hero-btn {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .hero-slide-img {
    transform: scale(1) !important;
  }
}

/* --------------------------------------------------------------------------
   §10  Utility: hide old carousel rules from main.css / mainHero.css
   The redesigned hero uses entirely new class names, so old .carousel rules
   will not conflict. No need to remove them — they are simply inert.
   -------------------------------------------------------------------------- */

