/* Flatmare Estates — marka (logo, kolory, zdjęcia) z flatmare.pl.

   Paleta: granat/błękit z logo Flatmare + kremowe tło i złoty akcent.
   Typografia: Playfair Display (szeryfowe nagłówki, odpowiednik Didota)
   + Jost (interfejs, odpowiednik PP Pangram Sans). */

:root {
  --ink: #12283d;          /* granat — teksty, przyciski główne */
  --ink-soft: #2b4560;
  --brand: #1b6e9b;        /* błękit z logo Flatmare */
  --brand-dark: #145880;
  --brand-tint: #eaf2f7;
  --gold: #bfa14e;         /* złoty akcent z flatmare.pl */
  --gold-soft: #f0e6cd;
  --cream: #f8f2ea;        /* tło strony */
  --paper: #fffdf6;        /* karty, panele */
  --line: #e4dcd1;
  --line-soft: #efe8de;
  --muted: #6b6560;
  --muted-2: #928b83;
  --white: #fff;
  --danger: #b3453f;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(18, 40, 61, .05);
  --shadow: 0 10px 30px rgba(18, 40, 61, .08);
  --shadow-lg: 0 22px 50px rgba(18, 40, 61, .14);

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

a { color: var(--brand); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Didot', Georgia, serif;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.01em;
  margin: 0;
}

button { font: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ============ Układ ============ */

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-tint { background: var(--paper); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow.light { color: var(--gold-soft); }

h1.display { font-size: clamp(40px, 6vw, 76px); }
h2.section-title { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 18px; }
h3.card-title { font-size: 21px; }

.lead { font-size: 17px; line-height: 1.75; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

/* ============ Pigułki i przyciski ============ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: #7a6321;
  white-space: nowrap;
}
.pill.brand { background: var(--brand-tint); color: var(--brand-dark); }
.pill.solid { background: var(--ink); color: var(--white); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: var(--white); transform: translateY(-1px); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-brand { background: var(--brand); border-color: var(--brand); }
.btn-brand:hover { background: var(--ink); border-color: var(--ink); }

.btn-light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.link-arrow:hover { color: var(--brand); }
.link-arrow .arrow { transition: transform .25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ============ Nagłówek ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 242, 234, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); background: rgba(248, 242, 234, .96); }

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 54px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.main-nav > a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.main-nav > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.main-nav > a:hover::after, .main-nav > a.active::after { transform: scaleX(1); }
.main-nav > a.active { color: var(--brand); }

.header-tools { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.fav-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  display: none;
  align-items: center; justify-content: center;
}
.fav-count.on { display: inline-flex; }

.nav-toggle { display: none; }

/* Menu mobilne */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 55;
  background: var(--cream);
  padding: 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
}
.mobile-nav.open { transform: none; }
.mobile-nav a:not(.btn) {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  color: var(--ink);
}
.mobile-nav .btn { margin-top: 28px; }
.mobile-contact { margin-top: 32px; font-size: 14px; color: var(--muted); line-height: 2; }

/* ============ Hero ============ */

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  padding: 0 0 64px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--ink);
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 24, 38, .45) 0%, rgba(10, 24, 38, .18) 38%, rgba(10, 24, 38, .82) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 20px; }
.hero p { color: rgba(255, 255, 255, .86); font-size: 18px; max-width: 54ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.hero-stat .num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 46px;
  line-height: 1;
  color: var(--white);
}
.hero-stat .label {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; transform: none; }
}

/* ============ Wyszukiwarka ============ */

.search-band { margin-top: -58px; position: relative; z-index: 5; }

.search-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 32px;
}
.search-card h2 { font-size: 26px; margin-bottom: 22px; }
.search-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.search-head .by-ref {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: none;
  border: 0;
  padding: 0;
}
.search-head .by-ref:hover { color: var(--ink); }

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.field select, .field input, .input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .2s var(--ease);
}
.field select { appearance: none; padding-right: 36px; cursor: pointer;
  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='%236b6560' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.field select:focus, .field input:focus, .input:focus { outline: none; border-color: var(--brand); }
.field-row { display: flex; gap: 10px; }
.field-row input { min-width: 0; }

/* ============ Modal numeru oferty ============ */

.modal {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(12, 24, 36, .55);
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  width: min(520px, 100%);
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal-box h2 { font-size: 26px; margin-bottom: 8px; }
.modal-box p { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--cream); color: var(--ink);
  font-size: 20px; line-height: 1;
}
.modal-close:hover { background: var(--line); }

/* ============ Karty nieruchomości ============ */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.p-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-soft); }

.p-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--brand-tint) center/cover no-repeat;
  overflow: hidden;
}
.p-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-card:hover .p-card-media img { transform: scale(1.04); }
.p-card-media .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
}
.p-card-badges { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; }

.fav-btn {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255, 253, 246, .92);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.08); }
.fav-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fav-btn.is-on { background: var(--brand); color: var(--white); }
.fav-btn.is-on svg { fill: currentColor; }

.p-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.p-card-loc { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
.p-card h3 { font-size: 20px; color: var(--ink); }
.p-card-specs {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 13.5px; color: var(--muted);
  padding-top: 4px;
}
.p-card-specs span { display: inline-flex; align-items: center; gap: 6px; }
.p-card-specs svg { width: 16px; height: 16px; stroke: var(--muted-2); fill: none; stroke-width: 1.5; }
.p-card-foot {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.p-card-price { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; color: var(--ink); }
.p-card-ref { font-size: 12px; color: var(--muted-2); letter-spacing: .05em; }
.p-card-link { position: absolute; inset: 0; z-index: 1; }

/* ============ Pasek filtrów (lista ofert) ============ */

.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(248, 242, 234, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 36px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.drop { position: relative; }
.drop > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  font-size: 12.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::after {
  content: ""; width: 0; height: 0;
  border: 4px solid transparent; border-top-color: var(--muted-2);
  transform: translateY(2px);
  transition: transform .25s var(--ease);
}
.drop[open] > summary::after { transform: translateY(-2px) rotate(180deg); }
.drop > summary:hover, .drop[open] > summary { border-color: var(--brand); }
.drop > summary.has-value { background: var(--ink); border-color: var(--ink); color: var(--white); }
.drop > summary.has-value::after { border-top-color: rgba(255, 255, 255, .7); }
.drop-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--brand); color: var(--white);
  font-size: 11px;
}

.drop-panel {
  position: absolute;
  z-index: 45;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 280px;
  max-width: min(440px, calc(100vw - 40px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.drop-panel.right { left: auto; right: 0; }
.drop-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: 340px; overflow-y: auto; }
.drop-foot { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--cream); }

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.check:hover { background: var(--cream); }
.check input { width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.check .sub { margin-left: auto; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 14px;
  color: var(--ink);
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--brand); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }
/* Bez :has() pigułka nadal działa (to zwykły radio w <label>) — traci tylko
   podświetlenie, dlatego zaznaczenie widać też po obwódce fokusu. */
.chip:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.filter-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.filter-meta .count { font-size: 14.5px; color: var(--muted); }
.filter-meta .count strong { color: var(--ink); font-weight: 500; }
.filter-clear {
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line);
}
.filter-clear:hover { color: var(--danger); border-color: currentColor; }

/* Grupy lokalizacji (rejon > miejscowości) */
.loc-group { border-bottom: 1px solid var(--line-soft); }
.loc-group:last-child { border-bottom: 0; }
.loc-group > summary { list-style: none; }
.loc-group > summary::-webkit-details-marker { display: none; }
.loc-children { padding: 0 0 8px 30px; }
.loc-expand {
  position: relative; flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 1px solid var(--line); border-radius: 50%;
}
.loc-expand::before, .loc-expand::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 9px; height: 1px; background: var(--muted);
  transform: translate(-50%, -50%);
}
.loc-expand::after { transform: translate(-50%, -50%) rotate(90deg); }
.loc-group[open] .loc-expand::after { opacity: 0; }

/* ============ Kafle kategorii ============ */

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.tile {
  position: relative;
  min-height: 300px;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  color: var(--white);
  background: var(--ink) center/cover no-repeat;
  isolation: isolate;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 24, 38, .12), rgba(10, 24, 38, .78));
  transition: background .35s var(--ease);
}
.tile:hover::after { background: linear-gradient(180deg, rgba(10, 24, 38, .3), rgba(10, 24, 38, .85)); }
.tile h3 { font-size: 25px; color: var(--white); margin-bottom: 6px; }
.tile .tile-sub { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.tile-lg { grid-column: span 2; min-height: 340px; }

/* ============ Usługi ============ */

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.svc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 34px 30px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* Ikona stoi obok nazwy usługi, nie nad nią — kafelek czyta się wtedy
   jak pozycja na liście, a nie jak wyśrodkowany „kafelek z ikonką”. */
.svc-head { display: flex; align-items: center; gap: 14px; }
.svc-head h3 { margin: 0; }
.svc-icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.svc-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.svc h3 { font-size: 20px; }
.svc p { font-size: 14.5px; line-height: 1.7; color: var(--muted); margin: 0; }
.svc .link-arrow { margin-top: auto; padding-top: 12px; }

/* ============ Sekcja „o nas” / split ============ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--brand-tint) center/cover no-repeat;
}
.split-media.wide { aspect-ratio: 4 / 3; }
.split-body p { color: var(--muted); font-size: 16.5px; line-height: 1.8; margin: 0 0 18px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 48px; margin: 34px 0; }
.stat .num { font-family: 'Playfair Display', Georgia, serif; font-size: 42px; line-height: 1; color: var(--brand); }
.stat .label { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); margin-top: 8px; }

/* ============ Blog ============ */

.post-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  color: inherit;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.post-card-media { aspect-ratio: 16 / 10; background: var(--brand-tint) center/cover no-repeat; }
.post-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { font-size: 21px; }
.post-card p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.7; }
.post-meta { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.post-card .link-arrow { margin-top: auto; padding-top: 8px; }

.post-content { font-size: 17px; line-height: 1.85; color: #38414a; }
.post-content h2 { font-size: 30px; margin: 46px 0 14px; color: var(--ink); }
.post-content h3 { font-size: 23px; margin: 34px 0 12px; color: var(--ink); }
.post-content img { border-radius: var(--r-md); margin: 28px 0; }
.post-content blockquote {
  margin: 28px 0; padding: 18px 26px;
  border-left: 3px solid var(--brand);
  background: var(--paper);
  color: var(--muted); font-style: italic;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.post-content ul, .post-content ol { padding-left: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content code { background: var(--brand-tint); padding: 2px 7px; border-radius: 5px; font-size: 15px; }
.post-cover { aspect-ratio: 21 / 9; border-radius: var(--r-lg); background: var(--brand-tint) center/cover no-repeat; margin-bottom: 44px; }

/* ============ Newsletter ============ */

.newsletter {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 56px;
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.newsletter h2 { color: var(--white); font-size: 36px; margin-bottom: 12px; }
.newsletter p { color: rgba(255, 255, 255, .74); margin: 0; }
.newsletter .field label { color: rgba(255, 255, 255, .6); }
.newsletter input[type="email"] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: var(--white); }
.newsletter input[type="email"]::placeholder { color: rgba(255, 255, 255, .45); }
.newsletter input[type="email"]:focus { border-color: var(--gold); }
.newsletter .check { color: rgba(255, 255, 255, .74); font-size: 13px; padding-left: 0; }
.newsletter .check:hover { background: none; }
.newsletter .check a { color: var(--gold-soft); text-decoration: underline; }

/* ============ Formularze ============ */

.form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-stack textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font: inherit; font-size: 14.5px; color: var(--ink);
  min-height: 130px; resize: vertical;
  transition: border-color .2s var(--ease);
}
.form-stack textarea:focus { outline: none; border-color: var(--brand); }
.form-stack .check { font-size: 13px; color: var(--muted); align-items: flex-start; padding: 0; }
.form-stack .check:hover { background: none; }
.form-stack .check a { text-decoration: underline; }
.optional { color: var(--muted-2); text-transform: none; letter-spacing: 0; font-size: 11px; }

.hp { position: absolute; left: -9999px; }

.notice {
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  font-size: 15px;
  color: var(--muted);
}
.notice-error { background: #fbf0ef; border-color: #eccfcc; color: #7d3c37; }
.notice-error strong { display: block; color: var(--danger); margin-bottom: 6px; font-weight: 500; }
.notice-success { background: #eef5ee; border-color: #cfe0cf; color: #3d6140; }

/* ============ Szczegóły nieruchomości ============ */

.prop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.prop-head h1 { font-size: clamp(30px, 3.4vw, 44px); }
.prop-actions { display: flex; gap: 10px; }
.prop-actions .icon-btn { width: auto; padding: 0 18px; border-radius: var(--r-pill); gap: 8px; font-size: 13px; }
.prop-actions .icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.prop-actions .icon-btn.is-on { background: var(--brand); border-color: var(--brand); color: var(--white); }
.prop-actions .icon-btn.is-on svg { fill: currentColor; }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 190px; gap: 12px; margin: 28px 0 48px; }
.gallery a { display: block; border-radius: var(--r-sm); overflow: hidden; background: var(--brand-tint) center/cover no-repeat; }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery a img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery a:hover img { transform: scale(1.05); }
.gallery .more-shots {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--white);
  font-size: 14px; letter-spacing: .08em;
}
.gallery a { cursor: zoom-in; }
.gallery .more-shots { cursor: pointer; }
/* Zdjęcia poza siatką — są w DOM tylko po to, żeby przeglądarka zdjęć
   znała pełną listę. display:none wypada z siatki, więc układ się nie zmienia. */
.gallery .shot-hidden { display: none; }

/* ============ Przeglądarka zdjęć (lightbox) ============ */

.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: none;
  flex-direction: column;
  background: rgba(8, 18, 28, .95);
  backdrop-filter: blur(4px);
  color: var(--white);
}
.lightbox.open { display: flex; }

.lb-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(14px, 4vw, 28px);
  flex: 0 0 auto;
}
.lb-count { font-size: 13px; letter-spacing: .14em; color: rgba(255, 255, 255, .7); }

.lb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lb-close { width: 42px; height: 42px; }

/* Firmowy błękit obwódki focusu ginie na ciemnym tle galerii. */
.lightbox :focus-visible { outline-color: var(--white); }

/* Strzałki leżą na zdjęciu — na wąskich ekranach schodzą bliżej krawędzi. */
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; z-index: 2;
}
.lb-prev { left: clamp(8px, 2vw, 24px); }
.lb-next { right: clamp(8px, 2vw, 24px); }

.lb-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;                        /* bez tego zdjęcie rozpycha kolumnę */
  display: flex; align-items: center; justify-content: center;
  padding: 0 clamp(12px, 9vw, 96px);
}
.lb-img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  opacity: 1; transition: opacity .2s var(--ease);
}
.lb-stage.is-loading .lb-img { opacity: .25; }

/* Kręciołek widoczny tylko na czas doczytywania kolejnego zdjęcia. */
.lb-spin {
  position: absolute; width: 34px; height: 34px;
  border: 2px solid rgba(255, 255, 255, .25);
  border-top-color: var(--white);
  border-radius: 50%;
  opacity: 0; pointer-events: none;
  animation: lb-spin 0.8s linear infinite;
}
.lb-stage.is-loading .lb-spin { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

.lb-thumbs {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: 14px clamp(12px, 4vw, 28px) 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.lb-thumbs::-webkit-scrollbar { height: 6px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); border-radius: 999px; }
.lb-thumb {
  flex: 0 0 auto;
  width: 94px; height: 64px;
  padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden; cursor: pointer;
  opacity: .5;
  transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-on { opacity: 1; border-color: var(--white); }

/* Jedno zdjęcie — nie ma czego przewijać. */
.lightbox.is-single .lb-nav,
.lightbox.is-single .lb-thumbs { display: none; }

@media (max-width: 720px) {
  .lb-nav { width: 44px; height: 44px; }
  .lb-stage { padding: 0 8px; }
  .lb-thumb { width: 72px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-img { transition: none; }
  .lb-spin { animation-duration: 2s; }
}

.prop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.prop-aside { position: sticky; top: calc(var(--header-h) + 24px); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 40px; }
.fact { background: var(--paper); padding: 20px 18px; }
.fact .label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.fact .value { font-family: 'Playfair Display', Georgia, serif; font-size: 24px; color: var(--ink); margin-top: 4px; }

.feature-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px; }
.feature-group h4 { font-family: 'Jost', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.feature-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feature-group li { font-size: 14.5px; color: var(--muted); display: flex; gap: 9px; }
.feature-group li::before { content: "—"; color: var(--gold); }

.prop-price-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.prop-price-box .price { font-family: 'Playfair Display', Georgia, serif; font-size: 38px; line-height: 1.1; }
.prop-price-box .price-note { font-size: 13px; color: var(--muted-2); margin: 6px 0 22px; }

.block-title { font-size: 27px; margin: 0 0 20px; }
.block { margin-bottom: 52px; }

/* ============ Ulubione ============ */

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state h2 { font-size: 30px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); margin: 0 0 26px; }

/* ============ Paginacja ============ */

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 14px; color: var(--muted); background: var(--paper);
  transition: all .25s var(--ease);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ============ Okruszki ============ */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted-2); padding: 20px 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-current] { color: var(--ink); }

/* ============ Widget kontaktowy ============ */

.contact-widget {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--white);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: var(--shadow-lg);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.contact-widget:hover { background: var(--brand); color: var(--white); transform: translateY(-2px); }
.contact-widget svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ============ Cookies ============ */

.cookie-bar {
  position: fixed;
  left: 24px; bottom: 24px;
  z-index: 80;
  width: min(430px, calc(100vw - 48px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.cookie-bar.show { display: block; }
.cookie-bar h3 { font-size: 21px; margin-bottom: 8px; }
.cookie-bar p { font-size: 13.5px; line-height: 1.7; color: var(--muted); margin: 0 0 18px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ============ Stopka ============ */

.site-footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 88px 0 32px; margin-top: 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.footer-motto { font-family: 'Playfair Display', Georgia, serif; font-size: 40px; line-height: 1.15; color: var(--white); margin-bottom: 20px; }
.footer-motto span { color: var(--gold); font-style: italic; }
.footer-top p { font-size: 14.5px; line-height: 1.85; margin: 0; }
.footer-logo { height: 62px; width: auto; margin-bottom: 26px; filter: brightness(0) invert(1); opacity: .95; }

.footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 40px; padding: 48px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.footer-col h4 {
  font-family: 'Jost', sans-serif;
  font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--white); margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 14px; color: rgba(255, 255, 255, .68); padding: 5px 0; }
.footer-col a:hover { color: var(--gold); }
.footer-col .f-text { font-size: 14px; line-height: 2; }

.footer-bottom {
  padding-top: 26px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 13px; color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .62); }
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom .links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-bottom button {
  background: none; border: 0; padding: 0;
  color: rgba(255, 255, 255, .62); font-size: 13px;
}
.footer-bottom button:hover { color: var(--gold); }

/* ============ Panel admina ============ */

/* Panel jest narzędziem wewnętrznym i korzysta z prostszego zestawu klas
   niż strona publiczna — te aliasy pozwalają nie przepisywać jego szablonów. */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; }
.grid { display: grid; gap: 24px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-media { background: var(--brand-tint) center/cover no-repeat; }
.card-body { padding: 20px; }
.ph-label {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-size: 12px; letter-spacing: .08em; color: var(--muted-2); text-align: center; padding: 16px;
}
.section-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; }
.form-label {
  font-size: 11px; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted-2);
}
.form-stack input[type="text"], .form-stack input[type="email"], .form-stack input[type="date"],
.form-stack input[type="password"], .form-stack input[type="tel"], .form-stack input[type="number"],
.form-stack input[type="file"], .form-stack select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .2s var(--ease);
}
.form-stack input:focus, .form-stack select:focus { outline: none; border-color: var(--brand); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); font-weight: 500; }
.admin-actions { display: flex; gap: 10px; align-items: center; }
.admin-actions form { margin: 0; }

/* ============ Strony treściowe ============ */

.page-content { font-size: 16.5px; line-height: 1.9; color: var(--muted); }
.page-content h2 { font-size: 28px; color: var(--ink); margin: 44px 0 14px; }
.page-content h3 { font-size: 22px; color: var(--ink); margin: 34px 0 12px; }
.page-content ul, .page-content ol { padding-left: 24px; }
.page-content li { margin-bottom: 8px; }

/* ============ Responsywność ============ */

@media (max-width: 1080px) {
  .prop-layout { grid-template-columns: 1fr; gap: 40px; }
  .prop-aside { position: static; }
  .search-grid { grid-template-columns: repeat(2, 1fr); }
  .search-grid .field-submit { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-media { aspect-ratio: 16 / 10; }
  .newsletter { grid-template-columns: 1fr; gap: 32px; padding: 40px; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .tile-lg { grid-column: span 1; }
}

@media (max-width: 900px) {
  .main-nav, .header-tools .btn { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .header-tools { margin-left: 0; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .gallery a:first-child { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 720px) {
  .wrap, .wrap-narrow, .header-inner { padding-left: 20px; padding-right: 20px; }
  .section { padding: 64px 0; }
  .hero { min-height: 78vh; padding-bottom: 48px; }
  .hero p { font-size: 16px; }
  .hero-stats { gap: 32px; margin-top: 36px; }
  .hero-stat .num { font-size: 34px; }
  .search-band { margin-top: -30px; }
  .search-card { padding: 24px 20px; }
  .search-grid { grid-template-columns: 1fr; }
  .form-two { grid-template-columns: 1fr; }
  .form-panel, .newsletter { padding: 28px 22px; }
  .cards { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-motto { font-size: 30px; }
  .cookie-bar { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 22px; }
  .contact-widget { right: 12px; bottom: 12px; padding: 12px 18px; font-size: 12px; }
  .filter-bar { top: 0; }
  .prop-actions { width: 100%; }
}

@media print {
  .site-header, .site-footer, .contact-widget, .cookie-bar, .filter-bar, .fav-btn { display: none !important; }
}
