/* =====================================================================
   Blue Ribbon — Plan Naprawczy v2
   Multi-page layout: header/nav, footer, home tiles, content pages,
   cards, pricing, FAQ, schema-driven forms.
   Palette matches the existing site: navy #0F172A, blue #1E3A8A/#2563EB,
   light surface #E2E8F0, white cards, gold accent #B3924F.
   ===================================================================== */

:root {
  --br-ink: #0f172a;
  --br-navy: #1e3a8a;
  --br-blue: #2563eb;
  --br-sky: #38bdf8;
  --br-gold: #b3924f;
  --br-text: #334155;
  --br-muted: #64748b;
  --br-line: #e2e8f0;
  --br-surface: #eef2f7;
  --br-card: #ffffff;
  --br-header-h: 76px;
}

/* ------------------------------------------------------------------ base */
body.theme-site {
  background: var(--br-surface);
  color: var(--br-text);
}

.plan-main {
  min-height: 60vh;
}

/* ===================================================================== *
 * HEADER / NAV
 * ===================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-solid {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
/* Landing hero: transparent bar, no logo until the user scrolls past the hero */
.site-header.is-home-top {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-header.is-home-top .site-brand {
  display: none;
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--br-header-h);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-brand img {
  /* Sized within the fixed 76px header (--br-header-h) — does not grow it */
  height: 72px;
  width: auto;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav > ul {
  display: flex;
  align-items: stretch;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.site-nav .nav-link {
  display: inline-flex;
  align-items: center;
  color: rgba(241, 245, 249, 0.82);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 27px 0;
  white-space: nowrap;
  position: relative;
  background: none;
  transition: color 0.2s ease;
}
.site-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--br-sky);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav li.is-active > .nav-link {
  color: #fff;
}
.site-nav .nav-link:hover::after,
.site-nav li.nav-item:hover > .nav-link::after,
.site-nav li.is-active > .nav-link::after {
  transform: scaleX(1);
}
.site-nav .nav-caret {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border: none;
  border-right: 1.5px solid rgba(241, 245, 249, 0.55);
  border-bottom: 1.5px solid rgba(241, 245, 249, 0.55);
  transform: rotate(45deg);
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.2s ease;
}
.site-nav li.nav-item:hover .nav-caret {
  border-color: #fff;
}
/* Caret flips up while its dropdown is open (mobile override further down) */
.site-nav li.nav-item.sub-open > .nav-caret,
.site-nav li.nav-item:focus-within > .nav-caret {
  border-color: #fff;
  transform: rotate(225deg);
}
.site-subnav {
  list-style: none;
  margin: 0;
  padding: 7px;
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 250px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
/* Opening is driven by JS (`.sub-open`, set on mouseenter), NOT CSS :hover —
   otherwise a stationary cursor over the dropdown keeps it open after a click.
   :focus-within stays for keyboard users; a click blurs the link to release it. */
.site-nav li.nav-item.sub-open > .site-subnav,
.site-nav li.nav-item:focus-within > .site-subnav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-subnav li {
  position: relative;
}
.site-subnav a {
  display: block;
  color: var(--br-ink);
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  width: 100%;
  white-space: nowrap;
}
.site-subnav a:hover,
.site-subnav a:focus,
.site-subnav li.is-active > a {
  background: var(--br-surface);
  color: var(--br-navy);
}
/* Etap I–III step prefix in the staged submenu */
.site-subnav .nav-step {
  display: inline-block;
  min-width: 28px;
  margin-right: 6px;
  color: var(--br-muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.site-subnav a:hover .nav-step,
.site-subnav a:focus .nav-step,
.site-subnav li.is-active > a .nav-step {
  color: var(--br-blue);
}
.site-header-lang {
  display: flex;
  align-items: center;
  margin-left: 28px;
}
/* neutralise the fixed-corner positioning when nested in the header */
.site-header-lang .lang-corner {
  position: static;
  inset: auto;
  flex-direction: row;
  gap: 6px;
  background: none;
  padding: 0;
  box-shadow: none;
}
.site-burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  cursor: pointer;
}
.site-burger span,
.site-burger span::before,
.site-burger span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
  transform: translateX(-50%);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-burger span {
  top: 50%;
  margin-top: -1px;
}
.site-burger span::before {
  top: -7px;
}
.site-burger span::after {
  top: 7px;
}
.site-burger.is-open span {
  background: transparent;
}
.site-burger.is-open span::before {
  transform: translateX(-50%) translateY(7px) rotate(45deg);
}
.site-burger.is-open span::after {
  transform: translateX(-50%) translateY(-7px) rotate(-45deg);
}

@media (max-width: 991.98px) {
  /* backdrop-filter on the header itself would make it the containing block
     for the fixed-position drawer (.site-nav) — the menu would be trapped
     inside the 76px bar. Move the frosted-glass effect to a ::before overlay
     so the drawer can position against the real viewport. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
  }
  .site-header.is-home-top::before {
    content: none;
  }
  .site-burger {
    display: block;
  }
  .site-nav {
    position: fixed;
    top: var(--br-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .site-nav.is-open {
    transform: translateX(0);
  }
  .site-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }
  .site-nav li.nav-item {
    flex-wrap: wrap;
    width: 100%;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .site-nav .nav-link {
    flex: 1;
    font-size: 16px;
    padding: 15px 12px;
  }
  .site-nav .nav-link::after {
    display: none;
  }
  /* Mobile caret: desktop draws the chevron with the button's own borders,
     but inflating that box for a finger-sized tap target scales the glyph
     into a giant arrow. Keep the button 44px and draw a fixed 9px chevron
     on a pseudo-element instead. */
  .site-nav .nav-caret {
    margin: 0;
    padding: 0;
    width: 44px;
    height: 44px;
    border: none;
    transform: none;
    position: relative;
  }
  .site-nav .nav-caret::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 1.5px solid rgba(241, 245, 249, 0.7);
    border-bottom: 1.5px solid rgba(241, 245, 249, 0.7);
    transform: translate(-50%, -65%) rotate(45deg);
    transition: transform 0.25s ease, border-color 0.2s ease;
  }
  /* Desktop flips the button itself — also via :focus-within, which on touch
     sticks after the closing tap (focus stays on the button) and leaves the
     arrow upside-down. Neutralise both; mobile flips only the pseudo below. */
  .site-nav li.nav-item.sub-open > .nav-caret,
  .site-nav li.nav-item:focus-within > .nav-caret {
    transform: none;
  }
  .site-subnav {
    flex-basis: 100%;
    width: 100%;
    position: static;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.04);
    /* Collapsed by max-height (not display:none) so open/close animates;
       420px comfortably covers the longest submenu */
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 4px 0 16px;
    margin: 0;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease,
      padding 0.32s ease, margin 0.32s ease;
  }
  .site-nav li.sub-open > .site-subnav {
    max-height: 420px;
    opacity: 1;
    padding: 4px 4px 8px 16px;
    margin: 0 0 6px;
  }
  .site-subnav a {
    color: rgba(241, 245, 249, 0.85);
  }
  .site-subnav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .site-nav li.sub-open > .nav-caret::before {
    border-color: #fff;
    transform: translate(-50%, -35%) rotate(225deg);
  }
  .site-header-lang {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* ===================================================================== *
 * CONTENT PAGE SHELL
 * ===================================================================== */
.content-page {
  padding-top: 0;
  padding-bottom: 80px;
}
.content-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
  color: #fff;
  padding: calc(var(--br-header-h) + 40px) 0 72px;
  position: relative;
  overflow: hidden;
}
.content-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 70%);
}
.content-hero .container {
  position: relative;
  z-index: 1;
}
.content-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 700;
  color: var(--br-sky);
  margin-bottom: 12px;
}
.content-hero h1 {
  color: #fff;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 16px;
  max-width: 900px;
}
.content-lead {
  font-size: clamp(16px, 2.2vw, 20px);
  color: rgba(241, 245, 249, 0.92);
  max-width: 760px;
  margin: 0;
}
.content-body {
  margin-top: -36px;
  position: relative;
  z-index: 2;
}
.content-card {
  background: var(--br-card);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
  padding: clamp(28px, 4vw, 56px);
}

/* ----------------------------------------------------------- rich prose */
.rich h3 {
  color: var(--br-ink);
  font-size: 22px;
  font-weight: 700;
  margin: 34px 0 12px;
}
.rich h3:first-child {
  margin-top: 0;
}
.rich p {
  color: var(--br-text);
  margin: 0 0 14px;
}
.rich ul,
.rich ol {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.rich ol {
  counter-reset: br-ol;
}
.rich li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 9px;
  color: var(--br-text);
}
.rich ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--br-blue);
}
.rich ol li {
  counter-increment: br-ol;
}
.rich ol li::before {
  content: counter(br-ol);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--br-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rich .rich-note {
  border-left: 4px solid var(--br-gold);
  background: #faf7f0;
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
  color: #4a3f2a;
}
.rich .rich-quote {
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--br-navy);
  border-left: 4px solid var(--br-blue);
  padding-left: 20px;
  margin: 22px 0;
}
/* Readable measure: cards are ~1050px wide at full container width — capping
   prose at ~70 characters per line is the single biggest readability win. */
.rich p,
.rich li {
  max-width: 70ch;
}

/* ------------------------------------------- rich: numbered sections */
/* Long-form pages (≥2 sub-headings) are auto-grouped by <RichContent /> into
   an intro + numbered sections; pure presentation, copy untouched. */
.rich-intro > p:first-child {
  font-size: 16.5px;
  color: var(--br-ink);
}
.rich-section {
  margin-top: 46px;
  scroll-margin-top: calc(var(--br-header-h) + 24px);
}
/* first child only when there is no .rich-intro — kill the dead gap */
.rich > .rich-section:first-child {
  margin-top: 0;
}
.rich-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
}
.rich .rich-section-head h3 {
  margin: 0;
}
.rich-section-num {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--br-gold);
  font-variant-numeric: tabular-nums;
}
/* hairline fading out to the right of each section title */
.rich-section-head::after {
  content: "";
  flex: 1 1 24px;
  min-width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--br-line), rgba(226, 232, 240, 0));
}

/* ------------------------------------------------- rich: verdict rows */
/* "🟢 / 🟡 / 🔴" recommendation paragraphs become tinted status rows. */
.rich .rich-verdict {
  max-width: 70ch;
  border: 1px solid;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 10px;
  font-weight: 500;
}
.rich .rich-verdict.is-green {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.rich .rich-verdict.is-amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.rich .rich-verdict.is-red {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* --------------------------------------------- rich: two-column lists */
/* Lists of ≥4 short items flow into two columns on desktop, halving the
   vertical run of bullet walls. */
/* CSS multicol (not grid): fills top-down then across, so comma-chained
   list items keep their source reading order within each column. */
@media (min-width: 768px) {
  .rich ul.rich-cols {
    columns: 2;
    column-gap: 36px;
  }
  .rich ul.rich-cols li {
    break-inside: avoid;
  }
}

/* ------------------------------------------------------ legal sections */
.legal-section {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--br-line);
  scroll-margin-top: calc(var(--br-header-h) + 24px);
}
.legal-section.is-first {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.legal-section > h3 {
  margin: 0 0 12px;
}

/* --------------------------------------------------- page TOC + layout */
.toc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.page-toc {
  display: none;
}
@media (min-width: 1200px) {
  .toc-layout {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
  }
  .page-toc {
    display: block;
    position: sticky;
    /* .content-body pulls content -36px over the dark hero gradient; the rail
       has no card background, so its content must clear that band (36+8px).
       Sticky top is compensated so the stuck position stays at header+36px. */
    top: calc(var(--br-header-h) - 8px);
    padding-top: 44px;
  }
  .page-toc-title {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    font-weight: 700;
    color: var(--br-blue);
    margin: 0 0 12px;
  }
  .page-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .page-toc li {
    margin: 0;
  }
  .page-toc a {
    display: block;
    padding: 7px 14px;
    border-left: 2px solid var(--br-line);
    /* darker than --br-muted: 4.5:1+ (WCAG AA) on the #eef2f7 page surface */
    color: #5b6678;
    font-size: 13.5px;
    line-height: 1.45;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }
  .page-toc a:hover {
    color: var(--br-navy);
  }
  .page-toc a.is-active {
    color: var(--br-navy);
    font-weight: 600;
    border-left-color: var(--br-gold);
    background: linear-gradient(90deg, rgba(179, 146, 79, 0.08), rgba(179, 146, 79, 0));
  }
}

/* ----------------------------------------------------------- CTA buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.br-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 30px;
  padding: 12px 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--br-navy);
  background: var(--br-navy);
  color: #fff;
  transition: all 0.25s ease;
  text-align: center;
}
.br-btn:hover {
  background: var(--br-blue);
  border-color: var(--br-blue);
  color: #fff;
  transform: translateY(-2px);
}
.br-btn.is-outline {
  background: transparent;
  color: var(--br-navy);
}
.br-btn.is-outline:hover {
  background: var(--br-navy);
  color: #fff;
}
.content-hero .br-btn.is-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.content-hero .br-btn.is-outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ===================================================================== *
 * HOME — services tiles
 * ===================================================================== */
.home-services {
  background: var(--br-surface);
  padding: 90px 0 100px;
}
.home-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 50px;
}
.home-intro .content-eyebrow {
  color: var(--br-blue);
}
.home-intro h2 {
  color: var(--br-ink);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  margin: 0 0 18px;
}
.home-intro p {
  color: var(--br-text);
  font-size: 17px;
  margin: 0 0 8px;
}
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(160deg, #14233f 0%, #1e3a8a 100%);
  color: #fff;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.28), transparent 60%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.3);
  color: #fff;
}
.tile-title {
  position: relative;
  z-index: 1;
  /* Beat the global main.css h1–h6 color (dark navy) — tiles sit on a dark gradient */
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  transition: transform 0.3s ease;
}
.tile-info {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: rgba(241, 245, 249, 0.92);
  font-size: 14.5px;
  line-height: 1.55;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}
.tile:hover .tile-info,
.tile:focus-visible .tile-info {
  max-height: 220px;
  opacity: 1;
}
/* Touch devices have no hover — keep the description permanently visible
   so the tiles aren't bare titles. */
@media (hover: none) {
  .tile-info {
    max-height: none;
    opacity: 1;
  }
}
.tile-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.tile:hover .tile-arrow {
  background: rgba(255, 255, 255, 0.16);
}

/* Photo tiles: the image is the resting state; a bottom scrim keeps the title
   readable, and hovering deepens the scrim so the description stays legible
   over the photo. */
.tile.has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.tile.has-image::before {
  /* Replace the brand radial glow with a dark gradient scrim for legibility. */
  background: linear-gradient(
    180deg,
    rgba(10, 18, 35, 0.12) 0%,
    rgba(10, 18, 35, 0.18) 45%,
    rgba(10, 18, 35, 0.82) 100%
  );
  opacity: 1;
  transition: background 0.35s ease, opacity 0.35s ease;
}
.tile.has-image:hover::before,
.tile.has-image:focus-visible::before {
  background: linear-gradient(
    180deg,
    rgba(10, 18, 35, 0.55) 0%,
    rgba(10, 18, 35, 0.72) 55%,
    rgba(10, 18, 35, 0.9) 100%
  );
}
/* Lift the photo a touch on hover, matching the existing tile motion. */
.tile.has-image .tile-title {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
@media (hover: none) {
  /* No hover on touch — keep a strong scrim so the always-visible text reads. */
  .tile.has-image::before {
    background: linear-gradient(
      180deg,
      rgba(10, 18, 35, 0.35) 0%,
      rgba(10, 18, 35, 0.6) 50%,
      rgba(10, 18, 35, 0.88) 100%
    );
  }
}

/* ===================================================================== *
 * CARD GRIDS — hub cards / packages / format / people
 * ===================================================================== */
.card-grid {
  display: grid;
  gap: 22px;
  margin-top: 8px;
}
.card-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
/* Kontakt: form column + info column. A class (not an inline style) so the
   layout can collapse on small screens. */
.kontakt-grid {
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
@media (max-width: 991.98px) {
  .kontakt-grid {
    grid-template-columns: 1fr;
  }
}
.info-card {
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}
.info-card .card-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: var(--br-blue);
  margin-bottom: 8px;
}
.info-card h3 {
  color: var(--br-ink);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
}
.info-card p {
  color: var(--br-text);
  margin: 0 0 14px;
}
.info-card ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.info-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--br-text);
}
.info-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--br-blue);
  font-weight: 700;
}
.info-card .br-btn {
  margin-top: auto;
}
.info-card.is-featured {
  border-color: var(--br-blue);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.16);
}

/* privacy policy */
.privacy-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.privacy-hero-text h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--br-ink);
}
.privacy-hero-list {
  list-style: none;
  margin: 18px 0 6px;
  padding: 0;
}
.privacy-hero-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  color: var(--br-text);
}
.privacy-hero-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--br-blue);
  font-weight: 700;
}
.privacy-hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
}
.privacy-card-icon {
  margin-right: 8px;
}
#privacy-details {
  scroll-margin-top: calc(var(--br-header-h) + 16px);
}

/* packages / pricing */
.package-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid var(--br-line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
.package-card .pkg-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--br-ink);
  margin: 0 0 6px;
}
.package-card .pkg-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--br-navy);
  margin: 0 0 10px;
}
.package-card .pkg-desc {
  color: var(--br-muted);
  font-size: 14px;
  margin: 0 0 12px;
}
.package-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.package-card li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: var(--br-text);
}
.package-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--br-gold);
  font-weight: 700;
}

/* format / steps simple list card */
.format-card {
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 18px;
  padding: 28px;
}

/* ----------------------------------------------------------- people (about) */
.person-card {
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
.person-card .person-video {
  float: right;
  width: 240px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 0 12px 18px;
  background: var(--br-line);
  border: 1px solid var(--br-line);
}
/* Cards stay 2-up until 576px, so shrink the float on narrower cards. */
@media (max-width: 991.98px) {
  .person-card .person-video {
    width: 160px;
    margin-left: 14px;
  }
}
@media (max-width: 575.98px) {
  .person-card .person-video {
    width: 50%;
    margin-left: 12px;
  }
}
.person-card .person-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--br-ink);
  margin: 0 0 2px;
}
.person-card .person-role {
  font-size: 13px;
  color: var(--br-blue);
  font-weight: 600;
  margin: 0 0 14px;
}
.person-card p {
  color: var(--br-text);
  margin: 0 0 12px;
}
/* "Czytaj dalej" expand: same grid-rows technique as the FAQ accordion.
   No vertical padding on the body — it would leak into the track's
   min-content size and keep the collapsed row open a few px. */
.person-more {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.38s;
}
.person-card.is-open .person-more {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
.person-more-body {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.person-card.is-open .person-more-body {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
@media (prefers-reduced-motion: reduce) {
  .person-more,
  .person-more-body {
    transition: none;
  }
}
.reveal-more {
  border: none;
  background: none;
  color: var(--br-blue);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.reveal-more:hover {
  text-decoration: underline;
}

/* ===================================================================== *
 * TABLE
 * ===================================================================== */
/* Scroll container: tables have a min-content width wider than small phone
   viewports; without this the whole page pans horizontally. Radius + shadow
   live here so the rounded corners aren't cut off mid-scroll. */
.br-table-wrap {
  margin: 18px 0 4px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.br-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14.5px;
  background: var(--br-card);
  border-radius: 12px;
  overflow: hidden;
}
.br-table th {
  background: var(--br-navy);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
}
.br-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--br-line);
  color: var(--br-text);
}
.br-table tr:last-child td {
  border-bottom: none;
}
/* Step / process table (rendered from a {table} rich block) */
.br-table--steps td {
  vertical-align: top;
}
.br-table--steps th:first-child,
.br-table--steps td:first-child {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}
.br-table--steps td:first-child {
  font-weight: 700;
  color: var(--br-blue);
  font-variant-numeric: tabular-nums;
}
.br-table--steps td:nth-child(2) {
  font-weight: 600;
  color: var(--br-ink);
}

/* ===================================================================== *
 * CENNIK
 * ===================================================================== */
.cennik-group {
  margin-bottom: 40px;
}
/* Pricing starts with a flat heading, not a card: 36px cancels the
   .content-body card pull-up, +40px gives normal breathing room below hero */
.content-body .container > .cennik-group:first-child {
  padding-top: 76px;
}
.cennik-group h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--br-blue);
  border-bottom: 2px solid var(--br-line);
  padding-bottom: 10px;
  margin: 0 0 22px;
}
.price-list {
  display: grid;
  gap: 16px;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 24px;
  align-items: start;
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 14px;
  padding: 20px 24px;
}
.price-row .price-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--br-ink);
}
.price-row .price-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--br-navy);
  white-space: nowrap;
  text-align: right;
}
.price-row .price-desc {
  grid-column: 1 / -1;
  color: var(--br-muted);
  font-size: 14px;
  margin: 4px 0 0;
}
.price-row .price-bullets {
  grid-column: 1 / -1;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 18px;
}
.price-row .price-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--br-text);
}
.price-row .price-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--br-blue);
}

/* ===================================================================== *
 * FAQ
 * ===================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--br-ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .faq-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  position: relative;
}
.faq-q .faq-icon::before,
.faq-q .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--br-blue);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.faq-q .faq-icon::before {
  top: 10px;
  left: 0;
  width: 22px;
  height: 2px;
}
.faq-q .faq-icon::after {
  top: 0;
  left: 10px;
  width: 2px;
  height: 22px;
}
.faq-item.is-open .faq-q .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
/* Expand/collapse: grid-template-rows 0fr→1fr animates height without JS
   measuring; visibility delay keeps closed answers out of the tab order */
.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.34s;
}
.faq-item.is-open .faq-a-wrap {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
.faq-a {
  /* No vertical padding: it would leak into the grid track's min-content size
     and hold the collapsed row at 12px. Spacing lives on the <p> margins,
     which the overflow:hidden BFC keeps inside the box. */
  padding: 0 22px;
  color: var(--br-text);
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.is-open .faq-a {
  opacity: 1;
  transform: none;
  transition-delay: 0.06s;
}
.faq-a p {
  margin: 0 0 12px;
}
.faq-a p:first-child {
  margin-top: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .faq-a-wrap,
  .faq-a {
    transition: none;
  }
}

/* ===================================================================== *
 * FORMS (DynamicForm)
 * ===================================================================== */
.br-form {
  max-width: 860px;
}
.br-fieldset {
  border: none;
  margin: 0 0 30px;
  padding: 0;
}
.br-fieldset > legend {
  display: block;
  width: 100%;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--br-blue);
  border-bottom: 2px solid var(--br-line);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.br-fieldset-intro {
  color: var(--br-muted);
  font-size: 14px;
  margin: -8px 0 16px;
}
.br-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}
.br-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.br-field.col-full,
.br-consent.col-full {
  grid-column: 1 / -1;
}
.br-field > label.br-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--br-ink);
}
.br-field .br-prefix {
  font-size: 13px;
  font-style: italic;
  color: var(--br-muted);
}
.br-field input[type="text"],
.br-field input[type="email"],
.br-field input[type="tel"],
.br-field input[type="number"],
.br-field input[type="date"],
.br-field select,
.br-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--br-ink);
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.br-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.br-field input:focus,
.br-field select:focus,
.br-field textarea:focus {
  outline: none;
  border-color: var(--br-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.br-field textarea {
  resize: vertical;
  min-height: 96px;
}
.br-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.br-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--br-text);
  cursor: pointer;
  background: #fff;
  transition: all 0.2s ease;
}
.br-option:hover {
  border-color: var(--br-blue);
}
.br-option input {
  accent-color: var(--br-blue);
  margin: 0;
}
.br-option:has(input:checked) {
  border-color: var(--br-blue);
  background: rgba(37, 99, 235, 0.08);
  color: var(--br-navy);
  font-weight: 600;
}
.br-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--br-text);
  margin-bottom: 10px;
  cursor: pointer;
}
.br-consent input {
  margin-top: 4px;
  accent-color: var(--br-blue);
  flex: 0 0 auto;
}
.br-file label.br-label {
  margin-bottom: 2px;
}
.br-file input[type="file"] {
  width: 100%;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  background: #f8fafc;
  cursor: pointer;
}
.br-help {
  font-size: 12.5px;
  color: var(--br-muted);
}
.br-form-submit {
  margin-top: 8px;
}
.br-feedback {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
}
.br-feedback.is-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.br-feedback.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.br-after {
  margin-top: 34px;
  background: #f7f9fc;
  border: 1px solid var(--br-line);
  border-radius: 16px;
  padding: 24px 28px;
}
.br-after h3 {
  font-size: 18px;
  color: var(--br-ink);
  margin: 0 0 14px;
}

/* ===================================================================== *
 * FOOTER
 * ===================================================================== */
.site-footer {
  background: #0f172a;
  color: rgba(226, 232, 240, 0.78);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr) 1.2fr;
  gap: 36px;
}
.footer-brand img {
  height: 46px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  max-width: 280px;
  margin: 0;
}
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li {
  margin-bottom: 9px;
}
.footer-col a {
  color: rgba(226, 232, 240, 0.78);
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: #fff;
}
.footer-contact a {
  color: rgba(226, 232, 240, 0.88);
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.footer-social a:hover {
  background: var(--br-blue);
  border-color: var(--br-blue);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.footer-bottom a {
  color: rgba(226, 232, 240, 0.78);
}
.footer-bottom a:hover {
  color: #fff;
}

/* ===================================================================== *
 * RESPONSIVE
 * ===================================================================== */
@media (max-width: 991.98px) {
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .privacy-hero {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .tiles-grid,
  .card-grid.cols-2,
  .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .price-row {
    grid-template-columns: 1fr;
  }
  .price-row .price-value {
    text-align: left;
  }
  .price-row .price-bullets {
    grid-template-columns: 1fr;
  }
  .br-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .content-hero {
    /* Header is fixed and 76px tall — padding must clear it or the
       eyebrow/title hide underneath. */
    padding: calc(var(--br-header-h) + 28px) 0 56px;
  }
  .price-row .price-value {
    /* Long price strings ("od X zł / wycena indywidualna…") would force the
       single-column row past the viewport with nowrap. */
    white-space: normal;
  }
}

/* ===================================================================== *
 * STALLION PROFILES (Ogiery Blue Ribbon)
 * ===================================================================== */
/* Flex instead of grid so incomplete rows (e.g. 7 cards) center themselves */
.stallion-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  align-items: stretch;
}
.stallion-grid .stallion-card {
  width: calc((100% - 48px) / 3);
}
.stallion-card {
  background: var(--br-card);
  border: 1px solid var(--br-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}
.stallion-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  overflow: hidden;
}
/* Absolute fill so the image can't push the box past its 4:3 ratio — a global
   legacy `img { height: auto }` would otherwise override height:100% and the
   aspect-ratio yields to the intrinsic image height (giant, uneven photos). */
.stallion-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stallion-type {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 30px;
}
.stallion-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.stallion-body h3 {
  color: var(--br-ink);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.stallion-desc {
  color: var(--br-text);
  font-size: 14px;
  margin: 0 0 16px;
}
/* Clamp the card description so every tile keeps the same height */
.stallion-desc--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.stallion-more {
  margin-top: 18px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 30px;
  border: 1px solid var(--br-blue);
  background: transparent;
  color: var(--br-blue);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.stallion-more span {
  transition: transform 0.2s ease;
}
.stallion-more:hover {
  background: var(--br-blue);
  color: #fff;
}
.stallion-more:hover span {
  transform: translateX(3px);
}
.stallion-spec {
  display: grid;
  grid-template-columns: minmax(118px, auto) 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 13.5px;
}
.stallion-spec dt {
  color: var(--br-muted);
  font-weight: 600;
}
.stallion-spec dd {
  margin: 0;
  color: var(--br-ink);
}
.stallion-block {
  margin-top: 18px;
  border-top: 1px solid var(--br-line);
  padding-top: 14px;
}
.stallion-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--br-blue);
  margin: 0 0 10px;
}
.stallion-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stallion-block li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  margin-bottom: 5px;
  color: var(--br-text);
}
.stallion-block li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--br-gold);
}
.stallion-panel {
  font-size: 12px !important;
  color: var(--br-muted) !important;
}
@media (max-width: 1099.98px) {
  .stallion-grid .stallion-card {
    width: calc((100% - 24px) / 2);
  }
}
@media (max-width: 767.98px) {
  .stallion-grid .stallion-card {
    width: 100%;
  }
}

/* ----------------------------------------------- stallion modal --- */
.sm-overlay {
  position: fixed;
  inset: 0;
  /* Above .back-to-top (12000, main.css) so the arrow can't be clicked
     over an open dialog; below the cookie banner (99999) */
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: sm-fade 0.2s ease;
}
.sm-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--br-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45);
  animation: sm-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.sm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sm-close:hover {
  background: rgba(15, 23, 42, 0.88);
  transform: rotate(90deg);
}
.sm-hero {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  /* Stacked layout: never let the photo push the data below the fold */
  max-height: 38vh;
  background: #0f172a;
}
.sm-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sm-hero-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 24px 18px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0));
}
.sm-hero-cap .stallion-type {
  position: static;
  display: inline-block;
  margin-bottom: 10px;
}
.sm-hero-cap h3 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.sm-body {
  padding: 22px 24px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--br-line) transparent;
}
.sm-body::-webkit-scrollbar {
  width: 8px;
}
.sm-body::-webkit-scrollbar-thumb {
  background: var(--br-line);
  border-radius: 4px;
}
.sm-body .stallion-desc {
  font-size: 15px;
  color: var(--br-text);
}
/* Ruled rows make the spec sheet scannable inside the dialog */
.sm-body .stallion-spec {
  gap: 0 18px;
}
.sm-body .stallion-spec dt,
.sm-body .stallion-spec dd {
  padding: 7px 0;
  border-bottom: 1px solid var(--br-line);
}
.sm-body .stallion-spec dt:last-of-type,
.sm-body .stallion-spec dd:last-of-type {
  border-bottom: none;
}
/* Desktop: photo becomes a full-height side column so the data is
   visible immediately instead of scrolling under a huge hero */
@media (min-width: 920px) {
  .sm-modal {
    flex-direction: row;
    width: min(1020px, 100%);
    height: min(640px, 90vh);
    max-height: none;
  }
  .sm-hero {
    flex: 0 0 42%;
    aspect-ratio: auto;
    max-height: none;
  }
  .sm-hero-cap {
    padding: 64px 26px 22px;
  }
  .sm-hero-cap h3 {
    font-size: 28px;
  }
  .sm-body {
    flex: 1;
    padding: 30px 34px 34px;
  }
  /* Close button sits over the light data column here, not the photo */
  .sm-close {
    background: rgba(15, 23, 42, 0.08);
    color: var(--br-ink);
  }
  .sm-close:hover {
    background: var(--br-ink);
    color: #fff;
  }
}
@keyframes sm-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes sm-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sm-overlay,
  .sm-modal {
    animation: none;
  }
}
@media (max-width: 600px) {
  .sm-overlay {
    padding: 0;
  }
  .sm-modal {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  .sm-hero {
    aspect-ratio: 4 / 3;
    max-height: 34vh;
  }
}

/* ===================================================================== *
 * HOME — hero copy block (tagline, lead, motto)
 * Brand name + subtitle + lead, then the GENETICS line as a static italic
 * quote. The call-to-action buttons live at the bottom of the page
 * (.home-bottom-cta in HomeServices), not in the hero.
 * ===================================================================== */
.home-area .home-name {
  margin-bottom: 18px;
}
.home-area .home-tagline {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.35;
  margin: 0 auto 14px;
  max-width: 30ch;
}
.home-area .home-lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0 auto 30px;
  max-width: 56ch;
}
/* Motto as a quiet italic pull-quote — no animation. */
.home-area .home-motto {
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.3px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto;
  max-width: 46ch;
}

/* Call-to-action buttons pinned low in the hero, above the fold. */
.home-area .home-hero-cta {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  width: max-content;
  max-width: 90vw;
}
/* Solid primary reads clearly over the (dark) background video. */
.home-area .home-cta-primary {
  background: #fff;
  border-color: #fff;
  color: var(--br-navy);
}
.home-area .home-cta-primary:hover {
  background: var(--br-blue);
  border-color: var(--br-blue);
  color: #fff;
}
.home-area .home-cta-secondary.is-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}
.home-area .home-cta-secondary.is-outline:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: #fff;
}

@media (max-width: 767.98px) {
  .home-area .home-tagline {
    font-size: 19px;
  }
  .home-area .home-lead {
    font-size: 15px;
  }
  .home-area .home-motto {
    font-size: 14px;
  }
  .home-area .home-hero-cta {
    bottom: 4vh;
  }
}

@media (min-width: 768px) {
  /* Match the left-shifted hero text (.home-content left: -280px) so the
     CTA buttons stay centred under it. */
  .home-area .home-hero-cta {
    transform: translateX(calc(-50% - 280px));
  }
}
