/* Blok Hero podstrony. Sekcja wchodzi pod przypięty nagłówek; razem z paskiem rozdziałów (--chapters-h) mieści się w pierwszym widoku.
   Bez paska rozdziałów też zostaje 50 px na początek następnej sekcji, jak w prototypie (100svh - 50,4 px; O nas, Aktualności, 2.11). */
.rg-hero {
  position: relative; isolation: isolate; display: flex;
  min-height: min(738px, calc(100svh - max(var(--chapters-h), 50px))); padding-block: 0;
  background: #101216;
}
.rg-hero__image { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.rg-hero__image img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-focus, 50% 35%); }
.rg-hero__image::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 14, 18, .91) 0%, rgba(11, 14, 18, .65) 48%, rgba(11, 14, 18, .17) 100%),
    linear-gradient(0deg, rgba(11, 14, 18, .72), transparent 55%);
}
.rg-hero--family { min-height: min(684px, calc(100svh - max(var(--chapters-h), 50px))); }
.rg-hero__eyebrow { margin-bottom: 14px; font-size: var(--text-small); font-weight: var(--weight-medium); letter-spacing: .08em; line-height: 1.5; text-transform: uppercase; }
.rg-hero__family { display: grid; color: rgba(255, 255, 255, .72); font-size: var(--text-small); font-weight: var(--weight-light); line-height: 1.6; }
.rg-hero__family b { color: #fff; font-size: 14.4px; font-weight: var(--weight-semibold); }
.rg-hero__inner { display: flex; flex-direction: column; padding-block: calc(var(--header-h) + 21px) 29px; }

.rg-hero__crumbs { margin-bottom: 36px; color: rgba(255, 255, 255, .76); font-size: var(--text-small); line-height: 1.5; }
.rg-hero__crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 11px; margin: 0; padding: 0; list-style: none; }
.rg-hero__crumbs li { display: flex; align-items: center; gap: 11px; }
.rg-hero__crumbs a, .rg-hero__crumbs [aria-current] { display: flex; align-items: center; min-height: 25px; }
.rg-hero__crumbs li + li::before { content: "/"; color: rgba(255, 255, 255, .44); }
.rg-hero__crumbs a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .33); text-underline-offset: 4px; transition: color var(--duration) var(--ease); }
.rg-hero__crumbs a:is(:hover, :focus-visible) { color: #fff; text-decoration-color: currentColor; }
.rg-hero__crumbs [aria-current] { color: #fff; }

.rg-hero__copy { max-width: 720px; margin-bottom: 36px; }
.rg-hero__inner > .rg-hero__copy:last-child { margin-bottom: 0; }
.rg-hero h1 { font-size: var(--text-h1); font-weight: var(--weight-semibold); line-height: 1.14; letter-spacing: -.045em; }
.rg-hero__lead { max-width: 612px; margin-top: 22px; color: rgba(255, 255, 255, .86); line-height: 1.65; }
.rg-hero__actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 25px; }
.rg-hero__actions .btn--ghost { backdrop-filter: blur(9px); }
.rg-hero__links { display: flex; flex-wrap: wrap; gap: 7px 9px; }

/* Dół hero z oceną: ocena po lewej, kafelki faktów po prawej. */
.rg-hero__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 25px; margin-top: auto; }
.rg-hero__bottom .rg-hero__stats { margin: 0; }
.rg-hero__badge {
  display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 13px; padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; background: rgba(22, 20, 24, .72); backdrop-filter: blur(6px);
}
.rg-hero__badge-value { grid-row: span 2; font-size: 27px; font-weight: var(--weight-bold); line-height: 1; letter-spacing: -.03em; }
.rg-hero__badge-value small { margin-left: 2px; color: var(--color-text-soft); font-size: var(--text-small); font-weight: var(--weight-medium); letter-spacing: 0; }
.rg-hero__badge-stars { position: relative; color: rgba(255, 255, 255, .22); font-size: var(--text-small); line-height: 1; letter-spacing: 2px; }
.rg-hero__badge-stars::before { content: "★★★★★"; position: absolute; inset: 0 auto 0 0; width: var(--rating, 100%); overflow: hidden; color: #f5c24a; white-space: nowrap; }
.rg-hero__badge-label { color: var(--color-text-soft); font-size: var(--text-small); line-height: 1.35; }
.rg-hero__badge-label b { color: #fff; font-weight: var(--weight-semibold); }

.rg-hero__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 846px); margin: auto 0 0 auto; padding: 0; list-style: none;
  border: 1px solid rgba(255, 255, 255, .19); border-radius: 14px; background: rgba(255, 255, 255, .055); backdrop-filter: blur(16px); overflow: hidden;
}
.rg-hero__text { max-width: 612px; margin-top: 13px; color: rgba(255, 255, 255, .86); line-height: 1.6; }
.rg-hero__lead:has(+ .rg-hero__text) { line-height: 1.6; }
.rg-hero__stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 684px); }
.rg-hero__stats--3.rg-hero__stats--words { width: min(100%, 846px); }
.rg-hero__stat { display: flex; flex-direction: column; gap: 7px; padding: 22px 20px; }
.rg-hero__stat + .rg-hero__stat { border-left: 1px solid rgba(255, 255, 255, .14); }
.rg-hero__stat strong { font-size: 28px; font-weight: var(--weight-bold); line-height: 1.05; letter-spacing: -.6px; white-space: nowrap; }
.rg-hero__stat span { color: rgba(255, 255, 255, .79); font-size: var(--text-small); line-height: 1.5; }

@media (max-width: 1024px) {
  .rg-hero { min-height: min(744px, calc(100svh - max(var(--chapters-h), 50px))); }
  .rg-hero__inner { padding-block: calc(var(--header-h) + 30px) 32px; }
  .rg-hero__crumbs, .rg-hero__copy { margin-bottom: 40px; }
  .rg-hero__crumbs :is(a, [aria-current]) { min-height: 28px; }
  .rg-hero__copy { max-width: 800px; }
  .rg-hero__lead { max-width: 680px; margin-top: 24px; }
  .rg-hero__actions { gap: 12px; margin-top: 28px; }
  .rg-hero__stats { width: 100%; border-radius: 16px; }
  .rg-hero__stat { gap: 8px; padding: 22px 18px; }
}
@media (max-width: 760px) {
  .rg-hero { min-height: 0; }
  .rg-hero__family { display: none; }
  .rg-hero__eyebrow { margin-bottom: 16px; }
  .rg-hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-hero__stat { padding: 20px 16px; }
  .rg-hero__stat:nth-child(odd) { border-left: 0; }
  .rg-hero__stat:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, .14); }
  .rg-hero__text { margin-top: 14px; }
  .rg-hero__stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rg-hero__stats--3 .rg-hero__stat { padding: 18px 12px; border-top: 0; }
  .rg-hero__stats--3 .rg-hero__stat + .rg-hero__stat { border-left: 1px solid rgba(255, 255, 255, .14); }
  .rg-hero__stats--3.rg-hero__stats--words { grid-template-columns: minmax(0, 1fr); }
  .rg-hero__stats--3.rg-hero__stats--words .rg-hero__stat { padding: 18px 12px; }
  .rg-hero__stats--3.rg-hero__stats--words .rg-hero__stat + .rg-hero__stat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
}
@media (max-width: 640px) {
  .rg-hero__image::after {
    background: linear-gradient(90deg, rgba(11, 14, 18, .91), rgba(11, 14, 18, .66)), linear-gradient(0deg, rgba(11, 14, 18, .85), transparent);
  }
  .rg-hero__inner { padding-block: calc(var(--header-h) + 20px) 24px; }
  .rg-hero__crumbs { margin-bottom: 28px; }
  .rg-hero__crumbs ol { gap: 4px 8px; }
  .rg-hero__crumbs li { gap: 8px; }
  .rg-hero__copy { margin-bottom: 32px; }
  .rg-hero__lead { margin-top: 20px; }
  .rg-hero__actions { margin-top: 24px; }
  .rg-hero__stat { padding: 18px 12px; }
  .rg-hero__stat strong { font-size: 24px; }
}
@media (max-width: 480px) {
  .rg-hero__actions .btn, .rg-hero__after { width: 100%; }
  .rg-hero__actions { gap: 12px; }
  .rg-hero__links { flex-direction: column; width: 100%; gap: 10px; }
  .rg-hero__bottom { flex-direction: column; align-items: stretch; gap: 20px; }
  .rg-hero__badge { justify-self: start; align-self: flex-start; gap: 2px 14px; padding: 14px 18px; border-radius: 16px; }
  .rg-hero__badge-value { font-size: 30px; }
  .rg-hero__badge-value small { font-size: 15px; }
}
/* Wąski telefon jak w prototypie (service-system.css do 420 px): napis przycisku przy lewej krawędzi, wyróżniki 20 px
   („Door-to-door” na stronach krajów mieścił się w kafelku dopiero przy 20 px, 2.11). */
@media (max-width: 420px) {
  .rg-hero__actions .btn { justify-content: space-between; }
  .rg-hero__stat strong { font-size: 20px; }
}

/* Wideo w tle (komputer): pojawia się, gdy zacznie grać; przycisk wstrzymania w prawym górnym rogu. */
.rg-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.rg-hero__video.is-playing { opacity: 1; }
.rg-hero__video-toggle {
  position: absolute; z-index: 3; top: calc(var(--header-h) + 22px); right: var(--gutter);
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; background: rgba(15, 15, 16, .4); color: #fff;
  font-size: var(--text-small); font-weight: var(--weight-medium); backdrop-filter: blur(6px);
}
.rg-hero__video-toggle[hidden] { display: none; }
.rg-hero__video-toggle::after { content: ""; width: 8px; height: 10px; border-inline: 2px solid currentColor; }
.rg-hero__video-toggle[aria-pressed="true"]::after { width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor; }
.rg-hero__video-toggle:hover { background: rgba(15, 15, 16, .6); }
@media (max-width: 767px) { .rg-hero__video, .rg-hero__video-toggle { display: none; } }

/* Kafelki z wyróżnikami słownymi (stats_style = text, Paliwa): jak .rg-stats--text w HTML, napis 22 px z łamaniem wierszy,
   na telefonie dwie kolumny (ostatni kafelek sam w wierszu), także przy krótkich wartościach (Paliwa 31.10: „200 l”, „24 h”, „3”). */
.rg-hero__stats--text .rg-hero__stat strong { font-size: 22px; line-height: 1.15; white-space: normal; }
@media (max-width: 760px) {
  .rg-hero__stats--3.rg-hero__stats--text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat + .rg-hero__stat { border-top: 0; }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat:nth-child(2) { border-left: 1px solid rgba(255, 255, 255, .14); }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat:nth-child(3) { border-top: 1px solid rgba(255, 255, 255, .14); }
}
/* Telefon: trzy wyróżniki słowne jeden pod drugim, nazwa po lewej, opis po prawej (prototyp po QA 31.10 Z1: w siatce 2x2
   zostawała pusta komórka, a słowa wychodziły poza kafelki; Kolejowy, Morski, Lotniczy, Intermodalny, Paliwa). */
@media (max-width: 600px) {
  .rg-hero__stats--3.rg-hero__stats--text { grid-template-columns: minmax(0, 1fr); }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat { flex-direction: row; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat + .rg-hero__stat { border-top: 1px solid rgba(255, 255, 255, .14); border-left: 0; }
  .rg-hero__stats--3.rg-hero__stats--text .rg-hero__stat strong { flex: 0 0 132px; font-size: 18px; }
}

/* Karta z danymi obok nagłówka (card, Kontakt 31.10, jak .kontakt-hero i .kontakt-hq w kontakt.html): hero niższe,
   nagłówek z leadem i karta w jednym rzędzie wyrównanym do dołu; na tablecie karta pod nagłówkiem. Karta leży na zdjęciu,
   więc zostaje ciemna także w jasnym motywie. */
.rg-hero--card { min-height: min(560px, calc(100svh - var(--header-h))); }
.rg-hero--card .rg-hero__inner { justify-content: space-between; }
.rg-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-7); align-items: end; margin-top: auto; }
.rg-hero__grid .rg-hero__copy { max-width: 640px; margin-bottom: 0; }
.rg-hero__card {
  line-height: 1.6; padding: var(--space-6); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-card);
  background: rgba(15, 15, 16, .78); color: #fff; backdrop-filter: blur(6px);
}
.rg-hero__card-title { margin: 0 0 var(--space-4); font-size: var(--text-h3); font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: 0; }
.rg-hero__card-list { display: grid; gap: var(--space-3); margin: 0; }
.rg-hero__card-list > div { display: grid; grid-template-columns: 36px 76px minmax(0, 1fr); align-items: center; column-gap: var(--space-3); }
.rg-hero__card-list svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--color-red); color: #fff; }
.rg-hero__card-list dt { color: rgba(255, 255, 255, .7); font-weight: var(--weight-medium); }
.rg-hero__card-list dd { margin: 0; color: #fff; }
.rg-hero__card-list a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; }
.rg-hero__card-list a:is(:hover, :focus-visible) { text-decoration-color: var(--color-red-bright); }
@media (max-width: 1024px) {
  .rg-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); margin-top: var(--space-5); }
}
@media (max-width: 760px) {
  .rg-hero__card { padding: var(--space-5); }
  .rg-hero__card-list > div { grid-template-columns: 36px minmax(0, 1fr); }
  .rg-hero__card-list svg { grid-row: span 2; }
  .rg-hero__card-list :is(dt, dd) { grid-column: 2; }
}

/* drift (29.10, Flota, brief klientki): bardzo delikatny ruch zdjęcia w tle (powiększenie i przesunięcie w 26 s, tam i z powrotem). */
@media (prefers-reduced-motion: no-preference) {
  .rg-hero--drift .rg-hero__image img { animation: rg-hero-drift 26s ease-in-out infinite alternate; transform-origin: 60% 50%; }
}
@keyframes rg-hero-drift { from { transform: scale(1); } to { transform: scale(1.07) translateX(-1.5%); } }

/* stats_style rows (31.10, Przewoźnicy, jak .pz-hero .rg-stats--3 w HTML): na telefonie kafelki jeden pod drugim,
   liczba 20 px w kolumnie 112 px po lewej, podpis po prawej. */
@media (max-width: 600px) {
  .rg-hero__stats.rg-hero__stats--rows { grid-template-columns: minmax(0, 1fr); }
  .rg-hero__stats--rows .rg-hero__stat { flex-direction: row; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); }
  .rg-hero__stats--rows .rg-hero__stat + .rg-hero__stat { border-top: 1px solid rgba(255, 255, 255, .14); border-left: 0; }
  .rg-hero__stats--rows .rg-hero__stat strong { flex: 0 0 112px; font-size: 20px; }
}

/* Widoczny podpis nad grupą linków (Rekrutacyjne FAQ 5.11, „Wybierz interesujący Cię temat:”). */
.rg-hero__after { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 11px; margin-top: 6px; }
.rg-hero__links-caption { flex-basis: 100%; margin: 6px 0 -4px; color: rgba(255, 255, 255, .86); font-size: var(--text-small); }
@media (min-width: 1025px) {
  .rg-hero--wide .rg-hero__copy { max-width: 900px; }
  .rg-hero--wide :is(.rg-hero__lead, .rg-hero__text) { max-width: 780px; }
}
