/* LIVERO — main.css
   Zmienne, reset, przyciski, wzorce modali/formularza przeniesione 1:1 z poprzedniej wersji strony
   (zachowanie kolorystyki, typografii i charakteru — wymóg klienta). Nowe komponenty (Apartamenty,
   Udogodnienia, Lokalizacja+mapa, FAQ, mobilny pasek CTA, przełącznik języka) budowane w tej samej
   konwencji nazewnictwa klas. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange: #D96A12;
  --orange-light: #E8801F;
  --dark: #1C1C1A;
  --dark2: #2A2A27;
  --mid: #6B6B65;
  --light: #F7F6F3;
  --white: #FEFEFE;
  --border: #E3E2DE;
  --serif: 'DM Serif Display', serif;
  --sans: 'DM Sans', sans-serif;
  --nav-height: 64px;
  --mobile-cta-height: 64px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--dark); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; display: block; }

/* ── NAVBAR (sticky) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: var(--nav-height);
  background: rgba(254,254,254,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s, transform 0.3s ease;
}
nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.08); }
nav.nav-hidden { transform: translateY(-100%); }

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 34px; width: auto; }
@media (min-width: 1025px) {
  .nav-logo img { height: 46px; }
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--dark); transition: color 0.2s; }
.nav-links a:hover { color: var(--orange); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--dark); text-decoration: none;
}
.nav-phone svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; stroke-width: 2; }
.nav-phone:hover { color: var(--orange); }

/* przełącznik języka */
.lang-switcher { position: relative; }
.lang-switcher-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; box-sizing: border-box;
  background: transparent; border: 1.5px solid var(--border); border-radius: 4px;
  padding: 0 14px; cursor: pointer; font-family: var(--sans);
  font-size: 12px; font-weight: 600; color: var(--dark); text-transform: uppercase;
}
.lang-switcher-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.lang-switcher-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12); min-width: 120px; overflow: hidden; z-index: 10;
}
.lang-switcher.open .lang-switcher-menu { display: block; }
.lang-switcher-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 14px; font-family: var(--sans); font-size: 13px; color: var(--dark); cursor: pointer;
}
.lang-switcher-menu button:hover { background: var(--light); }
.lang-switcher-menu button.active { color: var(--orange); font-weight: 700; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; z-index: 110;
}
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none; position: fixed; left: 0; right: 0; top: var(--nav-height); height: calc(100vh - var(--nav-height)); z-index: 99;
  background: var(--white); flex-direction: column; justify-content: center;
  padding: 0 32px; border-top: 1px solid var(--border);
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a { font-size: 22px; font-weight: 500; color: var(--dark); text-decoration: none; padding: 18px 0; border-bottom: 1px solid var(--border); display: block; }
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer-phone { display: flex; align-items: center; gap: 10px; padding: 20px 0; font-size: 18px; font-weight: 600; color: var(--orange); text-decoration: none; border-bottom: 1px solid var(--border); }
.nav-drawer-phone-icon { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--orange); fill: none; stroke-width: 2; }
.nav-drawer-cta { text-align: center; margin-top: 20px; padding: 15px; font-size: 14px; }

/* ── BUTTONS ── */
.btn-orange {
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 20px; border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none; display: inline-block;
}
.btn-orange:hover { background: var(--orange-light); transform: translateY(-1px); }
.nav-cta-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; box-sizing: border-box; padding: 0 20px; }
.btn-outline {
  background: transparent; color: var(--dark); border: 1.5px solid rgba(28,28,26,0.35); cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 20px; border-radius: 4px; transition: border-color 0.2s, color 0.2s, transform 0.15s;
  text-decoration: none; display: inline-block;
}
.btn-outline:hover { border-color: var(--dark); transform: translateY(-1px); }
.btn-block { display: flex; align-items: center; justify-content: center; width: 100%; gap: 8px; }

.section-label { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.section-title { font-family: var(--serif); font-size: clamp(28px, 3.5vw, 48px); line-height: 1.1; margin-bottom: 20px; }
.section-text { font-size: 15px; line-height: 1.75; color: var(--mid); margin-bottom: 28px; }

/* ── HERO ──
   Zdjęcie na pełną szerokość/wysokość, karta z treścią pływa na nim (ciemne szkło: czarne tło,
   przezroczystość, blur, delikatnie zaokrąglone rogi). */
.hero { margin-top: var(--nav-height); position: relative; min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; overflow: hidden; }
.hero-image-col { position: absolute; inset: 0; z-index: 0; }
.hero-image-col img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-content {
  position: relative; z-index: 2; max-width: 540px; margin: 48px;
  background: rgba(10,10,10,0.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 14px;
  padding: 48px 44px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-badge {
  display: inline-flex; align-self: flex-start; background: var(--white); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16); border-radius: 30px; padding: 8px 18px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange);
}
.hero-title { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 52px); line-height: 1.1; color: #fff; white-space: pre-line; margin-top: 4px; }
.hero-address { font-size: 16px; font-weight: 400; color: #fff; line-height: 1.4; }
.hero-furnished { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); margin-top: -6px; }
.hero-price { font-family: var(--serif); font-size: 26px; color: var(--orange-light); }
.hero-cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 10px; }
.hero-phone-btn { display: inline-flex; align-items: center; gap: 9px; }
.hero-phone-btn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }
.hero-scroll-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; }
.hero-scroll-link svg { width: 15px; height: 15px; stroke: var(--orange-light); fill: none; stroke-width: 2; }
.hero-scroll-link:hover { color: var(--orange-light); }

/* ── HERO — animacja wejścia ──
   Tylko compositor-friendly właściwości (transform, opacity) — bez wpływu na layout/CLS, bez JS.
   Zdjęcie (kandydat LCP) animuje wyłącznie transform, nie opacity, żeby nie opóźniać pomiaru LCP.
   Wyłączone całkowicie przy prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-image-col img {
    transform-origin: center;
    animation: heroImgSettle 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-content {
    animation: heroCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-content > * {
    opacity: 0;
    animation: heroItemIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero-content > *:nth-child(1) { animation-delay: 0.3s; }
  .hero-content > *:nth-child(2) { animation-delay: 0.38s; }
  .hero-content > *:nth-child(3) { animation-delay: 0.46s; }
  .hero-content > *:nth-child(4) { animation-delay: 0.54s; }
  .hero-content > *:nth-child(5) { animation-delay: 0.62s; }
  .hero-content > *:nth-child(6) { animation-delay: 0.7s; }
}
@keyframes heroImgSettle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes heroCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroItemIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE STICKY CTA ── */
.mobile-cta-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  height: var(--mobile-cta-height); background: var(--white); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform 0.3s ease;
}
.mobile-cta-bar.cta-hidden { transform: translateY(100%); }
.mobile-cta-bar-inner { display: flex; height: var(--mobile-cta-height); }
.mobile-cta-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 700; text-decoration: none; }
.mobile-cta-call { background: var(--dark); color: #fff; }
.mobile-cta-inquire { background: var(--orange); color: #fff; }
.mobile-cta-bar svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── APARTAMENTY ── */
.section-apartments { padding: 80px 48px; background: var(--white); }
.apartments-header { text-align: center; margin-bottom: 40px; }
.apartments-header .section-label { display: inline-block; }
.apartments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.apartment-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  cursor: pointer; transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.3s;
}
.apartment-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
.apartment-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--light); display: flex; align-items: center; justify-content: center; }
.apartment-card-img img { width: 100%; height: 100%; object-fit: cover; }
.apartment-card-img.placeholder svg { width: 40px; height: 40px; stroke: var(--border); fill: none; stroke-width: 1.4; }
.apartment-card-body { padding: 18px 20px; }
.apartment-card-name { font-family: var(--serif); font-size: 20px; margin-bottom: 6px; }
.apartment-card-meta { font-size: 13px; color: var(--mid); margin-bottom: 4px; }
.apartment-card-price { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 14px; }
.apartment-card-price span { color: var(--mid); font-weight: 500; }
.apartment-card .btn-outline { width: 100%; text-align: center; }

/* ── LIGHTBOX (bazowy — reużywany dla apartamentu, lokalizacji, kontaktu) ── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.lightbox.open { pointer-events: all; opacity: 1; }
/* Modal "Wyślij zapytanie" otwarty NAD zaparkowanym modalem apartamentu (patrz .lightbox-parked
   niżej) musi wyrenderować się nad nim i wjechać ładnie z prawej, zamiast standardowego "unoszenia". */
.lightbox-stacked { z-index: 210; }
.lightbox-stacked .lightbox-panel { transform: translateX(48px) scale(0.97); }
.lightbox-stacked.open .lightbox-panel { transform: translateX(0) scale(1); }
.lightbox-backdrop {
  position: absolute; inset: 0; background: rgba(28,28,26,0.65); backdrop-filter: blur(6px);
  transition: background 0.35s;
}
.lightbox-panel {
  position: relative; z-index: 1; background: var(--white); border-radius: 8px;
  width: min(880px, 92vw); max-height: 90vh; overflow-y: auto; padding: 40px;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.35s ease;
  box-shadow: 0 32px 80px rgba(0,0,0,0.22);
  opacity: 1;
}
.lightbox.open .lightbox-panel { transform: translateY(0) scale(1); }
.lightbox-panel.narrow { width: min(540px, 94vw); }
/* "Parkowanie" modalu apartamentu: gdy z jego wnętrza otworzy się "Wyślij zapytanie", modal nie
   zamyka się — chowa się w prawo i znika (opacity), a tło robi się mocniej ciemne pod modalem
   formularza. Po zamknięciu formularza klasa jest zdejmowana i modal wraca dokładnie na miejsce. */
.lightbox-parked .lightbox-panel {
  transform: translateX(10%) scale(0.94);
  opacity: 0;
  pointer-events: none;
}
.lightbox-parked .lightbox-backdrop { background: rgba(20,19,17,0.82); }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--white); font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--mid); transition: background 0.2s, color 0.2s;
}
.lightbox-close:hover { background: var(--light); color: var(--dark); }
.lightbox-header { margin-bottom: 24px; }
.lightbox-header h2 { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.lightbox-header p { font-size: 14px; color: var(--mid); line-height: 1.6; }
.exit-intent-header { text-align: center; }
.exit-intent-panel .btn-block { margin-top: 4px; }

/* ── Modal apartamentu: nagłówek oddzielony linią + dwie kolumny (opisy / galeria) ── */
.apartment-modal-panel {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  width: 90%; max-height: 90vh; max-width: 1440px;
}
.apartment-modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-shrink: 0; padding: 22px 40px; border-bottom: 1px solid var(--border);
}
.apartment-modal-header-title { font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--dark); }
.lightbox-close-lg { position: static; width: 44px; height: 44px; font-size: 24px; flex-shrink: 0; }
.apartment-modal-body { overflow-y: auto; min-height: 0; padding: 32px 40px; }
.apartment-modal-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 44px; }
.apartment-modal-col-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.apartment-modal-desc { font-size: 14px; color: var(--mid); line-height: 1.6; }
.apartment-modal-col-gallery { min-width: 0; position: sticky; top: 0; }
/* Przyciski przypięte do dołu lewej kolumny — niezależnie od tego, ile miejsca zajmie opis nad nimi. */
.apartment-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 6px; }
.apartment-modal-actions .btn-outline svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Tabelka "faktów" (pokoje/metraż/cena) zamiast pojedynczej linijki tekstu */
.apartment-facts-table { width: 100%; border-collapse: collapse; }
.apartment-facts-table tr { border-bottom: 1px solid var(--border); }
.apartment-facts-table tr:last-child { border-bottom: none; }
.apartment-facts-table th, .apartment-facts-table td { padding: 11px 0; }
.apartment-facts-table th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--mid); font-family: var(--sans);
}
.apartment-facts-table td { text-align: right; font-size: 15px; font-weight: 700; color: var(--dark); }

/* Ramka "Wybierz swój styl" — przełącznik stylu + jego opis, nad tabelką faktów */
.apartment-style-box {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px;
}
.apartment-style-box-title { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dark); }

/* przełącznik stylu w lightboxie apartamentu */
.style-switcher { display: flex; gap: 8px; margin-bottom: 0; flex-wrap: wrap; }
.style-switcher button {
  background: var(--light); border: 1.5px solid var(--border); border-radius: 30px;
  padding: 8px 18px; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--dark);
  cursor: pointer; transition: all 0.2s;
}
.style-switcher button.active,
.style-switcher button:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.style-desc { font-size: 14px; color: var(--mid); line-height: 1.6; margin-bottom: 0; padding-top: 14px; border-top: 1px solid var(--border); }

/* Duże zdjęcie 16:9 nad poziomym paskiem miniaturek (nie po prawej stronie). */
.apartment-modal-col-gallery { display: flex; flex-direction: column; gap: 12px; }
.modal-main-img-wrap { min-width: 0; aspect-ratio: 16/9; border-radius: 4px; overflow: hidden; background: var(--light); }
.modal-main-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.25s; }
.modal-main-img-wrap img.fading { opacity: 0; }
.modal-thumbs { display: flex; flex-direction: row; flex-shrink: 0; width: auto; gap: 10px; overflow-x: auto; overflow-y: visible; }
.modal-thumb { flex: 0 0 94px; width: 94px; aspect-ratio: 16/9; border-radius: 3px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s, opacity 0.2s; opacity: 0.65; flex-shrink: 0; }
.modal-thumb:hover { opacity: 0.9; }
.modal-thumb.active { border-color: var(--orange); opacity: 1; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── UDOGODNIENIA ── */
.section-amenities { padding: 80px 48px; background: var(--light); }
.amenities-header { text-align: center; margin-bottom: 44px; }
.amenities-header .section-label { display: inline-block; }
.amenities-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.amenity-tile {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 26px 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.amenity-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--light); display: flex; align-items: center; justify-content: center; }
.amenity-icon svg { width: 20px; height: 20px; stroke: var(--orange); fill: none; stroke-width: 1.8; }
.amenity-text { font-size: 14px; font-weight: 600; color: var(--dark); line-height: 1.4; }

/* ── LOKALIZACJA ── */
.section-location { padding: 80px 48px; background: var(--white); }
.location-grid { display: grid; grid-template-columns: 40% 60%; gap: 48px; align-items: start; }
.location-highlights { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 24px 0 28px; }
.location-highlight-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -10px;
  border-bottom: 1px solid var(--border); border-radius: 6px; transition: background-color 0.2s;
}
.location-highlight-item:last-child { border-bottom: none; }
.location-highlight-item:hover { background-color: rgba(217, 106, 18, 0.08); }
.location-highlight-item[data-marker-id] { cursor: pointer; }
.location-nearby-list { margin-top: 16px; }
.location-nearby-list[hidden] { display: none; }
.location-nearby-link {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0;
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--orange); cursor: pointer;
}
.location-nearby-link:hover { color: var(--orange-light); }
.location-nearby-link svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.location-nearby-link[data-nearby-collapse] { margin-top: 4px; }
.location-nearby-link[data-nearby-collapse] svg { transform: rotate(180deg); }
.location-nearby-link[hidden] { display: none; }
.location-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.location-phone-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 1024px) {
  .location-phone-btn { display: none; }
}
.location-highlight-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.location-highlight-icon svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; stroke-width: 1.8; }
.location-highlight-label { font-size: 14px; font-weight: 600; color: var(--dark); }
.location-highlight-time { font-size: 13px; color: var(--mid); margin-left: auto; text-align: right; white-space: nowrap; }
.location-map-col { border-radius: 8px; overflow: hidden; background: var(--light); position: relative; min-height: 540px; }
.location-map-frame { width: 100%; height: 100%; min-height: 540px; border: 0; display: block; }
.location-map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--light); }
.location-map-loading svg { width: 32px; height: 32px; stroke: var(--orange); fill: none; stroke-width: 1.5; opacity: 0.5; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 0.7; } }
/* Blokada mapy na mobile — dotyk najpierw aktywuje mapę, dopiero potem przesuwa/zoomuje ją,
   żeby przewijanie strony przez mapę nie „łapało” gestu zamiast scrollować całą stronę. */
.location-map-lock {
  position: absolute; inset: 0; z-index: 5; display: none;
  align-items: center; justify-content: center; background: rgba(20,19,17,0.1);
  border: none; cursor: pointer; padding: 0;
}
.location-map-lock span {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(20,19,17,0.85); color: #fff;
  font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 999px;
}
.location-map-lock svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.location-map-lock.is-unlocked { display: none !important; }
.location-map-directions {
  position: absolute; left: 16px; bottom: 16px; z-index: 10;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.leaflet-custom-pin { background: none; border: none; }
.leaflet-custom-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }
.leaflet-custom-category-pin { background: none; border: none; }
.category-pin { position: relative; width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.category-pin-tail {
  position: absolute; left: 50%; top: 20px; width: 14px; height: 14px;
  background: var(--white); border: 2px solid var(--orange);
  transform: translateX(-50%) rotate(45deg); border-radius: 0 0 4px 0; z-index: 1;
}
.category-pin-circle {
  position: absolute; left: 50%; top: 0; width: 32px; height: 32px; transform: translateX(-50%);
  border-radius: 50%; background: var(--white); border: 2px solid var(--orange); z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.category-pin-circle svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; }

/* ── FAQ ── */
.section-faq { padding: 56px 48px 72px; background: var(--light); width: 100%; }
.faq-inner { max-width: 900px; margin: 0 auto; }
.faq-header { text-align: center; margin-bottom: 40px; }
.faq-header .section-label { display: inline-block; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.faq-item[hidden] { display: none; }
.faq-question {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--dark);
}
.faq-question svg { width: 16px; height: 16px; stroke: var(--orange); fill: none; stroke-width: 2; flex-shrink: 0; transition: transform 0.25s; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 22px 20px; font-size: 14px; color: var(--mid); line-height: 1.65; }
.faq-more { display: block; margin: 28px auto 0; background: none; border: 1.5px solid var(--border); border-radius: 4px; padding: 12px 28px; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dark); cursor: pointer; }
.faq-more:hover { border-color: var(--dark); }

/* ── KONTAKT (ciemne tło, edytorialny układ) ── */
.section-contact { padding: 96px 48px; background: var(--dark); color: rgba(255,255,255,0.7); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 1160px; margin: 0 auto; align-items: start; }
.contact-info-col .section-title { color: #fff; margin-bottom: 28px; }
.contact-address-block { display: flex; flex-direction: column; gap: 3px; font-size: 15px; color: rgba(255,255,255,0.65); margin-bottom: 36px; }
.contact-inline-fact { margin-bottom: 28px; }
.contact-inline-fact .section-label { margin-bottom: 8px; }
.contact-label-white { color: #fff; }
.contact-big-link { display: inline-block; font-family: var(--serif); font-size: 26px; color: var(--orange-light); text-decoration: none; word-break: break-word; background: none; border: none; padding: 0; cursor: pointer; }
.contact-big-link:hover { color: var(--orange); }

.contact-form-panel {
  background: var(--dark2); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 36px;
}
.contact-form-panel h3 { font-family: var(--serif); font-size: 26px; color: #fff; margin: 6px 0 8px; }
.contact-form-sub { font-size: 14px; color: rgba(255,255,255,0.55); margin-bottom: 24px; }
.contact-form-panel .contact-form { gap: 16px; }
.contact-form-panel .form-group label { color: rgba(255,255,255,0.6); }
.contact-form-panel .form-group input,
.contact-form-panel .form-group textarea {
  background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.15); color: #fff;
}
.contact-form-panel .form-group input::placeholder,
.contact-form-panel .form-group textarea::placeholder { color: rgba(255,255,255,0.35); }
.contact-form-panel .form-group input:focus,
.contact-form-panel .form-group textarea:focus { border-color: var(--orange); background: rgba(255,255,255,0.07); }
.contact-form-panel .form-consent { color: rgba(255,255,255,0.5); }
.contact-form-panel .form-consent strong { color: #fff; }
.contact-form-panel .apartment-checkbox { color: rgba(255,255,255,0.8); }

/* ── FORMULARZ (reużywany w lightboxie) ── */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--dark); }
.form-group input, .form-group textarea, .form-group select {
  font-family: var(--sans); font-size: 14px; color: var(--dark); border: 1.5px solid var(--border); border-radius: 4px;
  padding: 11px 14px; background: var(--white); transition: border-color 0.2s, box-shadow 0.2s; outline: none; width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(217,106,18,0.12); }
.form-group.full { grid-column: 1 / -1; }

/* Walidacja pól w czasie rzeczywistym (po opuszczeniu pola) — ikona ✓/✗ + komunikat błędu */
.field-input-wrap { position: relative; }
.field-input-wrap input { padding-right: 38px; }
.field-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; }
.field-icon svg { width: 17px; height: 17px; display: none; }
.field-icon.valid .icon-valid { display: block; color: #1a7a44; }
.field-icon.invalid .icon-invalid { display: block; color: #c0392b; }
.field-input-wrap input.field-valid { border-color: #1a7a44; }
.field-input-wrap input.field-invalid { border-color: #c0392b; }
.field-error { font-size: 11.5px; color: #c0392b; min-height: 0; display: none; }
.field-error.visible { display: block; }
.contact-form-panel .field-error { color: #ff8a7a; }
.hp-field { display: none !important; }

.apartment-checkboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.apartment-checkbox {
  display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--dark);
  border: 1.5px solid var(--border); border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.apartment-checkbox:has(input:checked) { border-color: var(--orange); background: rgba(217,106,18,0.06); }
.apartment-checkbox input[type="checkbox"] { accent-color: var(--orange); width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0; }
.contact-form-panel .apartment-checkbox { border-color: rgba(255,255,255,0.15); }
.contact-form-panel .apartment-checkbox:has(input:checked) { border-color: var(--orange); background: rgba(217,106,18,0.12); }
@media (max-width: 420px) {
  .apartment-checkboxes { grid-template-columns: 1fr; }
}

.form-consent { font-size: 12px; color: var(--mid); line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.form-consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--orange); width: 15px; height: 15px; }
.form-consent a { color: var(--orange); }
.form-consent strong { color: var(--dark); }
.consent-body { flex: 1; min-width: 0; }
.consent-text-wrap {
  display: block; line-height: 1.5; max-height: 3em; overflow: hidden;
}
.form-consent.expanded .consent-text-wrap { max-height: none; overflow: visible; }
.form-consent.invalid { color: #c0392b; }
.form-consent.invalid input[type="checkbox"] { outline: 2px solid #c0392b; outline-offset: 2px; }
.form-consent.invalid strong { color: #c0392b; }
.consent-toggle {
  display: block; margin-top: 3px; background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 11.5px; font-weight: 700; color: var(--orange);
}
/* Mój `display: block` powyżej ma wyższy priorytet niż domyślny styl przeglądarki dla [hidden] —
   bez tej reguły przycisk zostawał widoczny nawet z atrybutem hidden ustawionym przez JS. */
.consent-toggle[hidden] { display: none; }
.contact-form-panel .consent-toggle { color: var(--orange-light); }

.form-submit {
  background: var(--orange); color: #fff; border: none; cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 14px 28px; border-radius: 4px;
  transition: background 0.2s, transform 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.form-submit:hover:not(:disabled) { background: var(--orange-light); transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.form-msg { display: none; padding: 14px 16px; border-radius: 4px; font-size: 14px; font-weight: 500; }
.form-msg.success { background: #ecf8f1; color: #1a6e3d; border: 1px solid #a7d7bb; display: block; }
.form-msg.error { background: #fef2f0; color: #9a2f20; border: 1px solid #f0b4ac; display: block; }

/* ── Strona podziękowania (dziekujemy.php) po wysłaniu formularza kontaktowego ── */
.form-success-page {
  min-height: 90vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #2b2b28 0%, #1c1c1a 55%, #151513 100%);
}
.form-success { position: relative; z-index: 1; text-align: center; max-width: 480px; padding: 32px 8px 8px; }
.form-success-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 20px;
  background: #ecf8f1; color: #1a6e3d; display: flex; align-items: center; justify-content: center;
}
.form-success-icon svg { width: 26px; height: 26px; stroke-width: 2.6; }
.form-success h3 { font-family: var(--serif); font-size: 26px; color: #fff; margin-bottom: 10px; }
.form-success p { color: rgba(255,255,255,0.62); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.form-success-actions { display: flex; flex-direction: column; gap: 10px; }
.form-success-actions svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.form-success-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,0.35); }
.form-success-actions .btn-outline:hover { border-color: #fff; }

/* Delikatne serpentyny/konfetti — jednorazowy "burst" przy wejściu na stronę (main.js). */
.confetti-piece {
  position: absolute; top: -24px; z-index: 0; border-radius: 1px;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  100% { transform: translateY(105vh) rotate(600deg); opacity: 0; }
}
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
.form-submit.loading .spinner { display: block; }
.form-submit.loading .btn-text { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ── */
footer { background: var(--white); color: var(--mid); padding: 40px 48px 88px; border-top: 1px solid var(--border); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 28px; }
.footer-logo img { height: 26px; }
.footer-right { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; margin-left: auto; }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--dark); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 14px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--mid); }
.footer-social a:hover { color: var(--orange); border-color: var(--orange); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--mid); }
.footer-bottom a { color: var(--mid); text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }
.footer-disclaimer { margin-top: 14px; font-size: 10px; line-height: 1.5; color: var(--mid); opacity: 0.75; }
.footer-credit { margin-top: 14px; text-align: center; font-size: 11px; }
.footer-credit a { color: var(--mid); text-decoration: none; }
.footer-credit a:hover { color: var(--orange); }

/* ── ANIMATIONS / UTIL ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94); }
.reveal.visible { opacity: 1; transform: translateY(0); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff; padding: 10px 16px; z-index: 1000; }
.skip-link:focus { left: 12px; top: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .nav-cta-btn { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; }
  .mobile-cta-bar { display: block; }
  body { padding-bottom: var(--mobile-cta-height); }

  /* Mobile: zdjęcie osobnym blokiem u góry BEZ overlayu, treść pod spodem na ciemnym,
     delikatnie gradientowym tle (nie floating card jak na desktopie). */
  .hero { flex-direction: column; align-items: stretch; min-height: auto; }
  .hero-image-col { position: relative; width: 100%; height: 62vw; min-height: 220px; max-height: 420px; }
  .hero-content {
    position: relative; margin: 0; max-width: 100%; width: 100%; padding: 32px 24px;
    border: none; border-radius: 0;
    background: linear-gradient(180deg, #201f1c 0%, #141311 100%);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }

  .section-apartments { padding: 56px 0 56px 20px; }
  .apartments-header { padding-right: 20px; }
  .apartments-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-right: 20px; gap: 14px; touch-action: pan-x; }
  .apartment-card { scroll-snap-align: start; }

  .section-amenities { padding: 56px 20px; }
  .amenities-grid { grid-template-columns: 1fr 1fr; }

  .section-location { padding: 56px 20px; }
  .location-grid { grid-template-columns: 1fr; }
  .location-map-col { min-height: 280px; }
  .location-map-frame { min-height: 280px; }
  .location-map-lock { display: flex; }

  .section-faq { padding: 56px 20px; }
  .section-contact { padding: 56px 20px; }
  .contact-grid { grid-template-columns: 1fr; }

  footer { padding: 32px 20px 96px; }
  .lightbox-panel { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }

  /* Modal apartamentu na tablecie/mobile: jedna kolumna, węższe odstępy. Kolejność inna niż w DOM
     (desktop: opis nad tabelą po lewej, galeria po prawej) — na mobile ma być: ramka stylu, duże
     zdjęcie, miniaturki, dopiero potem tabela/opis/przyciski. Zamiast duplikować markup, kolumny
     .apartment-modal-col-info/-gallery stają się "przezroczyste" (display:contents) i ich dzieci
     trafiają bezpośrednio do siatki, gdzie ustawiamy im kolejność przez `order`. */
  .apartment-modal-panel { width: 94%; max-height: 92vh; }
  .apartment-modal-header { padding: 16px 24px; }
  .apartment-modal-header-title { font-size: 21px; }
  .apartment-modal-body { padding: 24px; }
  .apartment-modal-grid { grid-template-columns: 1fr; gap: 20px; }
  .apartment-modal-col-info,
  .apartment-modal-col-gallery { display: contents; }

  .apartment-style-box { order: 1; }
  .modal-main-img-wrap { order: 2; }
  .modal-thumbs { order: 3; }
  .apartment-facts-table { order: 4; }
  .apartment-modal-desc { order: 5; }
  .apartment-modal-actions { order: 6; margin-top: 4px; }

  /* Miniaturki na mobile: mniejsze niż na desktopie, przewijane dotykiem (scroll-snap) —
     duże zdjęcie 16:9 zostaje widoczne na każdej szerokości ekranu, tylko miniaturki się zmniejszają. */
  .modal-thumbs {
    display: flex; flex-direction: row; width: auto; overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    gap: 8px; margin: 0 -24px; padding: 0 24px;
  }
  .modal-thumbs::-webkit-scrollbar { display: none; }
  .modal-thumb {
    flex: 0 0 76px; width: 76px; scroll-snap-align: start; aspect-ratio: 16/9; opacity: 1; border-width: 1px; border-color: var(--border);
  }
  .modal-thumb.active { border-color: var(--orange); }
}

@media (max-width: 640px) {
  .hero-title { font-size: clamp(30px, 8vw, 44px); }
  .section-title { font-size: clamp(26px, 6vw, 36px); }
  .modal-thumb { flex: 0 0 64px; width: 64px; }
}
