:root {
  --ink: #101820;
  --ink-soft: #263238;
  --paper: #f6f7f5;
  --white: #ffffff;
  --line: #dfe5e2;
  --red: #ff0000;
  --red-dark: #cc0000;
  --teal: #39a6a3;
  --teal-dark: #14343a;
  --gold: #f2b84b;
  --muted: #66716f;
  --shadow: 0 20px 40px rgba(16, 24, 32, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 14px clamp(18px, 5vw, 72px);
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, #b71c1c 0%, #321212 36%, #0f3460 68%, #00b4d8 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  isolation: isolate;
  transition: transform 220ms ease;
}

.home-page .site-header {
  justify-content: center;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 4px));
}

.site-header::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
  content: "";
  opacity: 0.55;
}

.fire-page .site-header {
  background: linear-gradient(120deg, #160f10 0%, #2c1111 48%, #b71c1c 100%);
}

.medical-page .site-header {
  background: linear-gradient(120deg, #071627 0%, #0f3460 58%, #00b4d8 100%);
}

.site-header::after {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 0;
  left: clamp(18px, 5vw, 72px);
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 46%, #00b4d8 54%, #00b4d8 100%);
  border-radius: 999px 999px 0 0;
  content: "";
  opacity: 0.9;
}

.fire-page .site-header::after {
  background: linear-gradient(90deg, transparent 0%, var(--red) 18%, var(--red) 82%, transparent 100%);
}

.medical-page .site-header::after {
  background: linear-gradient(90deg, transparent 0%, #00b4d8 18%, #00b4d8 82%, transparent 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: 154px;
  height: 56px;
  flex: 0 0 154px;
  object-fit: contain;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.brand span {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.brand strong {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.brand small {
  max-width: min(38vw, 360px);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 42px;
  padding: 9px 14px;
  color: #000000;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  font-weight: 800;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease,
    text-shadow 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
  background-color: #050505;
  border-color: rgba(255, 213, 79, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 18px rgba(255, 61, 0, 0.24);
  outline: none;
  animation: heartbeatButton 900ms ease-in-out infinite;
}

.home-nav a:first-child:hover,
.home-nav a:first-child:focus-visible {
  background: rgba(255, 0, 0, 0.16);
  border-color: rgba(255, 0, 0, 0.4);
}

.home-nav a:nth-child(2):hover,
.home-nav a:nth-child(2):focus-visible {
  background: rgba(0, 180, 216, 0.16);
  border-color: rgba(0, 180, 216, 0.4);
}

@media (min-width: 761px) {
  .main-nav a:first-child {
    margin-right: auto;
    margin-left: auto;
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.nav-toggle svg,
.button svg,
.service-icon svg,
.contact-list svg,
.choice-action svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-page {
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}

.home-nav {
  display: flex;
}

.split-home {
  display: grid;
  height: calc(100svh - 84px);
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-panel {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(28px, 6vw, 76px);
  color: var(--white);
  text-decoration: none;
  background: var(--ink);
}

.choice-panel::before,
.choice-panel::after {
  position: absolute;
  inset: 0;
  content: "";
}

.choice-panel::before {
  background-image: url("assets/exbepo-hero.png");
  background-size: cover;
  transition: transform 240ms ease, opacity 240ms ease;
}

.choice-fire::before {
  background-position: 28% center;
}

.choice-medical::before {
  background-position: 72% center;
}

.choice-panel::after {
  background: linear-gradient(180deg, rgba(16, 24, 32, 0.16), rgba(16, 24, 32, 0.9));
}

.choice-fire {
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.choice-medical::after {
  background: linear-gradient(180deg, rgba(20, 52, 58, 0.1), rgba(10, 16, 20, 0.9));
}

.choice-panel:hover::before,
.choice-panel:focus-visible::before {
  transform: scale(1.035);
  opacity: 0.86;
}

.choice-panel:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: -4px;
}

.choice-content {
  position: relative;
  z-index: 1;
  max-width: 590px;
}

.choice-content h2 {
  font-size: 4rem;
}

.choice-content p:not(.eyebrow) {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.choice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  margin-top: 24px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.hero {
  position: relative;
  min-height: clamp(520px, 72svh, 700px);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.page-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: inherit;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  padding: 58px 0 72px;
}

.page-hero-content p:not(.eyebrow) {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

.medical-hero .hero-image {
  object-position: 68% center;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.28));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: inherit;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  flex-direction: column;
  justify-content: center;
  padding: 58px 0 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3 {
  overflow-wrap: normal;
}

p {
  overflow-wrap: anywhere;
}

.no-wrap {
  white-space: nowrap;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 1120px;
  font-size: clamp(2.9rem, 4.5vw, 3.8rem);
}

h2 {
  max-width: 1120px;
  font-size: clamp(2.15rem, 3.2vw, 2.8rem);
}

h3 {
  font-size: 1.22rem;
}

.hero-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-primary {
  color: var(--white);
  background: var(--red);
  box-shadow: 0 10px 22px rgba(255, 0, 0, 0.22);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--red-dark);
}

.medical-page .button-primary:hover,
.medical-page .button-primary:focus-visible {
  animation: heartbeatButton 900ms ease-in-out infinite;
}

.fire-page .button:hover,
.fire-page .button:focus-visible,
.fire-page .document-button:hover,
.fire-page .document-button:focus-visible {
  animation: heartbeatButton 900ms ease-in-out infinite;
}

.button-primary.is-paid {
  background: var(--teal-dark);
  box-shadow: none;
}

.button-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.36);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.section {
  padding: clamp(64px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.section-light {
  background: var(--paper);
}

.detail-content-section {
  padding-top: clamp(22px, 4vw, 42px);
}

.section-white {
  background: var(--white);
}

.section-dark {
  color: var(--white);
  background: var(--teal-dark);
}

.section-heading {
  width: min(1120px, 100%);
  margin: 0 auto 34px;
}

.section-subheading {
  margin-top: clamp(44px, 6vw, 72px);
}

.page-hero-content h1,
.section-heading h2 {
  white-space: nowrap;
}

.section-heading p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.section-dark .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.service-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.two-column-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.app-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.06);
}

.service-card {
  min-height: 330px;
  padding: 24px;
}

.service-card-visual {
  gap: 18px;
}

.service-visual {
  width: 100%;
  height: 156px;
  padding: 12px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(57, 166, 163, 0.11), rgba(255, 0, 0, 0.08));
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: var(--radius);
}

.service-card p,
.app-card p,
.contact-info p {
  color: var(--muted);
}

.app-version {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.16);
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.app-version strong {
  color: var(--red-dark);
}

.service-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 20px;
  color: var(--white);
  background: var(--teal);
  border-radius: var(--radius);
}

.first-aid-logo {
  background: #ffffff;
  border: 1px solid var(--line);
}

.first-aid-logo svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: none;
}

.first-aid-logo rect {
  fill: #1c7548;
}

.first-aid-logo path {
  fill: #ffffff;
}

.medical-star-logo {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
}

.medical-star-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.service-card:nth-child(2) .service-icon,
.service-card:nth-child(4) .service-icon {
  background: var(--red);
}

.service-card:nth-child(2) .medical-star-logo {
  background: transparent;
}

.service-card:nth-child(3) .service-icon {
  color: var(--ink);
  background: var(--gold);
}

.stats-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-grid-medical {
  width: min(1260px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-grid {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.training-program-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-card {
  min-height: 210px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-card,
.document-card,
.app-card,
.stat {
  position: relative;
  box-shadow: 0 22px 44px rgba(16, 24, 32, 0.13), 0 3px 10px rgba(16, 24, 32, 0.08);
  transform: scale(1);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.service-card:hover,
.service-card:focus-within,
.app-card:hover,
.app-card:focus-within,
.document-card:hover:not(.document-button),
.document-card:focus-within:not(.document-button),
.stat:hover {
  z-index: 1;
  box-shadow: 0 30px 62px rgba(16, 24, 32, 0.18), 0 8px 18px rgba(16, 24, 32, 0.1);
  transform: scale(1.025);
}

#dokumenty .document-card {
  background: var(--white);
}

#dodatkowe-informacje .document-card {
  background: var(--white);
}

.audience-card {
  border-top: 4px solid var(--red);
}

.audience-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.audience-card h3 {
  color: var(--red-dark);
}

.calculation-card {
  border-top: 4px solid var(--red);
}

.calculation-card h3 {
  color: var(--red-dark);
}

.calculation-disclosure {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.calculation-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 94px;
  padding: 24px;
  color: var(--red-dark);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  list-style: none;
}

.calculation-disclosure summary::-webkit-details-marker {
  display: none;
}

.calculation-summary-copy {
  display: grid;
  gap: 8px;
}

.calculation-cta {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.calculation-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.calculation-toggle::before,
.calculation-toggle::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
  transform: translate(-50%, -50%);
}

.calculation-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 160ms ease;
}

.calculation-disclosure[open] .calculation-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.calculation-panel {
  padding: 0 24px 24px;
  border-top: 1px solid var(--line);
}

.calculation-panel p {
  margin: 18px 0 0;
  color: var(--muted);
}

.document-button {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.document-button:hover,
.document-button:focus-visible {
  border-color: rgba(255, 0, 0, 0.54);
  background: var(--white);
  box-shadow: 0 30px 62px rgba(16, 24, 32, 0.18), 0 8px 18px rgba(16, 24, 32, 0.1),
    0 0 34px rgba(255, 0, 0, 0.24);
  outline: none;
  transform: scale(1.025);
  z-index: 1;
}

.document-button:active {
  transform: scale(1.01);
}

.document-card p {
  color: var(--muted);
}

.document-cta {
  margin-top: auto;
  color: var(--red-dark);
  font-weight: 800;
}

.detail-hero {
  min-height: 440px;
}

.detail-layout {
  display: grid;
  width: min(1120px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(24px, 5vw, 52px);
  align-items: start;
}

.detail-layout-wide {
  width: min(1180px, 100%);
  grid-template-columns: 1fr;
  gap: 24px;
}

.detail-main {
  display: grid;
  gap: clamp(22px, 3.2vw, 34px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  counter-reset: detail-section;
}

.detail-layout-wide .detail-main {
  padding-inline: 0;
}

.detail-block + .detail-block {
  padding-top: clamp(26px, 4vw, 42px);
  margin-top: 0;
  border-top: 0;
}

.detail-block h2 {
  color: var(--ink);
  font-size: 1.55rem;
}

.detail-block > h2:first-child {
  max-width: none;
  padding-right: 74px;
  margin-bottom: 20px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.12;
}

.detail-block h2:not(:first-child) {
  padding-top: 26px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--red-dark);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
}

.detail-block h3 {
  max-width: none;
  padding: 18px 20px;
  margin: 22px 0 18px;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.45;
  background: rgba(18, 24, 31, 0.055);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}

.detail-block h4 {
  margin: 18px 0 6px;
  color: var(--red-dark);
  font-size: 1.08rem;
  line-height: 1.25;
}

.detail-block {
  position: relative;
  padding: clamp(26px, 4vw, 42px);
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(145deg, #ffffff 0%, #f7f7f7 58%, #eceff1 100%);
  border: 1px solid rgba(18, 24, 31, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(18, 24, 31, 0.11);
  counter-increment: detail-section;
  isolation: isolate;
  scroll-margin-top: 188px;
}

.detail-block::before {
  position: absolute;
  top: 12px;
  right: 28px;
  z-index: 0;
  color: var(--red);
  font-size: clamp(2.6rem, 5.6vw, 4.8rem);
  font-weight: 900;
  line-height: 1;
  content: counter(detail-section, decimal-leading-zero);
  pointer-events: none;
}

.detail-block[data-section]::before {
  content: attr(data-section);
}

.detail-block > * {
  position: relative;
  z-index: 1;
}

.detail-block p {
  max-width: none;
  margin: 0;
  color: var(--ink);
}

.detail-block p + p {
  margin-top: 16px;
}

.detail-block ol,
.detail-block ul {
  padding-left: 1.35rem;
  margin: 16px 0;
  color: var(--ink);
}

.detail-block li + li {
  margin-top: 8px;
}

.detail-block a {
  color: var(--red-dark);
  font-weight: 800;
}

.detail-lead {
  max-width: none;
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  font-weight: 800;
  line-height: 1.55;
}

.detail-toc {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f6f7f8 100%);
  border: 1px solid rgba(18, 24, 31, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(18, 24, 31, 0.08);
}

.detail-toc h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.detail-toc-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-toc-list a {
  display: flex;
  min-height: 54px;
  align-items: center;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
  background: rgba(18, 24, 31, 0.055);
  border: 1px solid rgba(18, 24, 31, 0.12);
  border-radius: var(--radius);
}

.detail-toc-list a:hover,
.detail-toc-list a:focus-visible {
  color: var(--white);
  background: var(--red);
}

.detail-section-figure {
  display: flex;
  position: relative;
  z-index: 2;
  justify-content: center;
  margin: 0 0 24px;
  padding: clamp(14px, 2.4vw, 22px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(239, 241, 243, 0.72)),
    url("assets/tile-bg-gray.jpg") center / cover;
  border: 1px solid rgba(18, 24, 31, 0.12);
  border-radius: var(--radius);
}

.detail-section-figure img {
  width: min(100%, 520px);
  max-height: 310px;
  object-fit: contain;
  border-radius: 10px;
}

.floating-section-nav {
  position: fixed;
  top: 50%;
  right: 10px;
  z-index: 18;
  display: grid;
  width: 50px;
  gap: 6px;
  padding: 8px;
  visibility: hidden;
  background: rgba(244, 245, 246, 0.96);
  border: 1px solid rgba(18, 24, 31, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(18, 24, 31, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(18px, -50%) scale(0.98);
  transition: width 180ms ease, opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.floating-section-nav.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%) scale(1);
}

.floating-section-nav h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.floating-section-nav a {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  font-size: 0;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(145deg, #ffffff 0%, #e9ecef 100%);
  border: 1px solid rgba(18, 24, 31, 0.14);
  border-radius: 8px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.floating-section-nav a::before {
  font-size: 0.85rem;
  content: attr(data-short);
}

.floating-section-nav:hover,
.floating-section-nav:focus-within {
  width: 178px;
  padding: 12px;
}

.floating-section-nav:hover h2,
.floating-section-nav:focus-within h2 {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0 0 2px;
  overflow: visible;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: normal;
  clip: auto;
}

.floating-section-nav:hover a,
.floating-section-nav:focus-within a {
  display: block;
  width: auto;
  height: auto;
  padding: 8px 9px;
  font-size: 0.82rem;
}

.floating-section-nav:hover a::before,
.floating-section-nav:focus-within a::before {
  content: none;
}

.floating-section-nav a:hover,
.floating-section-nav a:focus-visible,
.floating-section-nav a[aria-current="true"] {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 8px 18px rgba(255, 0, 0, 0.24);
}

.ibp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.ibp-stat-year {
  padding: 18px;
  background: rgba(183, 28, 28, 0.07);
  border: 1px solid rgba(183, 28, 28, 0.12);
  border-radius: var(--radius);
}

.ibp-stat-year h3 {
  padding: 0;
  margin: 0 0 14px;
  color: var(--red-dark);
  font-size: 1.15rem;
  background: transparent;
  border: 0;
}

.ibp-stat-year dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.ibp-stat-year div {
  display: grid;
  gap: 2px;
}

.ibp-stat-year dt {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.ibp-stat-year dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
}

.ibp-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ibp-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--white);
}

.ibp-table th,
.ibp-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.ibp-table th {
  color: var(--ink);
  font-size: 0.9rem;
  text-transform: uppercase;
  background: rgba(18, 24, 31, 0.04);
}

.ibp-table td:not(:first-child),
.ibp-table th:not(:first-child) {
  text-align: right;
  white-space: nowrap;
}

.ibp-table tr:last-child td {
  border-bottom: 0;
}

.ibp-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}

.ibp-link-grid a {
  min-height: 54px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(18, 24, 31, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ibp-link-grid a:hover,
.ibp-link-grid a:focus-visible {
  color: var(--red-dark);
  border-color: rgba(183, 28, 28, 0.34);
  box-shadow: 0 14px 30px rgba(18, 24, 31, 0.12);
}

.detail-list,
.source-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.detail-list li,
.source-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

.detail-list li::before,
.source-list li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 999px;
  content: "";
}

.source-list a {
  color: var(--teal-dark);
  font-weight: 800;
}

.detail-aside {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--teal-dark);
  border-radius: var(--radius);
  color: var(--white);
}

.detail-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.detail-aside .button {
  width: 100%;
}

.detail-wide-cta {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.6vw, 26px) clamp(22px, 3.4vw, 36px);
  background:
    linear-gradient(rgba(16, 24, 32, 0.2), rgba(16, 24, 32, 0.2)),
    linear-gradient(120deg, #160f10 0%, #2c1111 46%, #b71c1c 100%);
  box-shadow: 0 18px 42px rgba(18, 24, 31, 0.18);
  transition: top 220ms ease;
}

.site-header:not(.is-hidden) ~ main .detail-wide-cta {
  top: 84px;
}

.detail-wide-cta h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.detail-wide-cta .button {
  width: auto;
  flex: 0 0 auto;
}

.legal-note {
  padding: 14px 16px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  background: rgba(242, 184, 75, 0.16);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  padding: 24px;
  text-align: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.section-dark .stat {
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.section-dark .stat:hover {
  box-shadow: 0 34px 72px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat strong {
  display: block;
  color: var(--gold);
  font-size: 3.8rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.apps-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.apps-copy,
.app-list,
.contact-info,
.contact-form {
  width: min(100%, 560px);
}

.apps-copy {
  justify-self: end;
}

.apps-copy p {
  color: var(--muted);
}

.apps-copy img {
  width: min(360px, 100%);
  height: auto;
  margin-top: 26px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-list {
  display: grid;
  gap: 16px;
}

.app-card {
  min-height: 176px;
  padding: 22px;
  justify-content: space-between;
  gap: 18px;
}

.app-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  margin-bottom: 10px;
  color: var(--teal-dark);
  background: rgba(57, 166, 163, 0.14);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.app-footer strong {
  color: var(--red-dark);
  font-size: 1rem;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.store-links-systems {
  justify-content: stretch;
}

.store-links .button {
  min-height: 42px;
  padding: 9px 14px;
  white-space: nowrap;
}

.store-button {
  flex: 1 1 190px;
  display: grid;
  min-height: 58px;
  gap: 2px;
  text-align: center;
}

.store-button small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.button.is-disabled,
.button.is-disabled:hover,
.button.is-disabled:focus-visible {
  color: rgba(16, 24, 32, 0.58);
  background: rgba(16, 24, 32, 0.12);
  border-color: rgba(16, 24, 32, 0.12);
  box-shadow: none;
  cursor: not-allowed;
  animation: none;
  transform: none;
}

.store-button.is-disabled small {
  color: rgba(16, 24, 32, 0.48);
}

.section-contact {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  color: var(--white);
  background: var(--ink);
}

.contact-info {
  justify-self: end;
}

.contact-info p,
.contact-list a,
.contact-list li {
  color: rgba(255, 255, 255, 0.76);
}

.contact-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-list svg {
  flex: 0 0 22px;
  color: var(--gold);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  color: var(--ink);
  background: var(--white);
  border-radius: var(--radius);
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(57, 166, 163, 0.2);
}

.form-status {
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  color: var(--red-dark);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.72);
  background: #0a1014;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1020px) {
  .site-header {
    gap: 14px;
    padding-inline: clamp(16px, 3vw, 34px);
  }

  .brand-logo {
    width: 136px;
    height: 50px;
    flex-basis: 136px;
  }

  .main-nav a {
    padding-inline: 10px;
    font-size: 0.94rem;
  }

  h1 {
    font-size: clamp(2.35rem, 4.7vw, 3.25rem);
  }

  h2 {
    font-size: clamp(1.85rem, 3.8vw, 2.4rem);
  }

  .service-grid,
  .stats-grid,
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apps-section,
  .section-contact,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-toc-list,
  .ibp-stat-grid,
  .ibp-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-section-nav {
    display: none;
  }

  .detail-aside {
    position: static;
  }

  .apps-copy,
  .app-list,
  .contact-info,
  .contact-form {
    width: min(100%, 760px);
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 76px;
    overflow: visible;
  }

  .brand-logo {
    width: 126px;
    height: 46px;
    flex-basis: 126px;
  }

  .brand small {
    display: none;
  }

  .nav-toggle {
    display: grid;
    position: relative;
    z-index: 3;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    z-index: 4;
    display: none;
    width: min(280px, calc(100vw - 36px));
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    background:
      linear-gradient(rgba(16, 24, 32, 0.76), rgba(16, 24, 32, 0.76)),
      linear-gradient(120deg, #b71c1c 0%, #321212 36%, #0f3460 68%, #00b4d8 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .fire-page .main-nav {
    background:
      linear-gradient(rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.72)),
      linear-gradient(120deg, #160f10 0%, #2c1111 48%, #b71c1c 100%);
  }

  .medical-page .main-nav {
    background:
      linear-gradient(rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.72)),
      linear-gradient(120deg, #071627 0%, #0f3460 58%, #00b4d8 100%);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    display: flex;
    align-items: center;
  }

  .home-nav {
    display: none;
  }

  .split-home {
    height: calc(100svh - 76px);
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }

  .choice-panel {
    align-items: center;
    min-height: 0;
    padding: clamp(16px, 3.2svh, 24px) 20px;
  }

  .choice-fire {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .choice-content h2 {
    font-size: clamp(1.85rem, 7.4vw, 2.2rem);
    line-height: 1.04;
  }

  .choice-content p:not(.eyebrow) {
    max-width: 42ch;
    margin: 12px 0 0;
    font-size: clamp(0.92rem, 3.7vw, 1rem);
    line-height: 1.42;
  }

  .choice-action {
    min-height: 42px;
    padding: 10px 16px;
    margin-top: clamp(14px, 2.6svh, 20px);
  }

  .hero {
    min-height: 560px;
  }

  .page-hero {
    min-height: 560px;
  }

  .hero-overlay {
    background: rgba(16, 24, 32, 0.72);
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 2rem;
  }

  .stat strong {
    font-size: 3rem;
  }

  .stat span {
    white-space: normal;
  }

  .service-grid,
  .stats-grid,
  .document-grid,
  .two-column-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-content h1,
  .section-heading h2 {
    white-space: normal;
  }

  .detail-main,
  .detail-aside {
    padding: 20px;
  }

  .detail-main {
    padding: 0;
  }

  .detail-block {
    scroll-margin-top: 168px;
  }

  .detail-block > h2:first-child {
    padding-right: 0;
  }

  .detail-block::before {
    display: none;
  }

  .detail-toc-list,
  .ibp-stat-grid,
  .ibp-link-grid {
    grid-template-columns: 1fr;
  }

  .detail-section-figure img {
    max-height: 240px;
  }

  .detail-wide-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header:not(.is-hidden) ~ main .detail-wide-cta {
    top: 76px;
  }

  .detail-wide-cta .button {
    width: 100%;
  }

  .contact-form {
    padding: 22px;
  }

  .service-card,
  .stat {
    min-height: auto;
  }

  .app-footer,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .app-footer .button {
    width: 100%;
  }
}

@media (max-width: 760px) and (max-height: 720px) {
  .choice-panel {
    padding: 14px 18px;
  }

  .choice-content h2 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .choice-content p:not(.eyebrow) {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    font-size: 0.9rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .choice-action {
    min-height: 38px;
    padding: 8px 14px;
    margin-top: 10px;
  }

  .choice-action svg {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Wspólne ustawienia dla sekcji Hero */
.page-hero {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
  color: #ffffff;
}

/* Tło dla Inżynierii Pożarowej - głęboka, techniczna czerwień przechodząca w ciemny grafit */
.fire-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c1111 50%, #b71c1c 100%);
}

/* Tło dla Ratownictwa Medycznego - profesjonalny, głęboki błękit/cyjan medyczny */
.medical-hero {
  background: linear-gradient(135deg, #0a192f 0%, #0f3460 60%, #00b4d8 100%);
}

/* Delikatna siatka geometryczna w tle, która nadaje "inżynierski" i nowoczesny klimat */
.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Bezpieczne pozycjonowanie zawartości */
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  align-items: center;
  text-align: center;
}

.page-hero-content p:not(.eyebrow) {
  margin-right: auto;
  margin-left: auto;
}

.page-hero-content .hero-actions {
  justify-content: center;
}

/* Nowoczesne tła dla wyboru działu na stronie głównej */
.choice-panel {
  isolation: isolate;
}

.choice-fire {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c1111 52%, #b71c1c 100%);
}

.choice-medical {
  background: linear-gradient(135deg, #0a192f 0%, #0f3460 60%, #00b4d8 100%);
}

.choice-panel::before {
  z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.78;
}

.choice-panel::after {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(16, 24, 32, 0.05), rgba(16, 24, 32, 0.64));
}

.choice-medical::after {
  background:
    radial-gradient(circle at 82% 18%, rgba(0, 180, 216, 0.28), transparent 32%),
    linear-gradient(180deg, rgba(10, 25, 47, 0.03), rgba(10, 16, 20, 0.66));
}

.choice-content {
  z-index: 2;
}

.choice-fire .choice-action {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.choice-medical .choice-action {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.choice-panel:hover .choice-action,
.choice-panel:focus-visible .choice-action {
  color: var(--white);
  background: #050505;
  border-color: rgba(255, 213, 79, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 0 18px rgba(255, 61, 0, 0.24);
  animation: heartbeatButton 900ms ease-in-out infinite;
}

.choice-medical:hover .choice-action,
.choice-medical:focus-visible .choice-action {
  border-color: rgba(0, 180, 216, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 0 18px rgba(0, 180, 216, 0.28);
}

@keyframes heartbeatButton {
  0% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.06);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.04);
  }

  70%,
  100% {
    transform: scale(1);
  }
}
