/* ===== Variables ===== */
:root {
  --color-bg: #faf9f7;
  --color-bg-alt: #f0ede8;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #2c3e50;
  --color-accent-light: #3d5a73;
  --color-cta: #c9a227;
  --color-cta-hover: #b8921f;
  --color-prospekt: #1b6d4f;
  --color-prospekt-hover: #145a3f;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.125rem; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--color-accent); display: flex; align-items: center; }
.logo img { height: 48px; width: auto; object-fit: contain; }
.logo span { color: var(--color-cta); }
.nav { display: flex; gap: 2rem; }
.nav a { font-weight: 500; color: var(--color-text-muted); transition: color 0.2s; }
.nav a:hover { color: var(--color-accent); }
.nav-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-text); }

@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--color-bg); padding: 1rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .nav.active { display: flex; }
  .nav a { padding: 0.75rem; }
  .nav-toggle { display: flex; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover { background: var(--color-accent-light); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--color-accent); border: 2px solid var(--color-accent); }
.btn-secondary:hover { background: var(--color-accent); color: white; }
/* Prospekt: kolory hex (nie tylko var) — gdy cache lub stara przeglądarka gubi zmienne CSS */
a.btn.btn-prospekt,
.btn.btn-prospekt {
  background-color: #1b6d4f;
  background: #1b6d4f;
  color: #fff !important;
  border: 2px solid transparent;
  box-sizing: border-box;
}
a.btn.btn-prospekt:hover,
.btn.btn-prospekt:hover {
  background-color: #145a3f;
  background: #145a3f;
  color: #fff !important;
  transform: translateY(-1px);
}
.hero .hero-actions a.btn.btn-prospekt {
  background-color: #1b6d4f !important;
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(27, 109, 79, 0.45);
}
.hero .hero-actions a.btn.btn-prospekt:hover {
  background-color: #145a3f !important;
  color: #fff !important;
}
.cta .cta-actions a.btn.btn-prospekt {
  background-color: #1b6d4f !important;
  color: #fff !important;
}
.cta .cta-actions a.btn.btn-prospekt:hover {
  background-color: #145a3f !important;
  color: #fff !important;
}
.footer a.btn.btn-prospekt {
  background-color: #1b6d4f !important;
  color: #fff !important;
}
.footer a.btn.btn-prospekt:hover {
  background-color: #145a3f !important;
  color: #fff !important;
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { 
  margin-bottom: 1rem; 
  color: white; 
  text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 4px 40px rgba(0,0,0,0.3);
}
.hero h1 em { font-style: italic; color: var(--color-cta); }
.hero-subtitle { 
  font-size: 1.25rem; 
  color: rgba(255,255,255,0.95); 
  margin-bottom: 2rem; 
  max-width: 480px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.hero .btn { 
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
.hero-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(135deg, rgba(44,62,80,0.03) 0%, transparent 50%), 
              linear-gradient(225deg, rgba(201,162,39,0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}
.hero-slider {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-slider::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
  pointer-events: none;
}
/* Jeden pas zdjęć w rzędzie — sąsiadują ze sobą, więc przy przesuwaniu nie ma pustki między slajdami */
.hero-slider-track {
  display: flex;
  flex-direction: row;
  width: 800%;
  height: 100%;
  animation: heroTrackSlide 35s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  will-change: transform;
}
.hero-slider-track img {
  flex: 0 0 calc(100% / 8);
  width: calc(100% / 8);
  height: 100%;
  object-fit: cover;
}
/* 7 zdjęć + powtórka pierwszego dla pętli */
@keyframes heroTrackSlide {
  0%, 10% { transform: translateX(0); }
  12.5%, 22.5% { transform: translateX(calc(-100% / 8)); }
  25%, 35% { transform: translateX(calc(-100% / 8 * 2)); }
  37.5%, 47.5% { transform: translateX(calc(-100% / 8 * 3)); }
  50%, 60% { transform: translateX(calc(-100% / 8 * 4)); }
  62.5%, 72.5% { transform: translateX(calc(-100% / 8 * 5)); }
  75%, 85% { transform: translateX(calc(-100% / 8 * 6)); }
  87.5%, 100% { transform: translateX(calc(-100% / 8 * 7)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider-track {
    animation: none;
    transform: translateX(0);
    width: 100%;
    will-change: auto;
  }
  .hero-slider-track img {
    display: none;
  }
  .hero-slider-track img:first-child {
    display: block;
    width: 100%;
    flex: none;
  }
}

/* ===== Inwestycje Preview ===== */
.inwestycje-preview { padding: 4rem 0; background: white; }
.inwestycje-preview > .container > h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.inwestycje-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.inwestycje-featured { max-width: 100%; }
.inwestycja-card--featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}
@media (min-width: 768px) {
  .inwestycja-card--featured {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}
.inwestycja-card--featured .inwestycja-card-image {
  aspect-ratio: 16/10;
  min-height: 220px;
}
@media (min-width: 768px) {
  .inwestycja-card--featured .inwestycja-card-image {
    aspect-ratio: auto;
    min-height: 100%;
    min-height: min(52vh, 420px);
  }
}
.inwestycja-card--featured .inwestycja-card-content {
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 900px) {
  .inwestycja-card--featured .inwestycja-card-content {
    padding: 2.25rem 2.5rem 2.5rem;
  }
  .inwestycja-card--featured h3 { font-size: 1.5rem; }
}
.inwestycja-card-lead {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 36em;
}
.inwestycja-card-highlights {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.25rem;
  list-style: disc;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 36em;
}
.inwestycja-card-highlights li { margin-bottom: 0.4rem; }
.inwestycja-card-highlights li::marker { color: var(--color-cta); }
.inwestycja-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  display: block;
  max-width: 100%;
}
.inwestycja-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.inwestycja-card.coming-soon { opacity: 0.85; }
.inwestycja-card-image { aspect-ratio: 4/3; background: var(--color-bg-alt); overflow: hidden; }
.inwestycja-card-image img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--color-text-muted); font-size: 0.9rem;
}
.inwestycja-card-content { padding: 1.5rem; }
.inwestycja-card h3 { margin: 0 0 0.5rem; }
.inwestycja-card .location { color: var(--color-text-muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.inwestycja-card .price-range { font-weight: 600; color: var(--color-accent); margin: 0 0 0.5rem; }
.inwestycja-card-avail {
  font-size: 0.85rem;
  color: #2d6a4f;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.link-arrow { font-size: 0.9rem; color: var(--color-cta); font-weight: 500; }
.inwestycja-card .badge { display: inline-block; background: var(--color-bg-alt); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8rem; margin-top: 0.5rem; }
.inwestycje-map-link { margin-top: 1.5rem; margin-bottom: 0; text-align: center; }
.inwestycje-map-link a { font-weight: 500; color: var(--color-cta); }
.inwestycje-map-link a:hover { text-decoration: underline; }

/* ===== Dlaczego my ===== */
.dlaczego-my { padding: 4rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 2rem; }
.feature { text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature h3 { margin-bottom: 0.5rem; }
.feature p { color: var(--color-text-muted); margin: 0; }

/* ===== CTA ===== */
.cta {
  padding: 4rem 0;
  background: var(--color-accent);
  color: white;
  text-align: center;
}
.cta h2 { color: white; margin-bottom: 0.5rem; }
.cta p { opacity: 0.9; margin-bottom: 1.5rem; }
.cta .btn-secondary { border-color: white; color: white; }
.cta .btn-secondary:hover { background: white; color: var(--color-accent); }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  align-items: center;
}

/* ===== Footer ===== */
.footer { padding: 3rem 0; background: var(--color-bg-alt); color: var(--color-text-muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-logo { font-family: var(--font-display); font-size: 1.25rem; color: var(--color-accent); margin: 0 0 0.5rem; }
.footer-logo img { height: 36px; width: auto; object-fit: contain; display: block; margin-bottom: 0.5rem; }
.footer-logo span { color: var(--color-cta); }

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Page Header ===== */
.page-header {
  padding: 8rem 0 3rem;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.page-header h1 { margin: 0 0 0.5rem; }
.page-header p { color: var(--color-text-muted); margin: 0; }

.page-header-inwestycja .page-header-back { margin-bottom: 1.5rem; }
.page-header-inwestycja .page-header-title { margin: 0 0 1rem; }
.page-header-inwestycja .page-header-address { margin: 0 0 1rem; line-height: 1.5; }
.page-header-inwestycja .page-header-dzialka { display: inline-block; margin-top: 0.35rem; }
.page-header-prospekt-wrap { margin: 0 0 1.25rem; }
.page-header-prospekt-wrap .btn-prospekt { box-shadow: 0 2px 14px rgba(27, 109, 79, 0.35); }
.inwestycja-prospekt-btn-wrap { margin: 0.75rem 0 0; }
.inwestycje-prospekt-row { margin-top: 1.75rem; text-align: center; }
.map-prospekt-row { margin-top: 1.25rem; }
.footer-prospekt { margin-top: 1rem; }

.cennik-lokal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.2rem;
}
.inwestycja-dzialka-nr {
  font-family: ui-monospace, 'Segoe UI Mono', 'Consolas', monospace;
  font-weight: 600;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.badge-dostepny {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b4332;
  background: #d8f3dc;
  border: 1px solid #95d5b2;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ===== Content Pages ===== */
.page-content { padding: 3rem 0; }
.content-section { margin-bottom: 3rem; }
.content-section h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.inwestycja-section-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin: 0 0 1.25rem;
}
.inwestycja-section-title:not(:first-child) {
  margin-top: 2.5rem;
}
.inwestycja-real-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.75rem;
}
.inwestycja-real-row .inwestycja-hero-img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
}
.inwestycja-real-row .inwestycja-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.inwestycja-photo-caption {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}
/* Galerie — min() zapobiega overflow na wąskich ekranach (min 240px > viewport) */
.inwestycja-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem;
}
.inwestycja-gallery .inwestycja-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--color-bg-alt);
}
.inwestycja-gallery .inwestycja-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.inwestycja-hero-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.inwestycja-hero-img img { width: 100%; height: auto; display: block; }
a.inwestycja-lightbox.inwestycja-hero-img {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
  position: relative;
}
.inwestycja-plans-grid a.inwestycja-lightbox.inwestycja-hero-img::after {
  content: 'Kliknij, aby powiększyć';
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  pointer-events: none;
  max-width: calc(100% - 1rem);
  line-height: 1.2;
}
@media (max-width: 768px) {
  .inwestycja-real-row { grid-template-columns: 1fr; }
  .inwestycja-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wizualizacja-disclaimer {
  font-size: 0.8rem;
  color: rgba(92, 92, 92, 0.6);
  margin: -1rem 0 2rem;
}
.inwestycja-intro-block { margin-bottom: 2rem; }
.inwestycja-intro-block > p { max-width: 42rem; }
.inwestycja-intro-block .inwestycja-section-title { margin-top: 0; }
.inwestycja-table-heading { font-size: 1rem; margin: 1.5rem 0 0.5rem; font-weight: 600; }
.inwestycja-table-heading:first-of-type { margin-top: 1rem; }
.inwestycja-subsection-title {
  font-size: 1.1rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}
.inwestycja-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem;
}
.inwestycja-plan-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.inwestycja-plan-item .inwestycja-hero-img {
  margin: 0;
  border-radius: var(--radius);
  aspect-ratio: 3 / 2;
  min-height: 200px;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow);
}
.inwestycja-plan-item .inwestycja-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}
@media (max-width: 900px) {
  .inwestycja-plans-grid {
    grid-template-columns: 1fr;
  }
}
.inwestycja-body > p { max-width: 42rem; margin: 0 0 1rem; }
.inwestycja-body > p:last-child { margin-bottom: 0; }
.inwestycja-atuty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1rem 0 1.5rem;
  max-width: 48rem;
  padding: 0;
  list-style: none;
}
.inwestycja-atuty-grid li {
  position: relative;
  padding-left: 1.35rem;
  line-height: 1.5;
}
.inwestycja-atuty-grid li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-cta);
}
.inwestycja-rozklad {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem 2rem;
  margin: 1rem 0 1.5rem;
  max-width: 48rem;
}
.inwestycja-rozklad h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}
.inwestycja-rozklad ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.inwestycja-instalacje {
  max-width: 42rem;
  margin: 1rem 0 1.5rem;
  padding-left: 1.35rem;
  list-style: disc;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.inwestycja-instalacje-intro {
  margin: 0 0 0.5rem;
  max-width: 42rem;
}
.inwestycja-legal {
  font-size: 0.8rem;
  color: rgba(92, 92, 92, 0.85);
  line-height: 1.5;
  max-width: 40rem;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.table-note {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}
.inwestycja-cennik table td strong { color: var(--color-accent); font-size: 1rem; }

/* ===== Cennik Tables ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}
.table-wrapper.inwestycja-cennik {
  max-width: 100%;
}
.table-wrapper.table-wrapper--wide {
  max-width: 100%;
}
.table-wrapper.table-wrapper--wide table {
  font-size: 0.95rem;
}
#cennik .table-wrapper {
  max-width: 100%;
}
#cennik table {
  font-size: 1rem;
}
#cennik th,
#cennik td {
  padding: 0.65rem 0.9rem;
}
table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.9rem; }
th, td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: var(--color-accent); color: white; font-weight: 600; }
tr:hover { background: #f9f9f9; }
.price-history { font-size: 0.9rem; color: var(--color-text-muted); }
.price-history table th { background: var(--color-bg-alt); color: var(--color-text); }

/* ===== Lightbox (powiększenie zdjęć) ===== */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-sizing: border-box;
}
.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.image-lightbox img {
  max-width: 100%;
  max-height: min(92vh, 1200px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}
.image-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ===== Kontakt ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-email-box {
  background: var(--color-bg-alt);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
}
.contact-email-box h2 { margin-top: 0; margin-bottom: 1rem; font-size: 1.35rem; }
.contact-email-box > p { margin: 0 0 0.75rem; color: var(--color-text-muted); }
.contact-email-big {
  margin: 1rem 0 1.25rem;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
}
.contact-email-big a {
  color: var(--color-accent);
  word-break: break-all;
}
.contact-email-big a:hover { color: var(--color-cta); text-decoration: underline; }
.contact-info p { margin: 0.5rem 0; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===== Documents / Prospekt ===== */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { margin-bottom: 1rem; }
.doc-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.doc-list a:hover { box-shadow: var(--shadow-hover); }
.doc-list a::before { content: "📄"; }

.text-muted { color: var(--color-text-muted); font-size: 0.9rem; margin: 0 0 0.5rem; }

.wkrotce-box { background: var(--color-bg-alt); padding: 1.5rem; border-radius: var(--radius-lg); }
.wkrotce-box h2 { margin-bottom: 0.75rem; }
.wkrotce-box p { margin: 0 0 0.5rem; }
.wkrotce-box p:last-child { margin-bottom: 0; }

/* ===== Map Page ===== */
.map-investments-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.map-investments-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 1rem;
}
.map-investments-list li:last-child { border-bottom: none; }
.map-investments-list strong { color: var(--color-accent); }
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
  height: 70vh;
  min-height: 450px;
}
.map-container iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-link { margin-top: 1rem; }
.map-link a { color: var(--color-accent); font-weight: 500; }
.map-link a:hover { text-decoration: underline; }

/* ===== Telefon / tablet w pionie (≤768px) — desktop powyżej bez zmian ===== */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
    font-size: 15px;
  }
  body {
    overflow-x: clip;
  }
  /* Marginesy boczne — wcześniej tylko ≤640px, więc przy 641–768px był „desktopowy” rozmiar */
  .container {
    padding-left: max(1.15rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.15rem, env(safe-area-inset-right, 0px));
  }
  .logo {
    font-size: 1.15rem;
  }
  h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  /* Przyciski poza hero — kompaktowe; hero ma osobne reguły niżej */
  .btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .btn-sm {
    padding: 0.38rem 0.68rem;
    font-size: 0.76rem;
  }
  .page-content {
    padding: 1.5rem 0;
  }
  .page-header {
    padding: 6rem 0 1.75rem;
  }
  .page-header h1 {
    font-size: 1.5rem;
  }
  .page-header-inwestycja .page-header-address {
    font-size: 0.82rem;
  }
  .page-header-inwestycja .page-header-back a {
    font-size: 0.82rem;
  }
  .inwestycja-section-title {
    font-size: 1.15rem;
  }
  .page-content .inwestycja-section-title { margin-bottom: 0.85rem; }
  /* Hero: slajd (tytuł + lead) z powrotem większy — NIE ruszamy go na rzecz przycisków */
  .hero {
    min-height: 0;
    padding: 5.75rem 0 2.75rem;
  }
  .hero h1 {
    font-size: clamp(1.55rem, 5.5vw, 2.1rem);
    line-height: 1.18;
    margin-bottom: 0.85rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.35rem;
    max-width: 26rem;
  }
  .hero-disclaimer {
    font-size: 0.68rem;
    line-height: 1.4;
    margin-top: 1rem;
  }
  /* Dwa CTA w hero: wąskie (nie full-bleed), ale wysokość jak reszta UI — oba tak samo */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
  }
  .hero-actions .btn {
    width: auto;
    max-width: min(18rem, 100%);
    min-width: 0;
    min-height: 2.85rem;
    align-self: center;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 600;
  }
  .hero .hero-actions a.btn.btn-primary,
  .hero .hero-actions a.btn.btn-prospekt {
    padding: 0.6rem 1rem !important;
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    min-height: 2.85rem !important;
    /* ten sam box co niebieski — bez dodatkowej „obwódki” zmieniającej wysokość */
    border: 2px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .hero .hero-actions a.btn.btn-primary {
    border-color: transparent !important;
  }
  .cta .cta-actions a.btn.btn-prospekt {
    padding: 0.42rem 0.65rem !important;
    font-size: 0.74rem !important;
  }
  /* Opisy inwestycji („O inwestycji”) — osobno, bo bazowo dziedziczą 1rem z body */
  .inwestycja-body,
  .inwestycja-body p {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  .inwestycja-body strong {
    font-weight: 600;
  }
  .inwestycja-instalacje {
    font-size: 0.85rem;
  }
  .inwestycja-instalacje-intro {
    font-size: 0.85rem;
  }
  .inwestycja-atuty-grid li {
    font-size: 0.85rem;
  }
  .inwestycja-rozklad {
    font-size: 0.85rem;
  }
  .inwestycja-rozklad ul {
    font-size: 0.84rem;
  }
  .page-header-prospekt-wrap .btn-prospekt,
  .inwestycja-prospekt-btn-wrap .btn-prospekt {
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
  }
  .inwestycje-prospekt-row .btn-prospekt,
  .map-prospekt-row .btn-prospekt {
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
  }
  .footer-prospekt .btn-prospekt {
    padding: 0.38rem 0.65rem;
    font-size: 0.74rem;
  }
  .inwestycje-preview {
    padding: 2rem 0;
  }
  .inwestycje-preview > .container > h2 {
    margin-bottom: 1.25rem;
  }
  .inwestycja-card--featured {
    min-width: 0;
  }
  .inwestycja-card--featured .inwestycja-card-image,
  .inwestycja-card--featured .inwestycja-card-content {
    min-width: 0;
  }
  .inwestycja-card--featured .inwestycja-card-image {
    min-height: 160px;
    aspect-ratio: 16 / 10;
  }
  .inwestycja-card--featured .inwestycja-card-content {
    padding: 1rem 0.85rem 1.15rem;
  }
  .inwestycja-card--featured h3 {
    font-size: 1.05rem;
  }
  .inwestycja-card-lead {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 0.65rem;
  }
  .inwestycja-card-highlights {
    font-size: 0.78rem;
    margin-bottom: 0.85rem;
  }
  .inwestycja-card .price-range {
    font-size: 0.95rem;
  }
  .inwestycja-card-avail {
    font-size: 0.78rem;
  }
  .link-arrow {
    font-size: 0.8rem;
  }
  .dlaczego-my {
    padding: 2.25rem 0;
  }
  .feature-icon {
    font-size: 1.85rem;
  }
  .feature h3 {
    font-size: 1rem;
  }
  .feature p {
    font-size: 0.85rem;
  }
  .cta {
    padding: 2.25rem 0;
  }
  .cta h2 {
    font-size: 1.25rem;
  }
  .cta p {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
  }
  .cta-actions .btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 0.42rem 0.65rem;
    font-size: 0.74rem;
  }
  .footer {
    padding: 1.75rem 0;
    font-size: 0.82rem;
  }
  .inwestycja-gallery {
    gap: 0.45rem;
  }
  .inwestycja-plan-item .inwestycja-hero-img {
    min-height: 0;
  }
  .inwestycja-plans-grid a.inwestycja-lightbox.inwestycja-hero-img::after {
    font-size: 0.55rem;
    padding: 0.18rem 0.32rem;
  }
  .inwestycja-section-title:not(:first-child) {
    margin-top: 1.5rem;
  }
  .inwestycja-subsection-title {
    font-size: 0.98rem;
  }
  .text-muted {
    font-size: 0.8rem !important;
  }
  table {
    font-size: 0.78rem;
  }
  table caption {
    font-size: 0.82rem;
    padding-bottom: 0.45rem;
  }
  th,
  td {
    padding: 0.32rem 0.4rem;
    font-size: 0.78rem;
  }
  #cennik th,
  #cennik td {
    font-size: 0.8rem;
    padding: 0.38rem 0.45rem;
  }
  .inwestycja-cennik table td strong {
    font-size: 0.92rem;
  }
  .table-note {
    font-size: 0.72rem;
  }
  .map-container {
    height: 50vh;
    min-height: 240px;
  }
  .image-lightbox-close {
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}
