/* =====================================================================
   FORTIS DOM — style.css
   Jeden plik ze wszystkimi stylami strony (kolory, czcionki, układ).
   Kolejność: 1. zmienne (kolory, odstępy)  2. elementy bazowe
              3. nagłówek i stopka  4. sekcje  5. podstrony inwestycji
              6. elementy wspólne (przyciski, tabele, formularz, modal)
              7. wersja na telefon
   ===================================================================== */

/* 1. ZMIENNE — tu zmieniasz kolory i odstępy dla całej strony */
:root {
  --ink: #262626;          /* kolor tekstu */
  --ink-soft: #5a5a5a;     /* tekst pomocniczy */
  --charcoal: #4a4a4a;     /* szary z logo — ciemne sekcje, stopka */
  --charcoal-deep: #363636;
  --wine: #9c333f;         /* bordo z logo — przyciski, linki */
  --wine-dark: #7a2731;
  --paper: #fbfaf8;        /* tło strony */
  --mist: #f1efeb;         /* tło sekcji na zmianę */
  --stone: #dedbd4;        /* linie, obramowania */
  --white: #ffffff;
  --szatonia: #417505;     /* zielony z logo Osiedle Szatonia */
  --wille: #a27e4e;        /* spiż z logo Wille Horacego (grafit #2b2e33, krem #f4f0e8) */
  --ok: #2e7d32;
  --warn: #b26a00;

  --font-display: "EB Garamond", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --container: 1180px;
  --gutter: 20px;
  --radius: 3px;
  --section: clamp(64px, 9vw, 120px);
}

/* 2. ELEMENTY BAZOWE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 1em; }
p.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.prose { max-width: 66ch; }

a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-dark); }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.2em; }
small, .small { font-size: 0.9rem; color: var(--ink-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
/* dwie jasne sekcje pod rząd (bez zmiany tła) — przerwa między nimi o połowę mniejsza */
.section:not([class*="section--"]):has(+ .section:not([class*="section--"])) { padding-bottom: calc(var(--section) / 2); }
.section:not([class*="section--"]) + .section:not([class*="section--"]) { padding-top: calc(var(--section) / 2); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark a { color: #f3d7db; }
.section-head { max-width: 70ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section--dark .section-head p { color: #d9d9d9; }

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

/* notatka robocza — widać ją tylko na wersji roboczej; usuwamy przed startem */
.todo {
  display: inline-block;
  background: #fff3c4;
  color: #6b4e00;
  border: 1px dashed #d9b448;
  border-radius: var(--radius);
  padding: 2px 8px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  vertical-align: middle;
}

/* 3. NAGŁÓWEK */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone);
}
.site-header .container { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--wine); color: var(--ink); }
.nav a.btn {
  margin-left: 12px; padding: 9px 16px; border: 1px solid var(--wine); border-radius: 999px;
  color: var(--wine); background: transparent; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
}
.nav a.btn svg { width: 15px; height: 15px; fill: currentColor; }
.nav a.btn:hover { background: var(--wine); color: var(--white); border-bottom-color: var(--wine); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--stone); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }

/* menu „Inwestycje”: po najechaniu spod nagłówka rozwija się (jak kurtyna) panel z dwiema inwestycjami (Michał 28.10) */
.nav-inwestycje { position: static; }
.nav .nav-trigger { position: relative; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 6px 0; margin: 0; font-family: inherit; font-weight: 500; font-size: 1rem; line-height: 1.6; color: var(--ink); cursor: pointer; }
.nav .nav-trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 320ms cubic-bezier(.2,.7,.2,1); }
.nav .nav-trigger:hover, .nav-inwestycje.is-open .nav-trigger, .nav-inwestycje.is-current .nav-trigger { border-bottom-color: var(--wine); }
.nav-inwestycje.is-open .nav-trigger svg { transform: rotate(180deg); }
.nav-inwestycje.is-open .nav-trigger::after { content: ""; position: absolute; left: -12px; right: -12px; top: 100%; height: 26px; }   /* „most” między napisem a panelem — mysz po drodze nie zamyka panelu */
.inwestycje-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--stone); box-shadow: 0 30px 50px -30px rgba(0,0,0,0.45); padding: 24px 0 30px; visibility: hidden; opacity: 0; clip-path: inset(0 0 100% 0); transition: clip-path 380ms cubic-bezier(.22,.8,.2,1), opacity 200ms ease 80ms, visibility 0s linear 380ms; }
.nav-inwestycje.is-open .inwestycje-panel { visibility: visible; opacity: 1; clip-path: inset(0 0 0 0); transition: clip-path 520ms cubic-bezier(.22,.8,.2,1), opacity 160ms ease, visibility 0s; }
.inwestycje-panel .container { display: block; min-height: 0; gap: 0; }   /* .site-header .container jest flexem — w panelu zwykły blok */
.inwestycje-eyebrow { margin: 0 0 14px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.inwestycje-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.nav a.inwestycja { position: relative; display: block; aspect-ratio: 5 / 2.6; overflow: hidden; padding: 0; border: 0; border-radius: var(--radius); background: var(--charcoal); color: var(--white); font-weight: 400; font-size: inherit; isolation: isolate; opacity: 0; transform: translateY(16px); transition: opacity 380ms ease, transform 420ms cubic-bezier(.2,.7,.2,1), box-shadow 300ms ease; }
.nav a.inwestycja:hover, .nav a.inwestycja:focus-visible { color: var(--white); border: 0; box-shadow: 0 18px 36px -18px rgba(0,0,0,0.55); }
.nav a.inwestycja:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; }
.nav-inwestycje.is-open a.inwestycja { opacity: 1; transform: none; transition-delay: 140ms; }
.nav-inwestycje.is-open a.inwestycja + a.inwestycja { transition-delay: 250ms; }
.inwestycja > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transform: scale(1.1); transition: transform 1400ms cubic-bezier(.2,.7,.2,1); }
.nav-inwestycje.is-open .inwestycja > img { transform: scale(1); }
.nav-inwestycje.is-open .inwestycja:hover > img { transform: scale(1.05); transition-duration: 700ms; }
.inwestycja::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(15,15,15,0.84) 0%, rgba(15,15,15,0.3) 50%, rgba(15,15,15,0.05) 100%); }
.inwestycja::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 1; background: var(--szatonia); }
.inwestycja--wille::after { background: var(--wille); }
.inwestycja-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; gap: 2px; padding: 18px 22px 20px; }
.inwestycja-logo { display: block; width: 192px; height: 48px; object-fit: contain; object-position: left center; margin-bottom: 8px; }
.inwestycja strong { font-family: var(--font-display); font-weight: 500; font-size: 1.45rem; line-height: 1.15; }
.inwestycja-body > span { font-size: 0.92rem; opacity: 0.88; }
.inwestycja-body > .inwestycja-cta { margin-top: 8px; font-size: 0.9rem; font-weight: 600; opacity: 1; display: inline-flex; align-items: center; gap: 6px; }
.inwestycja-cta::after { content: "→"; transition: transform 300ms cubic-bezier(.2,.7,.2,1); }
.inwestycja:hover .inwestycja-cta::after { transform: translateX(5px); }
.inwestycje-dim { position: fixed; inset: 0; z-index: 40; background: rgba(38,38,38,0.28); opacity: 0; pointer-events: none; transition: opacity 320ms ease; }
.inwestycje-dim.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .inwestycje-panel, .nav a.inwestycja, .inwestycja > img, .nav .nav-trigger svg, .inwestycje-dim, .inwestycja-cta::after { transition: none; }
  .inwestycja > img { transform: none; }
}

/* STOPKA */
.site-footer { background: var(--charcoal-deep); color: #d6d6d6; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: #f1f1f1; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--white); margin-bottom: 10px; }
.site-footer p { margin-bottom: 0.6em; }
.footer-logo img { height: 34px; margin-bottom: 18px; }
.footer-bottom { border-top: 1px solid #5a5a5a; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 0.85rem; color: #bdbdbd; }

/* 4. SEKCJE STRONY GŁÓWNEJ */

/* Hero — zdjęcie z drona + film */
.hero {
  position: relative; color: var(--white);
  min-height: min(86vh, 760px);
  display: flex; align-items: flex-end;
  background: var(--charcoal) center / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,20,20,0.78) 0%, rgba(20,20,20,0.55) 45%, rgba(20,20,20,0.15) 100%),
              linear-gradient(0deg, rgba(20,20,20,0.75) 0%, rgba(20,20,20,0) 45%);
}
.hero .container { padding-top: 96px; padding-bottom: 56px; width: 100%; }
.hero h1 { max-width: 19ch; color: var(--white); }
.hero .lead { color: #e8e8e8; max-width: 52ch; font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }

/* kafel z filmem w hero: plakat + duży przycisk odtwarzania + pasek z tytułem */
.video-card { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--charcoal); color: var(--white); cursor: pointer; box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.18); text-align: left; font: inherit; }
.video-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.video-card:hover img, .video-card:focus-visible img { transform: scale(1.03); }
.video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0) 70%); pointer-events: none; }
.video-card-play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: rgba(255,255,255,0.18); border: 2px solid rgba(255,255,255,0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 1; transition: background 200ms, transform 200ms; }
.video-card-play svg { width: 36px; height: 36px; margin-left: 5px; fill: var(--white); }
.video-card:hover .video-card-play, .video-card:focus-visible .video-card-play { background: var(--wine); border-color: var(--wine); transform: scale(1.06); }
.video-card-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 22px; z-index: 1; display: grid; gap: 2px; }
.video-card-bar strong { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.video-card-bar strong em { font-family: var(--font-body); font-style: normal; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border: 1px solid rgba(255,255,255,0.7); border-radius: 999px; letter-spacing: 0.02em; }
.video-card-bar > span { font-size: 0.92rem; color: #e6e6e6; }
.video-card:focus-visible { outline: 3px solid var(--white); outline-offset: 4px; }

/* przycisk odtwarzania filmu */
.play {
  display: inline-flex; align-items: center; gap: 12px;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 6px 0;
  text-decoration: none;
}
.play .play-icon {
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid currentColor;
  display: inline-grid; place-items: center; transition: background 200ms, color 200ms;
}
.play .play-icon svg { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }
.play:hover .play-icon { background: var(--white); color: var(--charcoal); }
.play span.label { font-weight: 500; }
.play span.label small { display: block; font-weight: 400; color: inherit; opacity: 0.8; }

/* kafel z filmem (plakat + odtwarzanie) */
.video-tile { position: relative; display: block; border: 0; padding: 0; background: var(--charcoal); cursor: pointer; width: 100%; border-radius: var(--radius); overflow: hidden; color: var(--white); }
.video-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 400ms ease; }
.video-tile:hover img { transform: scale(1.02); }
.video-tile .play { position: absolute; left: 24px; bottom: 20px; }
.video-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.6), rgba(0,0,0,0) 55%); pointer-events: none; }
.video-tile .play { z-index: 1; }

/* W sprzedaży — dwa panele inwestycji */
.estates { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.estate { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--stone); }
.estate-media { position: relative; }
.estate-media img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.estate-body .estate-logo { display: block; width: 210px; height: auto; max-width: 100%; object-fit: contain; object-position: left center; margin-bottom: 4px; }   /* oba loga w tej samej wysokości */
.estate-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.estate-body h3 { margin: 0; }
.estate-body .addr { color: var(--ink-soft); margin: 0; }
.estate--szatonia { border-top: 4px solid var(--szatonia); }
.estate--wille { border-top: 4px solid var(--wille); }
.facts { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.facts th, .facts td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--stone); vertical-align: top; }
.facts th { font-weight: 500; color: var(--ink-soft); width: 46%; padding-right: 12px; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.estate-body .btn { align-self: flex-start; margin-top: auto; }

.estate-row { margin-top: 32px; padding: 24px 28px; background: var(--white); border: 1px solid var(--stone); border-left: 4px solid var(--szatonia); display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 24px; align-items: center; }
.estate-row h3 { margin: 0 0 4px; font-size: 1.4rem; }
.estate-row .price { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.estate-row .price small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }

/* Zbudowane */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.split--photo { grid-template-columns: 0.9fr 1.1fr; }
.photo-big { margin: 0; }
.photo-big a { display: block; border-radius: var(--radius); overflow: hidden; }
.photo-big img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 500ms ease; }
.photo-big a:hover img { transform: scale(1.02); }
.gallery--hidden, [hidden] { display: none !important; }

/* etapy osiedla na zdjęciu z drona: zacienione obrysy + podpisy na „patyczkach” + legenda */
.etapy-foto { position: relative; border-radius: var(--radius); overflow: visible; }
.etapy-foto img { width: 100%; display: block; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; }
.etapy-foto svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.etap-poly { fill-opacity: 0.3; stroke: rgba(255,255,255,0.95); stroke-width: 4; stroke-linejoin: round; cursor: default; transition: fill-opacity 180ms; }
.etap-poly:hover, .etap-poly.is-active { fill-opacity: 0.55; }
.etapy.has-active .etap-poly:not(.is-active) { fill-opacity: 0.12; }
.etap-leader { fill: none; stroke: rgba(255,255,255,0.95); stroke-width: 3; }
.etap-dot { fill: #fff; stroke: rgba(0,0,0,0.35); stroke-width: 2; }
.etapy-pills { position: absolute; inset: 0; pointer-events: none; }
.etap-pill { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 7px; border: 1px solid var(--stone); border-radius: 999px; background: rgba(255,255,255,0.96); color: var(--ink); font: 600 12px/1.2 var(--font-body); letter-spacing: 0.01em; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,0.22); cursor: default; transition: transform 160ms, box-shadow 160ms; }
.etap-pill i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.etap-pill:hover, .etap-pill.is-active { transform: translate(-50%, -100%) scale(1.06); box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.etapy-legenda { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 10px; }
.etapy-legenda li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--stone); border-radius: 999px; background: var(--white); font-size: 0.86rem; cursor: default; transition: background 150ms, border-color 150ms; }
.etapy-legenda li i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.etapy-legenda li strong { font-weight: 600; }
.etapy-legenda li span { color: var(--ink-soft); }
.etapy-legenda li:hover, .etapy-legenda li.is-active { background: var(--mist); border-color: var(--ink-soft); }   /* ukryta lista zdjęć do galerii (otwierana przyciskiem) */
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.photo-pair img { aspect-ratio: 1; }
.photo-pair figcaption, figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }

/* Lista faktów (Dlaczego FORTIS DOM / Bezpieczeństwo) */
.reasons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; border-top: 1px solid var(--stone); }
.reasons li { padding: 24px 0; border-bottom: 1px solid var(--stone); }
.reasons h3 { font-size: 1.35rem; margin-bottom: 6px; }
.reasons p { margin: 0; color: var(--ink-soft); }
.section--dark .reasons { border-color: #6a6a6a; }
.section--dark .reasons li { border-color: #6a6a6a; }
.section--dark .reasons p { color: #d9d9d9; }

/* Zespół */
.team { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.team img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); background: var(--stone); }
.team h3 { margin: 16px 0 4px; font-size: 1.35rem; }
.team p { margin: 0; color: var(--ink-soft); }
.team .rola { font-weight: 600; color: var(--ink); margin-bottom: 2px; }   /* funkcja w osobnej linii, pogrubiona (Ola 28.10) */
.team a { font-weight: 600; text-decoration: none; }
.team-strip { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.team-strip li { margin: 0; }
.team-strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.team-strip figcaption { font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }
.reasons--4 { grid-template-columns: repeat(2, 1fr); }

/* Historia (film 2) */
.history { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.history h2 { font-size: clamp(1.9rem, 3vw, 2.4rem); }   /* „Rodzinna firma z Aleksandrowa” w jednej linii (Michał 29.10) */
@media (min-width: 1180px) { .history h2 { white-space: nowrap; } }

/* Kontakt */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--stone); display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.contact-list li span:first-child { color: var(--ink-soft); }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* 5. PODSTRONY INWESTYCJI */
.estate-hero { position: relative; color: var(--white); min-height: min(70vh, 640px); display: flex; align-items: stretch; background: var(--charcoal) center / cover no-repeat; isolation: isolate; }
.estate-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(15,15,15,0.82) 0%, rgba(15,15,15,0.25) 50%, rgba(15,15,15,0.05) 100%); }
.estate-hero .container { display: flex; flex-direction: column; align-items: flex-start; padding-top: 36px; padding-bottom: 40px; width: 100%; }   /* logo u góry, tytuł i przyciski u dołu (Michał 28.10) */
/* logo inwestycji: plakietka o stałym rozmiarze (ta sama na każdej podstronie), półprzezroczysta, z rozmyciem tła */
.estate-hero .estate-logo { width: 320px; height: 100px; object-fit: contain; object-position: center; margin: 0 0 auto; background: rgba(251,250,248,0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 14px 22px; border: 1px solid rgba(255,255,255,0.45); border-radius: 2px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
/* nagłówek i lead mają stałą wysokość (3 linie) wyrównaną do dołu — dzięki temu logo i teksty są w tym samym miejscu na obu podstronach */
.estate-hero h1 { color: var(--white); max-width: 24ch; min-height: 2.24em; }   /* tytuł w dwóch liniach (24ch: dłuższa połowa „Wille Horacego w zabudowie” mieści się w jednej) */
.estate-hero h1 .nw { white-space: nowrap; }   /* połowa tytułu nie łamie się w środku — łamanie tylko między połowami */
.estate-hero .lead { color: #e6e6e6; min-height: 4.5em; display: flex; align-items: flex-end; max-width: 56ch; }
.keyfacts { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--stone); background: var(--white); }
.keyfacts div { padding: 18px 16px; border-right: 1px solid var(--stone); }
.keyfacts div:last-child { border-right: 0; }
.keyfacts dt { color: var(--ink-soft); font-size: 0.9rem; }
.keyfacts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.15; white-space: nowrap; }   /* „od 179 m² do 451 m²” w jednej linii (Michał 29.10) */
.keyfacts dd small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.page-szatonia .accent, .page-szatonia .estate-row { border-color: var(--szatonia); }
.page-wille .accent, .page-wille .estate-row { border-color: var(--wille); }
.page-wille .estate-hero .estate-logo { background: rgba(244,240,232,0.5); }   /* krem z identyfikacji Willi Horacego */
.page-wille .estate-hero::before { background: linear-gradient(0deg, rgba(43,46,51,0.88) 0%, rgba(43,46,51,0.3) 50%, rgba(43,46,51,0.05) 100%); }

/* galeria wizualizacji */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 240px; gap: 12px; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--stone); }
.gallery a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery-note { margin-top: 12px; font-size: 0.85rem; color: var(--ink-soft); }

/* nawigator lokali: obrazek z góry + tabela */
.navigator { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.navigator-map { position: relative; border: 1px solid var(--stone); background: var(--white); }
.navigator-map img { width: 100%; }
.navigator-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.navigator-map polygon { fill: rgba(156,51,63,0); stroke: rgba(255,255,255,0.0); cursor: pointer; transition: fill 150ms; }
.navigator-map polygon:hover, .navigator-map polygon.is-active { fill: rgba(156,51,63,0.45); stroke: #fff; stroke-width: 2; }
.lokale { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--white); }
.lokale th, .lokale td { padding: 10px 10px; border-bottom: 1px solid var(--stone); text-align: left; white-space: nowrap; }
.lokale th { font-weight: 600; background: var(--mist); font-size: 0.85rem; }
.lokale tr:hover td { background: #faf3f4; }
.lokale td.num { font-weight: 600; }
.status { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.01em; }
.status--wolny { background: #e3f1e4; color: var(--ok); }
.status--rezerwacja { background: #fff1d6; color: var(--warn); }
.status--sprzedany { background: #ececec; color: #666; }
.status--wkrotce { background: #e8ecf5; color: #3a4f7a; }
.table-wrap { overflow-x: auto; }
/* tabela domów obok obrazka: nie wyższa niż obrazek, przewija się w środku (wysokość ustawia main.js) */
.table-wrap.is-scroll { overflow-y: auto; scrollbar-width: thin; border: 1px solid var(--stone); background: var(--white); }
.table-wrap.is-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--white); box-shadow: inset 0 -1px 0 var(--stone); }
.table-wrap.is-scroll tbody tr:last-child td { border-bottom: 0; }
.table-wrap.is-scroll::-webkit-scrollbar { width: 8px; }
.table-wrap.is-scroll::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 4px; }
.price-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }

/* rozkład pomieszczeń */
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.rooms table { width: 100%; border-collapse: collapse; }
.rooms th, .rooms td { padding: 8px 0; border-bottom: 1px solid var(--stone); text-align: left; }
.rooms td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.rooms caption { text-align: left; font-family: var(--font-display); font-size: 1.3rem; padding-bottom: 8px; }
.rooms tfoot td { font-weight: 600; border-bottom: 0; }

/* standard */
/* standard: siatka 2 kolumn, kategorie płyną kolumnami (jak dawniej), ale każdy wiersz siatki ma jedną wysokość,
   więc poziome linie między kategoriami są równo w obu kolumnach (Michał 28.10); liczba wierszy = --rzedy na divie */
.standard { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rzedy, 5), auto); grid-auto-flow: column; column-gap: 48px; }
.standard dl { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--stone); }
.standard dt { font-weight: 600; }
.standard dd { margin: 2px 0 0; color: var(--ink-soft); }
.standard dd ul { margin: 0; padding-left: 18px; }   /* standard wypunktowany: jedna rzecz = jedna linia (Ola 28.10) */
.standard dd li { margin: 2px 0; }

/* lokalizacja w liczbach */
.distances { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 32px; }
.distances li { padding: 14px 0; border-bottom: 1px solid var(--stone); display: flex; justify-content: space-between; gap: 16px; }
.distances li strong { white-space: nowrap; }

/* mapa okolicy (Leaflet + OpenStreetMap; dane w dane/okolica.js) */
.okolica { --ok-akcent: var(--szatonia); --ok-glow: rgba(65,117,5,0.18); --ok-bg: #eef3e7; --ok-chip: #b9cf9c;   /* kolor pinezek = kolor inwestycji */
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: 32px; align-items: start; }
.okolica-map { position: sticky; top: 84px; height: min(640px, calc(100vh - 110px)); min-height: 420px; border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden; background: var(--mist); }   /* mapa „jedzie” razem z przewijaną listą */
.okolica-canvas { position: absolute; inset: 0; z-index: 0; font-family: var(--font-body); }
.okolica-canvas .leaflet-tile-pane { filter: grayscale(0.6) saturate(0.7) brightness(1.04) contrast(0.95); }   /* mapa „wyciszona”, pinezki na pierwszym planie */
.okolica-canvas .leaflet-control-zoom { border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,0,0,0.08); overflow: hidden; }
.okolica-canvas .leaflet-control-zoom a { width: 34px; height: 34px; line-height: 34px; color: var(--ink); background: var(--white); border-color: var(--stone); font-weight: 400; }
.okolica-canvas .leaflet-control-zoom a:hover { background: var(--mist); color: var(--wine); }
.okolica-canvas .leaflet-control-attribution { font-family: var(--font-body); font-size: 10px; color: var(--ink-soft); background: rgba(255,255,255,0.8); }
.okolica-canvas .leaflet-control-attribution a { color: var(--ink-soft); }
.okolica-canvas .leaflet-interactive:focus { outline: none; }
.okolica-hint { position: absolute; left: 12px; bottom: 12px; z-index: 500; padding: 6px 10px; font-size: 0.78rem; color: var(--ink-soft); background: rgba(255,255,255,0.9); border: 1px solid var(--stone); border-radius: var(--radius); pointer-events: none; transition: opacity 200ms; }
.okolica-map.is-armed .okolica-hint { opacity: 0; }
.okolica-canvas .leaflet-marker-icon.poi { cursor: default; }
.okolica-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--ink-soft); }

.page-wille .okolica { --ok-akcent: var(--wille); --ok-glow: rgba(162,126,78,0.22); --ok-bg: #f4eee5; --ok-chip: #d9c7a8; }

/* pierścienie 500 m / 1 km */
.okolica-ring { stroke: #9a948a; stroke-width: 1.2; stroke-dasharray: 4 7; fill: var(--ok-akcent); fill-opacity: 0.025; }
.okolica-ring-label { font-size: 11px; color: var(--ink-soft); background: rgba(251,250,248,0.9); padding: 1px 6px; border-radius: 999px; white-space: nowrap; width: auto !important; transform: translate(-50%, -50%); display: inline-block; }

/* pinezki */
.poi { background: none; border: 0; }
.poi-dot { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--white); border: 2px solid var(--ok-akcent); color: var(--ok-akcent); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,0.18); transition: transform 160ms, background 160ms, color 160ms, box-shadow 160ms; cursor: default; }
.poi-dot svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.poi-label { position: absolute; left: 50%; bottom: 42px; transform: translateX(-50%); text-align: center; white-space: nowrap; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 5px 10px; font-size: 13px; line-height: 1.25; color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,0.1); opacity: 0; pointer-events: none; transition: opacity 160ms; }
.poi-label strong { display: block; font-weight: 600; }
.poi-label span { color: var(--ok-akcent); font-weight: 600; }
.poi:hover .poi-dot, .poi.is-active .poi-dot, .poi:focus-visible .poi-dot { background: var(--ok-akcent); color: var(--white); transform: scale(1.12); box-shadow: 0 0 0 6px var(--ok-glow), 0 4px 14px rgba(0,0,0,0.2); }
.poi:hover .poi-label, .poi.is-active .poi-label, .poi:focus-visible .poi-label { opacity: 1; }
.poi--home .poi-dot { width: 46px; height: 46px; background: var(--wine); border-color: var(--white); color: var(--white); box-shadow: 0 0 0 6px rgba(156,51,63,0.2), 0 5px 16px rgba(0,0,0,0.25); cursor: default; }
.poi--home .poi-dot svg { width: 22px; height: 22px; }
.poi--home .poi-label { opacity: 1; bottom: 54px; font-family: var(--font-display); font-size: 15px; }
.poi--home .poi-label strong { font-weight: 500; }
.poi--home .poi-label span { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.poi--home:hover .poi-dot { transform: none; }
.okolica-map.has-active .poi--home .poi-label { opacity: 0; }   /* gdy podświetlony jest jakiś punkt, podpis osiedla znika, żeby nie nachodził */
.poi--office .poi-dot { border-color: var(--wine); color: var(--wine); }
.poi--office:hover .poi-dot, .poi--office.is-active .poi-dot { background: var(--wine); color: var(--white); box-shadow: 0 0 0 6px rgba(156,51,63,0.18), 0 4px 14px rgba(0,0,0,0.2); }
.poi--office .poi-label span { color: var(--wine); }
.okolica-map.has-active .poi:not(.is-active):not(.poi--home) .poi-dot { opacity: 0.55; }
.okolica-map.is-far .poi:not(.poi--home) .poi-dot { width: 28px; height: 28px; left: 3px; top: 3px; }   /* przy oddaleniu mniejsze pinezki, mniej nachodzą na siebie */
.okolica-map.is-far .poi:not(.poi--home) .poi-dot svg { width: 14px; height: 14px; }
.okolica-map.is-far .poi:not(.poi--home) .poi-label { bottom: 38px; }

/* lista obok mapy */
.okolica-side { display: flex; flex-direction: column; min-width: 0; }
.okolica-list { list-style: none; padding: 0; margin: 0; }
/* lista nie wyższa niż mapa obok: przewija się w środku (wysokość ustawia main.js, sekcja 8b) */
.okolica-list.is-scroll { overflow-y: auto; scrollbar-width: thin; border: 1px solid var(--stone); border-radius: var(--radius); background: var(--white); }
.okolica-list.is-scroll .okolica-group { margin-bottom: 0; }
.okolica-list.is-scroll .okolica-group h3 { position: sticky; top: 0; z-index: 1; background: var(--white); padding-top: 10px; padding-bottom: 4px; margin: 0; box-shadow: inset 0 -1px 0 var(--stone); }
.okolica-list.is-scroll .okolica-group:last-child .okolica-item:last-child { border-bottom: 0; }
.okolica-list.is-scroll::-webkit-scrollbar { width: 8px; }
.okolica-list.is-scroll::-webkit-scrollbar-thumb { background: var(--stone); border-radius: 4px; }
.okolica-group { margin-bottom: 12px; }
.okolica-group h3 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 2px; padding: 0 10px; }
.okolica-group ul { list-style: none; padding: 0; margin: 0; }
.okolica-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; column-gap: 14px; row-gap: 1px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--stone); cursor: default; border-radius: var(--radius); transition: background 150ms; outline: none; }
.okolica-item .okolica-name { grid-column: 1; grid-row: 1; font-weight: 600; line-height: 1.3; }
.okolica-item .okolica-meta { grid-column: 1; grid-row: 2; font-size: 0.84rem; color: var(--ink-soft); line-height: 1.35; }
.okolica-item .okolica-meta:empty { display: none; }
.okolica-item strong { grid-column: 2; grid-row: 1 / span 3; white-space: nowrap; color: var(--ok-akcent); font-weight: 600; font-size: 1.02rem; }
.okolica-tags { grid-column: 1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.okolica-tags i { font-style: normal; font-size: 0.74rem; line-height: 1.2; padding: 3px 8px; border: 1px solid var(--stone); border-radius: 999px; background: var(--white); color: var(--ink); white-space: nowrap; }
.okolica-item.is-active .okolica-tags i, .okolica-item:hover .okolica-tags i { border-color: var(--ok-chip); }
.okolica-item--office strong { color: var(--wine); }
.okolica-item.is-active, .okolica-item:hover, .okolica-item:focus-visible { background: var(--ok-bg); }
.okolica-item--office.is-active, .okolica-item--office:hover { background: #f7ecee; }
.okolica-note { margin: 14px 10px 12px; font-size: 0.82rem; color: var(--ink-soft); }
.okolica-gmaps { align-self: flex-start; margin: 0 10px; }

/* 5b. SPACER 3D (Marzipano) */
.spacer-box { position: relative; aspect-ratio: 16 / 9; background: #1c1c1c; border-radius: var(--radius); overflow: hidden; }
.spacer-canvas { position: absolute; inset: 0; }
.spacer-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: #000; cursor: pointer; display: block; font: inherit; color: var(--white); }
.spacer-poster img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.92; transition: opacity 200ms, transform 600ms; }
.spacer-poster:hover img { opacity: 1; transform: scale(1.02); }
.spacer-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px 12px 14px; background: var(--szatonia); color: var(--white); border-radius: 999px; font-weight: 600; font-size: 1.05rem; box-shadow: 0 12px 34px rgba(0,0,0,0.4); white-space: nowrap; }
.spacer-start svg { width: 38px; height: 38px; }
.spacer-poster:hover .spacer-start { filter: brightness(1.08); }
.spacer-poster-note { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 0.9rem; color: rgba(255,255,255,0.9); text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.spacer-ui { position: absolute; inset: 0; pointer-events: none; }
.spacer-ui > * { pointer-events: auto; }
.spacer-title { position: absolute; left: 14px; top: 14px; padding: 8px 12px; background: rgba(0,0,0,0.55); color: var(--white); border-radius: var(--radius); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; line-height: 1.25; max-width: 60%; }
.spacer-title strong { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.spacer-title span { font-size: 0.8rem; opacity: 0.8; }
.spacer-title span:empty { display: none; }
.spacer-fs { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: var(--radius); background: rgba(0,0,0,0.55); color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.spacer-fs svg { width: 20px; height: 20px; }
.spacer-fs:hover { background: rgba(0,0,0,0.75); }
.spacer-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,0.55); color: var(--white); font-size: 0.85rem; white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; transition: opacity 400ms; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.spacer.is-touched .spacer-hint { opacity: 0; }
.spacer-hs { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.spacer-hs-dot { display: flex; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.94); color: var(--szatonia); align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 6px rgba(255,255,255,0.22); transition: transform 150ms; }
.spacer-hs:hover .spacer-hs-dot { transform: scale(1.1); }
.spacer-hs-dot svg { width: 22px; height: 22px; }
.spacer-hs-label { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.6); color: var(--white); font-size: 0.8rem; }
.spacer-rooms { list-style: none; padding: 0 0 6px; margin: 14px 0 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.spacer-rooms li { flex: 1 1 0; min-width: 104px; }
.spacer-rooms button { display: block; width: 100%; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; background: none; padding: 0; cursor: pointer; color: #e6e6e6; font: inherit; text-align: left; transition: border-color 150ms; }
.spacer-rooms img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.spacer-rooms span { display: block; font-size: 0.8rem; line-height: 1.2; padding: 6px 4px 3px; }
.spacer-rooms button:hover img { opacity: 0.85; }
.spacer-rooms button.is-active { border-color: var(--szatonia); color: var(--white); }
.spacer-plik { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 40px)); padding: 18px 22px; background: rgba(0,0,0,0.78); color: var(--white); border-radius: var(--radius); text-align: left; line-height: 1.45; font-size: 0.95rem; }
.spacer-plik strong { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.spacer-plik em { font-style: normal; font-weight: 600; }
.spacer-poster:disabled { cursor: default; }
.spacer-poster:disabled .spacer-start, .spacer-poster:disabled .spacer-poster-note { display: none; }
.spacer-box.is-fs { position: fixed; inset: 0; z-index: 10000; aspect-ratio: auto; border-radius: 0; }
body.spacer-fs-open { overflow: hidden; }
/* Wille Horacego: spacer w kolorze spiżu z identyfikacji (1.11.2026); 11 miniatur mieści się w jednym rzędzie */
.page-wille .spacer-start { background: var(--wille); }
.page-wille .spacer-hs-dot { color: var(--wille); }
.page-wille .spacer-rooms button.is-active { border-color: var(--wille); }
.page-wille .spacer-rooms li { min-width: 92px; }

/* 5c. O FIRMIE: rząd zdjęć, kroki zakupu, wiersze grupujące w tabeli */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photo-row figure { margin: 0; min-width: 0; }
.photo-row img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--stone); }
.steps { list-style: none; counter-reset: krok; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 0 56px; border-top: 1px solid var(--stone); }   /* 1–3 w lewej kolumnie, 4–6 w prawej (Ola 29.10) */
.steps li { counter-increment: krok; display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--stone); }
.steps li::before { content: counter(krok); grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--wine); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 1.05rem; margin-top: 2px; }
.steps h3 { grid-column: 2; font-size: 1.3rem; margin: 6px 0 4px; }
.steps p { grid-column: 2; margin: 0; color: var(--ink-soft); }
.lokale tr.grupa td { padding-top: 18px; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); background: none; border-bottom: 1px solid var(--stone); }

/* 5d. Z PLACU BUDOWY — wpisy z datą i zdjęciami (treść: dane/budowa.js, zdjęcia: assets/img/budowa/<inwestycja>/)
   Sekcja jest ciemna; wpisy od najnowszego. Kropka i plakietka „Najnowszy wpis” mają kolor inwestycji. */
.budowa { --budowa-akcent: var(--szatonia); }
.page-wille .budowa { --budowa-akcent: var(--wille); }
.budowa-lista { list-style: none; padding: 0; margin: 0; border-top: 1px solid rgba(255,255,255,0.16); }
.budowa-wpis { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px 48px; padding: 40px 0; border-bottom: 1px solid rgba(255,255,255,0.16); }
.budowa-meta { position: relative; padding-left: 28px; }
.budowa-meta::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--budowa-akcent); box-shadow: 0 0 0 4px rgba(255,255,255,0.14); }
.budowa-meta time { display: block; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; color: var(--white); }
.budowa-tag { display: inline-block; margin-top: 10px; padding: 3px 10px; border: 1px solid var(--budowa-akcent); border-radius: 999px; color: var(--white); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.budowa-tresc h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); margin: 0 0 6px; }
.budowa-tresc p { color: #d9d9d9; max-width: 70ch; margin: 0; }
.budowa-foty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.budowa-foty a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: #2b2b2b; aspect-ratio: 16 / 9; box-shadow: 0 0 0 1px rgba(255,255,255,0.1); }
.budowa-foty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.budowa-foty a:hover img { transform: scale(1.03); }
.budowa-foty--1 { grid-template-columns: minmax(0, 860px); }
.budowa-foty--2 { grid-template-columns: 1fr 1fr; }
.budowa-foty--3 { grid-template-columns: 2fr 1fr; }
.budowa-foty--3 a:first-child { grid-row: span 2; aspect-ratio: auto; }   /* pierwsze zdjęcie duże, dwa mniejsze obok */
.budowa-foty--4 { grid-template-columns: 1fr 1fr; }
.budowa-foty--5 { grid-template-columns: 2fr 1fr 1fr; }
.budowa-foty--5 a:first-child { grid-row: span 2; aspect-ratio: auto; }   /* pierwsze duże, cztery mniejsze w dwóch rzędach */
.budowa-pusto { color: #d9d9d9; }

/* 6. ELEMENTY WSPÓLNE */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  min-height: 44px; transition: background 180ms, color 180ms, border-color 180ms;
}
.btn--primary { background: var(--wine); color: var(--white); }
.btn--primary:hover { background: var(--wine-dark); color: var(--white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.75); }
.btn--ghost-light:hover { background: var(--white); color: var(--ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }   /* np. „Prospekt informacyjny (PDF)” zanim będzie plik */
.btn--primary[disabled]:hover { background: var(--wine); }
.btn--link { background: none; color: var(--wine); padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 4px; }

/* formularz */
.form { display: grid; gap: 16px; background: var(--white); border: 1px solid var(--stone); padding: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label .opcja { font-weight: 400; color: var(--ink-soft); }   /* dopisek „(opcjonalnie)” przy telefonie, od 5.11.2026 */
.field input, .field select, .field textarea { font: inherit; padding: 11px 12px; border: 1px solid #b9b5ad; border-radius: var(--radius); background: var(--white); color: var(--ink); min-height: 44px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--wine); outline: 3px solid rgba(156,51,63,0.2); outline-offset: 0; }
.consent { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 0.9rem; color: var(--ink-soft); }
.consent input { width: 20px; height: 20px; margin-top: 2px; }
.form .btn { justify-self: start; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.form { position: relative; }
.form .hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; }   /* pole-pułapka na boty (wyslij.php) */
.form-status { margin: 0; padding: 12px 14px; border: 1px solid var(--stone); border-radius: var(--radius); font-size: 0.95rem; }
.form-status--info { background: var(--mist); color: var(--ink-soft); }
.form-status--ok { background: #e3f1e4; border-color: #bfdcc2; color: var(--ok); }
.form-status--blad { background: #fdecec; border-color: #f0c2c2; color: #a32020; }

/* okno z filmem / galerią (modal) */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(10,10,10,0.88); }
.modal.is-open { display: flex; }
.modal-box { width: min(1100px, 100%); position: relative; }
.modal-close { position: absolute; right: 0; top: -48px; background: none; border: 0; color: var(--white); font: inherit; font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px; }
.modal-close:hover { text-decoration: underline; }
.modal-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.modal-frame iframe, .modal-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.modal-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #ddd; text-align: center; padding: 24px; font-size: 1.05rem; }
.modal-caption { color: #ddd; margin-top: 10px; font-size: 0.9rem; }
.modal-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); background: rgba(0,0,0,0.45); color: var(--white); cursor: pointer; display: none; align-items: center; justify-content: center; transition: background 180ms; }
.modal-arrow svg { width: 24px; height: 24px; }
.modal-arrow:hover { background: var(--wine); border-color: var(--wine); }
.modal-arrow--prev { left: -72px; } .modal-arrow--next { right: -72px; }
.modal-counter { position: absolute; left: 0; top: -44px; color: #ddd; font-size: 0.95rem; display: none; padding: 8px 0; }
.modal--gallery .modal-arrow, .modal--gallery .modal-counter { display: inline-flex; }
.modal--gallery .modal-frame { background: #111; }
@media (max-width: 1260px) { .modal-arrow--prev { left: 8px; } .modal-arrow--next { right: 8px; } }
body.modal-open { overflow: hidden; }

/* pasek cookies */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; background: var(--white); border: 1px solid var(--stone); box-shadow: 0 10px 30px rgba(0,0,0,0.12); padding: 18px 20px; display: none; gap: 16px; align-items: center; max-width: 720px; margin: 0 auto; font-size: 0.92rem; }
.cookies.is-visible { display: flex; }
.cookies p { margin: 0; flex: 1; }
.cookies .btn { padding: 9px 14px; min-height: 40px; }
/* pasek z panelem ustawień (statystyki / marketing) */
.cookies { flex-wrap: wrap; max-width: 820px; }
.cookies-text { flex: 1 1 340px; min-width: 0; }
.cookies-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies-opcje { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--stone); }
.cookies-opcje label { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; margin: 6px 0; font-size: 0.88rem; line-height: 1.4; cursor: pointer; }
.cookies-opcje input { width: 18px; height: 18px; margin: 2px 0 0; }

/* pojawianie się sekcji przy przewijaniu (raz, 0,5 s) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* pasek „Zadzwoń / Napisz" na telefonie */
.cta-bar { display: none; }

/* notka pod formularzem (zamiast checkboxa zgody — odpowiedź na zapytanie nie wymaga zgody) */
.consent-note { font-size: 0.88rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* polityka prywatności (polityka-prywatnosci.html) — prosty, czytelny dokument */
.polityka { max-width: 78ch; }
.polityka .meta { color: var(--ink-soft); font-size: 0.95rem; }
.polityka h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-top: 2.4em; }
.polityka h3 { font-size: 1.2rem; margin-top: 1.7em; }
.polityka .skrot { background: var(--white); border: 1px solid var(--stone); border-left: 4px solid var(--wine); padding: 22px 26px 10px; margin: 32px 0 40px; }
.polityka .skrot h2 { margin-top: 0; font-size: 1.4rem; }
.polityka .skrot ul { margin: 0; padding-left: 1.1em; }
.polityka .skrot li { margin-bottom: 0.5em; }
.polityka .spis-tytul { margin-top: 0; font-size: 1.4rem; }
.polityka .spis { columns: 2; column-gap: 32px; list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.polityka .spis li { break-inside: avoid; padding: 3px 0; }
.polityka .spis a { text-decoration: none; }
.polityka .spis a:hover { text-decoration: underline; }
.polityka ul li, .polityka ol li { margin-bottom: 0.45em; }
.polityka .spolki { margin: 8px 0 20px; }
.polityka .spolki li { padding: 18px 0; }
.polityka .spolki h3 { margin-top: 0; font-size: 1.2rem; }
.polityka .po-liscie { margin-top: 1em; }
.polityka .narzedzia { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0; background: var(--white); }
.polityka .narzedzia th, .polityka .narzedzia td { padding: 10px 10px; border-bottom: 1px solid var(--stone); text-align: left; vertical-align: top; }
.polityka .narzedzia tbody tr:last-child td { border-bottom: 0; }
.polityka .narzedzia th { background: var(--mist); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.polityka .narzedzia td:first-child { font-weight: 600; }
.polityka code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--mist); padding: 1px 5px; border-radius: var(--radius); }
/* tabela narzędzi jest szersza niż kolumna tekstu (do 1000 px) i wyśrodkowana względem niej */
.polityka .table-wrap { --szer: min(1000px, 100vw - 2 * var(--gutter)); width: var(--szer); margin: 10px 0 18px calc((100% - var(--szer)) / 2); border: 1px solid var(--stone); }
@media (max-width: 820px) {
  .polityka .spis { columns: 1; }
  .polityka .narzedzia { min-width: 760px; }       /* tabela przewija się w bok, komórki nie ściskają się do 1 słowa */
  .polityka .skrot { padding: 18px 18px 8px; }
}

/* 7. TELEFON I TABLET */
@media (max-width: 1024px) {
  .reasons { grid-template-columns: 1fr 1fr; }
  .keyfacts { grid-template-columns: repeat(3, 1fr); }
  .keyfacts dd { white-space: normal; }
  .keyfacts div:nth-child(3n) { border-right: 0; }
  .keyfacts div { border-bottom: 1px solid var(--stone); }
  .estate-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  /* elementy w siatkach nie mogą być szersze niż ekran */
  .estates > *, .split > *, .history > *, .contact > *, .navigator > *, .rooms > *, .photo-pair > *, .estate-row > * { min-width: 0; }
  .contact-list li { grid-template-columns: 96px 1fr; overflow-wrap: anywhere; }
  .lokale { font-size: 0.85rem; }
  .lokale th, .lokale td { padding: 8px 6px; white-space: normal; }
  .lokale td:first-child, .lokale th:first-child { white-space: nowrap; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--stone); padding: 8px 20px 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--stone); }
  .nav a.btn { margin: 12px 0 0; justify-content: center; }
  .nav-toggle { display: inline-block; }

  /* menu „Inwestycje” na telefonie: nagłówek + dwa wiersze (miniatura, nazwa), bez panelu i animacji */
  .nav-inwestycje { display: contents; }
  .nav .nav-trigger { padding: 12px 0; border-bottom: 1px solid var(--stone); pointer-events: none; }
  .nav .nav-trigger svg { display: none; }
  .nav-inwestycje.is-current .nav-trigger, .nav .nav-trigger:hover { border-bottom-color: var(--stone); }
  .inwestycje-panel { position: static; visibility: visible; opacity: 1; clip-path: none; transition: none; background: transparent; border: 0; box-shadow: none; padding: 0; }
  .inwestycje-panel .container { padding: 0; }
  .inwestycje-eyebrow { display: none; }
  .inwestycje-grid { grid-template-columns: 1fr; gap: 0; }
  .nav a.inwestycja, .nav-inwestycje.is-open a.inwestycja { aspect-ratio: auto; display: flex; align-items: center; gap: 14px; padding: 10px 0 10px 14px; border-bottom: 1px solid var(--stone); border-radius: 0; background: none; color: var(--ink); opacity: 1; transform: none; transition: none; isolation: auto; }
  .nav a.inwestycja:hover { color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--stone); }
  .inwestycja > img, .nav-inwestycje.is-open .inwestycja > img { position: static; width: 88px; height: 56px; flex: none; transform: none; border-radius: 3px; z-index: auto; }
  .inwestycja::before, .inwestycja::after, .inwestycja-logo, .inwestycja-body > .inwestycja-cta { display: none; }
  .inwestycja-body { position: static; padding: 0; gap: 0; }
  .inwestycja strong { font-size: 1.1rem; }
  .inwestycja-body > span { font-size: 0.85rem; color: var(--ink-soft); opacity: 1; }
  .inwestycje-dim { display: none; }
  .hero .container { padding-top: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .video-card-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .video-card-play svg { width: 28px; height: 28px; }
  .video-card-bar { padding: 12px 14px; }
  .video-card-bar strong { font-size: 1.15rem; }
  .split--photo { grid-template-columns: 1fr; }
  .etap-pill { font-size: 11px; padding: 4px 9px 4px 6px; }
  .etapy-legenda li span { display: none; }
  .estates, .split, .history, .contact, .navigator, .rooms, .photo-pair, .okolica { grid-template-columns: 1fr; }
  .okolica-map { position: relative; top: auto; height: 420px; min-height: 0; }
  .estate-hero .estate-logo { width: 250px; height: 80px; padding: 11px 18px; }
  .estate-hero h1, .estate-hero .lead { min-height: 0; display: block; }
  .okolica-hint { display: none; }
  .okolica-group h3, .okolica-item, .okolica-note, .okolica-gmaps { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
  .okolica-gmaps { padding: 12px 20px; }
  .team { gap: 20px; }                         /* na tablecie dalej 3 portrety obok siebie */
  .team-strip { grid-template-columns: 1fr; }
  .reasons--4 { grid-template-columns: 1fr; }
  .estate-row { grid-template-columns: 1fr; gap: 12px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .gallery a:first-child { grid-column: span 2; }
  .standard { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .distances { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .keyfacts { grid-template-columns: 1fr 1fr; }
  .keyfacts div:nth-child(3) { grid-column: 1 / -1; }   /* „Działki: od 179 m² do 451 m²” na całą szerokość = jedna linia (Michał 29.10) */
  .keyfacts div:nth-child(2), .keyfacts div:nth-child(3), .keyfacts div:nth-child(5) { border-right: 0; }
  .keyfacts div:nth-child(4) { border-right: 1px solid var(--stone); }
  .reasons { grid-template-columns: 1fr; }
  .steps { gap: 0 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .modal-close { top: -44px; }
  .cookies { flex-direction: column; align-items: stretch; bottom: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
  .cookies-text { flex: 0 0 auto; }   /* w kolumnie flex-basis 340px stawało się wysokością — pasek zasłaniał cały ekran (29.10) */
  .cookies-btns { display: grid; grid-template-columns: 1fr 1fr; }   /* Odrzuć | Ustawienia obok siebie, „Akceptuję wszystkie” na całą szerokość */
  .cookies-btns .btn--primary { grid-column: 1 / -1; }
  .cookies-btns .btn { width: 100%; }
  body { padding-bottom: 72px; }
  .cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(251,250,248,0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--stone); }
  .cta-bar .btn { min-height: 46px; }
}
@media (max-width: 600px) {
  .team { grid-template-columns: 1fr; gap: 28px; }
  .photo-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; gap: 0; }
  .spacer-box { aspect-ratio: 4 / 3; }
  .spacer-hs-label { display: none; }
  .spacer-title strong { font-size: 1rem; }
  .spacer-rooms li { min-width: 100px; }   /* telefon: portrety jeden pod drugim, na całą szerokość */
}

/* Z placu budowy — telefon i tablet: data nad treścią, zdjęcia w dwóch kolumnach (pierwsze na całą szerokość) */
@media (max-width: 820px) {
  .budowa-wpis { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .budowa-meta time { display: inline-block; font-size: 1.2rem; }   /* data i plakietka w jednej linii */
  .budowa-tag { margin: 0 0 0 12px; vertical-align: middle; }
  .budowa-foty, .budowa-foty--1, .budowa-foty--3, .budowa-foty--4, .budowa-foty--5 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .budowa-foty--2 { grid-template-columns: 1fr; }
  .budowa-foty a:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
  .budowa-foty--2 a:first-child, .budowa-foty--4 a:first-child { grid-column: auto; }
}


/* 7b. TELEFON (do 820 px) — poprawki Michała z 21.10: hero podstron inwestycji (logo u góry grafiki, bez leadu, tytuł na dole
   wyśrodkowany nad przyciskami), tabela inwestycji na „O firmie” w całości na ekranie (od 29.10 bez kolumny „Spółka” wszędzie).
   Na komputerze nic się nie zmienia. */
@media (max-width: 820px) {
  .estate-hero { align-items: stretch; }
  .estate-hero .container { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 22px; padding-bottom: 30px; }
  .estate-hero .estate-logo { margin: 0 auto auto; }
  .estate-hero .lead { display: none; }
  .estate-hero h1 { margin: 0 auto 18px; max-width: none; font-size: 1.9rem; }   /* dwie linie: każda połowa tytułu (<span class="nw">) mieści się w szerokości telefonu */
  .estate-hero .hero-actions { justify-content: center; margin-top: 0; width: 100%; }
  #zrealizowane .lokale .status { white-space: normal; line-height: 1.3; }   /* 4 kolumny (bez „Spółki”) mieszczą się na telefonie; wiersze z nazwą inwestycji widoczne (29.10) */
  #zrealizowane .lokale { font-size: 0.9rem; }
  #zrealizowane .lokale tr.grupa td { white-space: normal; font-size: 1rem; }   /* nazwa inwestycji może się łamać — inaczej rozpycha tabelę poza ekran */
  #zrealizowane .lokale td:nth-child(3) { white-space: nowrap; }   /* „114,50 m²” w jednej linii */
  body.modal-open .cta-bar { display: none; }   /* pasek „Zadzwoń / Napisz” chowa się pod otwartym oknem (karta, galeria) */
}
@media (max-width: 360px) {
  .estate-hero h1 { font-size: 1.65rem; }   /* najwęższe telefony: połowy tytułu dalej w jednej linii */
  #zrealizowane .lokale th, #zrealizowane .lokale td { padding: 8px 4px; }   /* tabela inwestycji bez przewijania na boki */
  #zrealizowane .lokale td:first-child { white-space: normal; }   /* „Domy 23A–23D” może zejść do dwóch linii */
}

/* 7c. TELEFON — tabela domów (przy nawigatorze) i lista okolicy (pod mapą) w przewijanej ramce (prośba Michała 27.10; komputer bez zmian).
   Wysokość ramki = jedna liczba: --ramka-m. Klasę is-scroll na telefonie dodaje main.js (sekcje 8b i 11); krótka lista ramki nie dostaje. */
@media (max-width: 820px) {
  :root { --ramka-m: min(68vh, 600px); }
  .navigator .table-wrap.is-scroll { max-height: var(--ramka-m); }
  .okolica-list.is-scroll { max-height: var(--ramka-m); }
  .okolica-list.is-scroll .okolica-group h3, .okolica-list.is-scroll .okolica-item { padding-left: 14px; padding-right: 14px; }   /* w ramce tekst nie styka się z krawędzią (7b zeruje wcięcia) */
}

/* 8. NAWIGATOR 3D, PRZEGLĄDARKA RZUTÓW, KARTA DOMU (podstrony inwestycji; kod w assets/js/domy.js) */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #999; flex: none; }
.dot--wolny { background: var(--ok); } .dot--rezerwacja { background: var(--warn); } .dot--sprzedany { background: #9a9a9a; } .dot--wkrotce { background: #3a4f7a; }
.lokale tr.is-active td { background: #eaf3e1; }   /* dom podświetlony z mapy: delikatna zieleń */
.lokale tbody tr.is-link { cursor: pointer; }   /* wiersz klika się jak dom na mapie: przewija do rzutów */
.lokale tbody tr.is-link:focus-visible td { background: #eaf3e1; outline: none; }
.lokale tr:hover td { background: #eaf3e1; }

/* nawigator: widok 3D osiedla + obrót */
.nawigator { border: 1px solid var(--stone); background: var(--white); }
.nawigator-stage { position: relative; aspect-ratio: 5 / 4; overflow: hidden; background: #e6eadf; }   /* proporcje nadpisuje domy.js z W/H danego nawigatora */
.nawigator-img, .nawigator-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.nawigator-video { opacity: 0; pointer-events: none; transition: opacity 120ms; }
.nawigator-stage.is-rotating .nawigator-video { opacity: 1; }
.nawigator-svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 180ms; }
.nawigator-pills { position: absolute; inset: 0; pointer-events: none; transition: opacity 180ms; }
.nawigator-stage.is-rotating .nawigator-svg, .nawigator-stage.is-rotating .nawigator-pills, .nawigator-stage.is-rotating .nawigator-tip { opacity: 0; pointer-events: none; }
.nav-etap { fill: rgba(38,38,38,0.13); stroke: rgba(255,255,255,0.5); stroke-width: 1.5; stroke-dasharray: 9 6; stroke-linejoin: round; transition: fill 160ms, stroke 160ms; }   /* etapy sprzedane: delikatny stały cień */
.nav-etap.is-active { fill: rgba(38,38,38,0.26); stroke: rgba(255,255,255,0.95); stroke-dasharray: none; }
.nav-dom { fill: rgba(255,255,255,0); stroke: rgba(255,255,255,0); stroke-width: 3; stroke-linejoin: round; cursor: pointer; outline: none; transition: fill 160ms, stroke 160ms; }
.nav-dom.is-active, .nav-dom:focus-visible { fill: rgba(65,117,5,0.42); stroke: #fff; }
.nav-dom--rezerwacja.is-active { fill: rgba(178,106,0,0.42); }
.nav-dom--sprzedany.is-active { fill: rgba(80,80,80,0.45); }
.nav-pill { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap; font: 600 11px/1.2 var(--font-body); letter-spacing: 0.02em; }
.nav-pill--dom { display: block; appearance: none; -webkit-appearance: none; width: 14px; height: 14px; padding: 0; margin: 0; border: 1px solid rgba(0,0,0,0.15); border-radius: 50%; background: rgba(255,255,255,0.95); font-size: 0; line-height: 0; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.25); transition: transform 140ms, box-shadow 140ms; }
/* zielona kropka dokładnie na środku białego kółka: wypełnia kółko z równym odstępem 2 px z każdej strony (inset), bez własnej
   szerokości i bez marginesów „auto” — przy ułamkowych marginesach Safari zaokrąglało każdą kropkę inaczej i w widoku „a” (małe kółka)
   kropki wyglądały na porozrzucane */
.nav-pill--dom .dot { position: absolute; inset: 2px; width: auto; height: auto; margin: 0; }
.nav-pill--dom:hover, .nav-pill--dom.is-active { transform: translate(-50%, -50%) scale(1.5); background: var(--white); box-shadow: 0 6px 18px rgba(0,0,0,0.3); z-index: 2; }
.nav-pill--mini { width: 12px; height: 12px; }   /* kropka w środku: 12 − 2·1 ramka − 2·2 odstęp = 6 px */
.nav-pill--etap { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 999px; background: rgba(38,38,38,0.62); color: var(--white); font-weight: 500; font-size: 10px; letter-spacing: 0.03em; transition: background 160ms, transform 160ms; pointer-events: none; white-space: nowrap; }
.nav-pill--etap strong { font-family: var(--font-display); font-weight: 500; font-size: 12.5px; letter-spacing: 0; }
.nav-pill--etap span { opacity: 0.85; text-transform: uppercase; font-size: 9px; }
.nav-pill--etap em { display: none; font-style: normal; font-weight: 400; opacity: 0.85; }
.nav-pill--etap.is-active { background: rgba(38,38,38,0.88); transform: translate(-50%, -50%) scale(1.08); }
.nav-pill--etap.is-active em { display: inline; }
.nawigator-tip { position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 3px; padding: 10px 13px; min-width: 180px; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.28); font-size: 0.85rem; line-height: 1.3; }
.nawigator-tip strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.nawigator-tip .status { justify-self: start; }
.nawigator-tip em { font-style: normal; color: var(--ink-soft); }
.nawigator-tip b { font-size: 1rem; }
.nawigator-tip small { color: var(--ink-soft); font-size: 0.75rem; }
.nawigator-loading { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 6px 12px; border-radius: 999px; background: rgba(38,38,38,0.8); color: var(--white); font-size: 0.8rem; }
.nawigator-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--stone); }
.nawigator-bar--jeden { justify-content: center; }   /* jeden widok (Wille): bez przycisków obrotu, sam licznik */
.nawigator-licznik { font-size: 0.9rem; text-align: center; }
.nawigator-licznik strong { font-weight: 600; }
.nawigator-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 600 0.9rem var(--font-body); cursor: pointer; transition: background 160ms, color 160ms; }
.nawigator-btn:hover { background: var(--ink); color: var(--white); }
.nawigator-btn svg { width: 18px; height: 18px; }
.nawigator-legend { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 0 12px 10px; font-size: 0.82rem; color: var(--ink-soft); }
.nawigator-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nawigator-legend-hint { margin-left: auto; }

/* przeglądarka rzutów */
.rzuty-domy { display: flex; flex-wrap: wrap; gap: 18px 40px; margin-bottom: 22px; }
.rzuty-grupa-nazwa { display: block; margin-bottom: 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.rzuty-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rzuty-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 11px; border: 1px solid var(--stone); border-radius: 999px; background: var(--white); color: var(--ink); font: 600 0.95rem var(--font-body); cursor: pointer; transition: background 140ms, border-color 140ms, color 140ms; }
.rzuty-chip:hover { border-color: var(--ink); }
.rzuty-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.rzuty-panel { border: 1px solid var(--stone); background: var(--white); }
.rzuty-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--stone); }
.rzuty-tytul { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rzuty-nr { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; }
.rzuty-meta { color: var(--ink-soft); }
.rzuty-cena { display: flex; align-items: center; gap: 12px; }
.rzuty-cena b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.rzuty-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr); }
.rzuty-view { padding: 16px 24px 20px; border-right: 1px solid var(--stone); min-width: 0; }
.rzuty-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rzuty-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--stone); }
.rzuty-tabs button { display: grid; text-align: left; gap: 1px; padding: 6px 14px 9px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.rzuty-tabs button small { font-size: 0.78rem; font-weight: 400; color: var(--ink-soft); }
.rzuty-tabs button:hover { color: var(--ink); }
.rzuty-tabs button.is-active { color: var(--ink); border-bottom-color: var(--szatonia); }
.page-wille .rzuty-tabs button.is-active { border-bottom-color: var(--wille); }
.rzuty-typ { display: inline-flex; padding: 3px; border: 1px solid var(--stone); border-radius: 999px; }
.rzuty-typ button { padding: 5px 14px; border: 0; border-radius: 999px; background: none; font: 600 0.85rem var(--font-body); color: var(--ink-soft); cursor: pointer; }
.rzuty-typ button.is-active { background: var(--ink); color: var(--white); }
/* rzut siedzi absolutnie w ramce 5:4 i mieści się w niej cały (object-fit: contain) — rzuty 3D są prawie kwadratowe,
   a „max-height: 100%” w ramce z aspect-ratio nie działa w każdej przeglądarce (ucinało górę i dół) */
.rzuty-img { position: relative; aspect-ratio: 5 / 4; background: var(--white); overflow: hidden; }
.rzuty-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 180ms; }
.rzuty-img.is-2d img { inset: 3%; width: 94%; height: 94%; }
.rzuty-img.is-loading img { opacity: 0.3; }
.rzuty-zoom { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--stone); border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink); cursor: pointer; transition: background 140ms, color 140ms; }
.rzuty-zoom:hover { background: var(--ink); color: var(--white); }
.rzuty-zoom svg { width: 18px; height: 18px; }
/* „+ Powiększ dom” na rzucie 3D parteru Willi (lewy dolny róg; widoczny tylko, gdy kondygnacja ma kadr „sam dom”) */
.rzuty-dom { position: absolute; left: 10px; bottom: 10px; display: none; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border: 1px solid var(--stone); border-radius: 999px; background: rgba(255,255,255,0.92); color: var(--ink); font: 600 0.85rem var(--font-body); cursor: pointer; transition: background 160ms, color 160ms; }
.rzuty-img.has-dom .rzuty-dom { display: inline-flex; }
.rzuty-dom:hover, .rzuty-dom[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.rzuty-dom svg { width: 18px; height: 18px; }
.rzuty-dom[aria-pressed="true"] .plus-v { display: none; }
.rzuty-uwaga { margin: 12px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.rzuty-side { display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 22px; background: var(--paper); }
.rzuty-rooms { width: 100%; border-collapse: collapse; }
.rzuty-rooms caption { text-align: left; padding-bottom: 8px; font-family: var(--font-display); font-size: 1.3rem; }
.rzuty-rooms td { padding: 7px 0; border-bottom: 1px solid var(--stone); }
.rzuty-rooms td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rzuty-rooms tfoot td { font-weight: 600; border-bottom: 0; }
.rzuty-suma { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.rzuty-actions { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.btn--small { padding: 8px 16px; min-height: 38px; font-size: 0.9rem; }

/* historia zmian ceny: link pod ceną (tabela, nagłówek rzutów) i okno z tabelą zmian */
.link-hist { padding: 0; border: 0; background: none; font: inherit; color: var(--wine); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.link-hist:hover { text-decoration-style: solid; }
.rzuty-cena .link-hist { font-size: 0.85rem; margin-left: 2px; }
.lokale .cena-kwota, .lokale .cena-m2 { white-space: nowrap; }   /* kwota i stawka za m² nie łamią się na telefonie */
.modal--historia .modal-box { width: min(640px, 100%); }
.modal--historia .modal-frame { aspect-ratio: auto; background: var(--white); color: var(--ink); }
.modal--historia .modal-caption { display: none; }
.hist { padding: 24px 28px 22px; }
.hist h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; }
.hist-lead { margin: 0 0 16px; color: var(--ink-soft); font-size: 0.92rem; }
.hist-tab { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hist-tab th, .hist-tab td { padding: 9px 8px; border-bottom: 1px solid var(--stone); text-align: left; white-space: nowrap; }
.hist-tab th { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); background: var(--mist); }
.hist-tab td:nth-child(2) { font-weight: 600; }
.hist-first { color: var(--ink-soft); }
.hist-up { color: #b26a00; } .hist-down { color: var(--ok); }
.hist-note { margin: 14px 0 0; font-size: 0.8rem; color: var(--ink-soft); }

/* okno z kartą domu */
.modal--karta .modal-box { width: min(900px, 100%); }
.modal--karta .modal-frame { aspect-ratio: auto; height: min(84vh, 1260px); background: var(--white); }
.modal--karta .modal-caption { display: flex; align-items: center; gap: 14px; margin-top: 12px; }

@media (max-width: 820px) {
  .nawigator-bar { gap: 8px; flex-wrap: wrap; }
  .nawigator-licznik { order: 3; width: 100%; }
  .nawigator-btn { flex: 1; justify-content: center; }
  .nawigator-legend-hint { display: none; }
  .nav-pill--dom { width: 12px; height: 12px; }
  .nav-pill--mini { width: 10px; height: 10px; }
  .nav-pill--etap { font-size: 9px; padding: 2px 6px; } .nav-pill--etap strong { font-size: 11px; } .nav-pill--etap span { font-size: 8px; }
  .nawigator-tip { display: none; }   /* na telefonie dotknięcie domu od razu pokazuje rzuty */
  .rzuty-domy { gap: 14px 24px; }
  .rzuty-body { grid-template-columns: 1fr; }
  .rzuty-view { padding: 12px 14px 16px; border-right: 0; border-bottom: 1px solid var(--stone); }
  .rzuty-head { padding: 14px; }
  .rzuty-side { padding: 14px 14px 18px; }
  .rzuty-tabs button { padding: 6px 10px 8px; }
  .modal--karta .modal-frame { height: min(78vh, calc(100vh - 150px)); }
  .lokale td .link-hist { display: block; margin-top: 2px; } .lokale .cena-sep { display: none; }   /* „historia cen” w osobnej linii pod stawką */
  .navigator .lokale { font-size: 0.8rem; } .navigator .lokale th, .navigator .lokale td { padding: 8px 4px; }   /* tabela domów mieści się na szerokość telefonu */
  .navigator .lokale .cena-m2 { white-space: normal; }
  .hist { padding: 16px 14px; }
  .hist-tab { font-size: 0.85rem; } .hist-tab th, .hist-tab td { padding: 7px 5px; }   /* karta w oknie + „Pobierz PDF” mieszczą się na ekranie telefonu */
}
@media (max-width: 400px) {
  .navigator .lokale th:nth-child(4), .navigator .lokale td:nth-child(4) { display: none; }   /* najwęższe telefony: bez kolumny „Pokoje” (4 w każdym domu; liczba pokoi jest w rzutach) */
}

/* ==========================================================================
   9. INWESTYCJA „WKRÓTCE” (Michał 5.11.2026 — strona startuje, sprzedaż Szatonii V ruszy później)
   Karta bez linku: render przygaszony zasłoną (krycie 0,6 = render widać w ok. 40 %), na środku „Wkrótce”
   w podwójnej cienkiej ramce (jak ramki w logach inwestycji). Karta w menu: .inwestycja.is-wkrotce,
   karta na stronie głównej: .estate.is-wkrotce, hero podstrony w czasie blokady: .estate-hero--wkrotce.
   Włącza i wyłącza: Wszystko/_skrypty/szatonia-wkrotce.py "<Kod Strony>" zablokuj | odblokuj.
   ========================================================================== */
:root { --wkrotce-zaslona: rgba(24, 24, 24, 0.6); }   /* jedna liczba do strojenia: 0.6 → render widać w ok. 40 % */
.wkrotce { display: inline-block; margin: 0; padding: 0.72em 0.95em 0.72em 1.27em; border: 1px solid rgba(255,255,255,0.85); outline: 1px solid rgba(255,255,255,0.4); outline-offset: 5px; font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; line-height: 1; letter-spacing: 0.32em; text-transform: uppercase; color: var(--white); white-space: nowrap; }   /* lewy margines większy o rozstrzelenie liter — napis równo na środku ramki */

/* karta w menu „Inwestycje” */
.nav a.inwestycja.is-wkrotce { cursor: default; }
.nav a.inwestycja.is-wkrotce:hover { box-shadow: none; }
.inwestycja.is-wkrotce::before { background: var(--wkrotce-zaslona); }
.nav-inwestycje.is-open .inwestycja.is-wkrotce:hover > img { transform: scale(1); }
.inwestycja.is-wkrotce .inwestycja-body { top: 0; align-items: center; justify-content: center; text-align: center; gap: 0; }
.inwestycja.is-wkrotce .inwestycja-logo { object-position: center; margin: 0 0 6px; }
.inwestycja.is-wkrotce .inwestycja-body > span:not(.wkrotce) { display: none; }   /* opis („12 domów…”) tylko w wierszu na telefonie */
.inwestycja-body > .wkrotce { margin-top: 20px; font-size: 1.05rem; opacity: 1; }

/* karta na stronie głównej („Dwie nowe inwestycje”) */
.estate.is-wkrotce .estate-media::after { content: ""; position: absolute; inset: 0; background: var(--wkrotce-zaslona); }
.estate-media > .wkrotce { position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); font-size: 1.45rem; }

/* hero podstrony w czasie blokady — wszystko na środku: logo u góry, „Wkrótce” pośrodku, tytuł i przyciski u dołu */
.estate-hero--wkrotce::before { background: var(--wkrotce-zaslona); }
.estate-hero--wkrotce .container { align-items: center; text-align: center; }
.estate-hero--wkrotce .estate-logo { margin: 0 auto auto; }
.estate-hero--wkrotce .container > .wkrotce { margin: 0 auto auto; font-size: clamp(1.5rem, 2.6vw, 2.2rem); outline-offset: 7px; }
.estate-hero--wkrotce h1 { max-width: none; min-height: 0; margin: 0 0 22px; }
.estate-hero--wkrotce .hero-actions { justify-content: center; }

@media (max-width: 820px) {
  .inwestycja.is-wkrotce > img { opacity: 0.4; }   /* wiersz w menu na telefonie: miniatura widoczna w ok. 40 % */
  .inwestycja.is-wkrotce .inwestycja-body { align-items: flex-start; text-align: left; }
  .inwestycja.is-wkrotce .inwestycja-body > span:not(.wkrotce) { display: block; }
  .inwestycja.is-wkrotce strong { color: var(--ink-soft); }
  .inwestycja-body > .wkrotce { margin-top: 6px; padding: 4px 8px 4px 10px; border-color: var(--stone); outline: 0; font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; color: var(--ink-soft); }
  .estate-media > .wkrotce { font-size: 1.2rem; }
  .estate-hero--wkrotce .container > .wkrotce { font-size: 1.35rem; outline-offset: 5px; }
}
