/* Webflix — modern glassmorphic home hero */

.wf-hero {
  --wf-hero-accent: #f5ad11;
  --wf-hero-bg: #0b0e0f;
  --wf-hero-height: clamp(450px, 50vh, 520px);
  --wf-hero-notch-radius: clamp(22px, 4vw, 36px);
  --wf-hero-side-inset: clamp(10px, 2.5vw, 20px);
  position: relative;
  width: calc(100% - (var(--wf-hero-side-inset) * 2));
  margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
  height: auto;
  min-height: var(--wf-hero-height);
  max-height: 80vh;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0 0 var(--wf-hero-notch-radius) var(--wf-hero-notch-radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: none;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  z-index: 1;
}

.wf-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--wf-hero-bg);
  border-radius: inherit;
  overflow: hidden;
}

.wf-hero__backdrop-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.wf-hero__backdrop-layer.is-active {
  opacity: 1;
}

.wf-hero__backdrop-layer img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.08);
  transition: transform 9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wf-hero__backdrop-layer.is-active img {
  transform: scale(1.06);
}

.wf-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(11, 14, 15, 0.95) 0%, rgba(11, 14, 15, 0.55) 22%, rgba(11, 14, 15, 0.15) 55%, transparent 100%),
    linear-gradient(to inline-start, rgba(11, 14, 15, 0.75) 0%, rgba(11, 14, 15, 0.35) 30%, transparent 65%);
}

.wf-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: calc(var(--header-height, 70px) + 0.5rem) clamp(1rem, 4vw, 2rem) clamp(0.75rem, 2vw, 1.25rem);
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  overflow: visible;
}

.wf-hero__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: end;
}

.wf-hero__glass {
  max-width: 560px;
  padding: clamp(0.75rem, 1.8vw, 1.25rem);
  border-radius: 20px;
  background: rgba(12, 16, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: wfHeroFadeUp 0.6s ease both;
}

@keyframes wfHeroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.wf-hero__glass.is-changing {
  animation: wfHeroPulse 0.45s ease;
}

@keyframes wfHeroPulse {
  0% { opacity: 1; }
  40% { opacity: 0.55; }
  100% { opacity: 1; }
}

.wf-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wf-hero-accent);
}

.wf-hero__eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wf-hero-accent);
  box-shadow: 0 0 10px rgba(245, 173, 17, 0.8);
  animation: wfHeroBlink 2s ease infinite;
}

@keyframes wfHeroBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.wf-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.wf-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.wf-hero__imdb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 173, 17, 0.14);
  border: 1px solid rgba(245, 173, 17, 0.35);
  color: var(--wf-hero-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.wf-hero__imdb small {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
}

.wf-hero__type {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
}

.wf-hero__desc {
  margin: 0 0 0.75rem;
  min-height: calc(1.75em * 2);
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wf-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.wf-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0 1.15rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wf-hero__cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.wf-hero__cta--primary {
  background: linear-gradient(135deg, #f5ad11 0%, #e89b00 100%);
  color: #0b0e0f;
  box-shadow: 0 8px 24px rgba(245, 173, 17, 0.35);
}

.wf-hero__cta--primary:hover {
  color: #0b0e0f;
  box-shadow: 0 12px 28px rgba(245, 173, 17, 0.45);
}

.wf-hero__cta--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}

.wf-hero__cta--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

/* Thumb rail */
.wf-hero__rail-wrap {
  position: relative;
}

.wf-hero__rail-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.wf-hero__rail {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 0.5rem;
}

.wf-hero__rail-nav {
  flex: none;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(12, 16, 18, 0.65);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.wf-hero__rail-nav:hover {
  background: rgba(245, 173, 17, 0.2);
  border-color: rgba(245, 173, 17, 0.45);
  color: var(--wf-hero-accent);
}

.wf-hero__thumbs {
  min-width: 0;
  width: 100%;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.35rem 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.wf-hero__thumbs::-webkit-scrollbar {
  display: none;
}

.wf-hero__thumb {
  flex: 0 0 auto;
  width: clamp(55px, 8vw, 68px);
  cursor: pointer;
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.wf-hero__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color 0.25s ease;
  pointer-events: none;
}

.wf-hero__thumb.is-active {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 173, 17, 0.3);
}

/* RTL: rail nav icons were mirrored (left showed >, right showed <) */
[dir="rtl"] .wf-hero__rail-nav svg {
  transform: scaleX(-1);
}

.wf-hero__thumb.is-active::after {
  border-color: var(--wf-hero-accent);
}

.wf-hero__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.wf-hero__thumb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--wf-hero-accent);
  border-radius: 0 0 10px 10px;
  transition: width 0.1s linear;
}

.wf-hero__thumb.is-active .wf-hero__thumb-progress {
  animation: wfHeroProgress var(--wf-autoplay, 5s) linear forwards;
}

@keyframes wfHeroProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* Side arrows + dots */
.wf-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(12, 16, 18, 0.55);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.wf-hero__arrow:hover {
  background: rgba(245, 173, 17, 0.18);
  border-color: rgba(245, 173, 17, 0.4);
  color: var(--wf-hero-accent);
}

.wf-hero__arrow--prev { right: 1rem; }
.wf-hero__arrow--next { left: 1rem; }

.wf-hero__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.wf-hero__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, width 0.2s;
}

.wf-hero__dot.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--wf-hero-accent);
}

/* Suppress legacy hero rules when new hero is present */
.wf-hero.filmkio_home_slider {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  background: transparent !important;
}

.wf-hero .in_home_slider,
.wf-hero .image_owl_home,
.wf-hero .right_side_home_slider,
.wf-hero .data_for_show,
.wf-hero .home_owl_slider {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .wf-hero {
    --wf-hero-height: clamp(380px, 50vh, 480px);
    --wf-hero-notch-radius: clamp(18px, 5vw, 26px);
    --wf-hero-side-inset: clamp(8px, 2vw, 14px);
    height: auto !important;
    max-height: none !important;
  }

  .wf-hero__inner {
    padding-top: calc(var(--header-height-mobile, 60px) + 0.75rem) !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  .wf-hero__main {
    display: block !important;
    width: 100% !important;
  }

  .wf-hero__overlay {
    background:
      linear-gradient(to top, var(--wf-hero-bg) 0%, rgba(11, 14, 15, 0.88) 30%, rgba(11, 14, 15, 0.5) 65%, rgba(11, 14, 15, 0.35) 100%);
  }

  .wf-hero__glass {
    max-width: none;
    border-radius: 16px;
  }

  .wf-hero__inner {
    padding-top: calc(var(--header-height-mobile, 60px) + 0.75rem);
  }

  .wf-hero__desc {
    -webkit-line-clamp: 2;
    min-height: calc(1.75em * 2);
  }

  .wf-hero__arrow {
    display: none !important;
  }

  .wf-hero__rail {
    display: block !important;
  }

  .wf-hero__rail-nav {
    display: none !important;
  }

  .wf-hero__inner {
    padding: calc(var(--header-height-mobile, 60px) + 0.5rem) clamp(0.75rem, 3vw, 1.25rem) clamp(0.75rem, 2.5vw, 1.25rem);
  }
}

@media (min-width: 992px) {
  .wf-hero__inner {
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 2.5rem !important;
    padding-top: calc(var(--header-height, 70px) + 1.5rem) !important;
  }

  .wf-hero__main {
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 560px !important;
  }

  .wf-hero__rail-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    margin-bottom: 0.5rem !important;
  }

  [dir="rtl"] .wf-hero__main {
    order: 2 !important;
  }
  [dir="rtl"] .wf-hero__rail-wrap {
    order: 1 !important;
  }
}

@media (max-width: 576px) {
  .wf-hero__desc {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wf-hero__backdrop-layer,
  .wf-hero__backdrop-layer img,
  .wf-hero__glass,
  .wf-hero__thumb,
  .wf-hero__thumb-progress {
    animation: none !important;
    transition: none !important;
  }
}
