/**
 * hero.css — BEM: hero, hero__*
 * The image is always a background layer behind the text (never a
 * separate block above/below it).
 * Mobile (<768px): the banner's height is driven by the TEXT content
 * (rating badge + H1 + subtitle + CTA), not by a fixed crop — the image
 * is absolutely positioned to fill whatever that height turns out to be
 * (object-fit: cover), so the H1 always has as much room as it needs and
 * the photo simply crops to match.
 * Desktop/tablet (>=768px): original behavior — the image keeps its
 * natural height (never cropped) and the text is overlaid at the bottom.
 */

.hero {
  position: relative;
  background: var(--color-bg-dark);
}

.hero__media {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 11, 29, 0.4) 0%, rgba(7, 11, 29, 0.6) 45%, rgba(7, 11, 29, 0.92) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: clamp(240px, 62vw, 340px);
}

.hero__content-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-block: clamp(1.25rem, 6vw, 2rem);
  max-width: 46rem;
  width: 100%;
}

@media (min-width: 768px) {
  .hero__image {
    position: static;
    height: auto;
    object-fit: initial;
  }

  .hero__scrim {
    background: linear-gradient(180deg, rgba(7, 11, 29, 0.15) 0%, rgba(7, 11, 29, 0.55) 55%, rgba(7, 11, 29, 0.92) 100%);
  }

  .hero__content {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .hero__content-inner {
    padding-block: clamp(1.25rem, 4vw, 3rem);
  }
}

.hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  background: var(--color-accent-bg);
  color: var(--color-btn-text-dark);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-small);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
}

.hero__title {
  color: var(--color-heading);
  margin-bottom: 0;
}

.hero__subtitle {
  color: var(--color-white);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.125rem);
  max-width: 60ch;
  margin-bottom: 0;
}

.hero__cta {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.hero .breadcrumbs {
  color: var(--color-text);
}

.hero .breadcrumbs a {
  color: var(--color-text);
}

.hero .breadcrumbs [aria-current="page"] {
  color: var(--color-heading);
}
