/**
 * Hero block — vrstvený obrázok (rozmazané pozadie + ostrý popredný obrázok).
 * Mobile-first: mobil = jednoduchý plný obrázok, desktop (≥768px) = vrstvená technika.
 */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--color-bg-primary);
  aspect-ratio: 4 / 5;
  min-height: 420px;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.hero.is-loaded .hero__img {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero__img {
    opacity: 1;
    transition: none;
  }
}

.hero__img--bg {
  display: none;
}

.hero__img--fg {
  object-position: center bottom;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 5, 29, 0.75) 0%, rgba(23, 5, 29, 0.45) 45%, rgba(23, 5, 29, 0.35) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 100%;
  padding-block: 2rem;
  gap: 0.875rem;
}

.hero__breadcrumb {
  margin-bottom: 0.25rem;
}

.hero__rating {
  margin-bottom: 0.25rem;
}

.hero__title {
  max-width: 640px;
}

.hero__subtitle {
  max-width: 520px;
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 0;
}

.hero__cta {
  margin-top: 0.5rem;
}

/* --- Desktop: vrstvená podoba obrázku (od 768px) ------------------------- */

@media (min-width: 768px) {
  .hero {
    aspect-ratio: var(--hero-aspect-ratio);
    min-height: 320px;
    mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
  }

  /* Kroky pomeru strán — zaručujú, že box nikdy nie je užší ako natívny pomer obrázku,
     takže postava/logo sa nikdy neorezáva po bokoch (viď hero.php výpočet). */
  .hero--ar-28 { aspect-ratio: 2.8 / 1; }
  .hero--ar-30 { aspect-ratio: 3.0 / 1; }
  .hero--ar-32 { aspect-ratio: 3.2 / 1; }
  .hero--ar-35 { aspect-ratio: 3.5 / 1; }
  .hero--ar-40 { aspect-ratio: 4.0 / 1; }

  .hero__img--bg {
    display: block;
    filter: blur(40px) brightness(0.55) saturate(1.1);
    transform: scale(1.15);
  }

  .hero__overlay {
    background:
      linear-gradient(90deg, rgba(23, 5, 29, 0.82) 0%, rgba(23, 5, 29, 0.5) 38%, rgba(23, 5, 29, 0.1) 68%, rgba(23, 5, 29, 0) 100%),
      linear-gradient(180deg, rgba(23, 5, 29, 0.4) 0%, rgba(23, 5, 29, 0) 35%, rgba(23, 5, 29, 0) 65%, rgba(23, 5, 29, 0.5) 100%);
  }

  .hero__content {
    justify-content: center;
    padding-block: 2.5rem;
    max-width: 60%;
  }
}

@media (min-width: 1024px) {
  .hero__content {
    max-width: 50%;
  }
}
