/*
  Page hero — reusable subpage header banner (breadcrumb + title over a
  full-bleed photo). Introduced with szerelvenygyartas.html, the first
  built subpage; reuse this file/class set for the other Megoldásaink
  pages and any future inner page rather than rebuilding a one-off hero.

  Shares the homepage hero's photo/overlay treatment (--color-overlay-navy
  at --overlay-hero-opacity, tokens.css) but shorter, with no banner strip
  beneath it — subpages don't carry the homepage's founding-year banner.
*/

.page-hero {
  position: relative;
  overflow: hidden;
  /* Every subpage hero is as tall as one with a 3-row title (user request
     2026-11-15): 3 rows x line-height x title size, plus 185px for padding,
     breadcrumb, gaps and subline (161px at <=768px, smaller padding). The
     title size is --fs-h1, x0.9 from 1024px (see the desktop block below).
     A title over 3 rows (tablet/phones only) grows the hero. */
  min-height: calc(3 * var(--lh-h1) * var(--fs-h1) + 185px);
  display: flex;
  /* Text block vertically centred (user request 2026-11-15; was
     flex-end, which moved the breadcrumb with the title's row count). */
  align-items: center;
}

.page-hero__image {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(35, 48, 77, 0.85);
}

.page-hero__content {
  position: relative;
  z-index: var(--z-elevated);
  width: 100%;
  /* Symmetric (was 32/64px) so the block sits at the true centre; same
     96px total, so the min-height constants below are unchanged. */
  padding-top: 48px; padding-bottom: 48px;
}

.page-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-slate-200);
}

.page-hero__breadcrumb a {
  transition: color var(--duration-fast) var(--ease-out);
}

.page-hero__breadcrumb a:hover,
.page-hero__breadcrumb a:focus-visible {
  color: var(--color-white);
}

.page-hero__breadcrumb span[aria-current="page"] {
  color: var(--color-white);
}

.page-hero__title {
  margin-top: var(--space-4);
  /* Full container width (was 720px, user request 2026-11-15): long
     product titles stay within 3 rows from 1024px up. */
  color: var(--color-white);
  font-weight: var(--fw-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tracking-tight);
}

.page-hero__subline {
  max-width: 640px;
  margin-top: var(--space-4);
  color: var(--color-white);
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  opacity: 0.92;
}

/* Type numbers like "061-es" in product titles never split at their
   hyphen (user request 2026-11-15). */
.page-hero__nobr {
  white-space: nowrap;
}

/* ---- Desktop / laptop (>= 1024px) ----
   Title 10% smaller than --fs-h1 (user request 2026-11-15): 51px at 1024,
   59px from 1440. The hero min-height follows the smaller size. */
@media (min-width: 1024px) {
  .page-hero {
    min-height: calc(3 * var(--lh-h1) * var(--fs-h1) * 0.9 + 185px);
  }

  .page-hero__title {
    font-size: calc(var(--fs-h1) * 0.9);
    /* No hyphenated breaks ("elzá-ró") on desktop/laptop, user request
       2026-11-15; base.css h1 has hyphens: auto, phones keep it. */
    hyphens: manual;
  }

  /* The two longest titles (Fojtókúpos 020/061) shrink to fit 2 rows,
     user request 2026-11-15. Since the language review (2026-11-21) they
     read "szabályozó-, illetve elzárószelepek 200 °C-ig (020-as típus)":
     "elzárószelepek" can no longer break, so the old 4.4vw / 57px gave
     3 rows. 37px at 1024, 47.5px from ~1300; measured max 2-row size in
     WebKit (tighter than Chromium) is 38px at 1024, 48.5 at 1440 (061).
     Every title shorter than these already fits 2 rows at the x0.9 size. */
  .page-hero__title--long {
    font-size: min(calc(var(--fs-h1) * 0.9), 3.65vw, 47.5px);
  }
}

/* ---- Tablet / mobile (<= 768px) ---- */
@media (max-width: 768px) {
  /* 10% bigger than the section h2s on phones/tablet-portrait (user, 2026-11-18,
     after x0.7 / x0.56 of h1 and = h2): 26.4px, 33.9px at 768. min-height follows. */
  .page-hero {
    min-height: calc(3 * var(--lh-h1) * var(--fs-h2) * 1.1 + 161px);
  }

  .page-hero__title {
    font-size: calc(var(--fs-h2) * 1.1);
  }

  .page-hero__content {
    padding-top: 36px; padding-bottom: 36px; /* was 24/48px, same 72px total */
  }
}

/* A subline hidden with the `hidden` attribute (HIDDEN-ON-PURPOSE, e.g.
   minositeseink.html) keeps its space, so the title stays where it was
   instead of dropping to the bottom. visibility: hidden also removes it
   from the accessibility tree. Beats base.css `[hidden] { display: none
   !important }` on specificity. */
.page-hero__subline[hidden] {
  display: block !important;
  visibility: hidden;
}
