/* ================================================================
   ZARZĄD NIERUCHOMOŚCI „OSIEDLE” — arkusz stylów
   ----------------------------------------------------------------
   Struktura:
     1. Zmienne (kolory, odstępy) — TU zmieniasz kolor akcentowy
     2. Reset i typografia
     3. Layout / kontenery
     4. Przyciski
     5. Nagłówek i nawigacja (+ menu mobilne)
     6. Hero
     7. Sekcje i wspólne elementy (karty, statystyki)
     8. Poszczególne sekcje
     9. Formularz
    10. Stopka
    11. Responsywność (media queries)
    12. Animacje (fade-in przy przewijaniu)
   ================================================================ */

/* ---------- 1. ZMIENNE ---------- */
:root {
  /* Kolory bazowe — paleta dopasowana do logo M-DOM (błękit #1596d8) */
  --brand:       #1596d8;   /* kolor marki z logo */
  --navy:        #0c3a5b;   /* granat z tego samego odcienia błękitu — nagłówki */
  --navy-700:    #145280;
  --accent:      #1596d8;   /* akcent = kolor logo */
  --accent-600:  #0f7cb8;   /* ciemniejszy błękit — stany hover */
  --danger:      #c0392b;   /* czerwień — sytuacje pilne */
  --danger-600:  #a5321f;

  --bg:          #ffffff;
  --bg-alt:      #eef5fb;   /* bardzo jasny błękit dla sekcji naprzemiennych */
  --surface:     #ffffff;
  --border:      #dbe6f0;

  --text:        #17262f;   /* prawie czarny, chłodny */
  --text-muted:  #566b7b;
  --text-light:  #ffffff;

  /* Typografia i kształty */
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 6px 24px rgba(12, 58, 91, .10);
  --shadow-lg:   0 16px 48px rgba(12, 58, 91, .16);

  --container:   1160px;
  --gap:         clamp(1rem, 3vw, 2rem);
}

/* ---------- 2. RESET I TYPOGRAFIA ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; /* offset pod sticky header */ }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-600); }

img, svg, iframe { max-width: 100%; }

/* Ikony inline SVG — jednolity styl kreskowy */
.icon, .card-icon svg, .logo-icon, .doc-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.15em; }

/* ---------- 3. LAYOUT / KONTENERY ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.container-narrow { max-width: 820px; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 .6rem;
}
.eyebrow-light { color: rgba(255,255,255,.85); }

/* ---------- 4. PRZYCISKI ---------- */
.btn {
  --btn-bg: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .98rem;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s, background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  line-height: 1.1;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-600); color: #fff; }

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

.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { color: var(--accent); }

/* warianty jasne (na ciemnym tle) */
.btn-light { background: #fff; color: var(--danger); }
.btn-light:hover { background: #f1f1f1; color: var(--danger); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- 5. NAGŁÓWEK I NAWIGACJA ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--navy); }
.logo:hover { color: var(--navy); }
/* Logo M-DOM (dom) — wypełnienie kolorem marki, biały w stopce */
.logo-mark { width: 42px; height: 38px; flex: none; fill: var(--brand); }
.logo-icon { width: 34px; height: 34px; stroke: var(--accent); flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1.02rem; font-weight: 700; }
.logo-text em { font-style: normal; font-size: .82rem; color: var(--text-muted); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: .5rem .8rem;
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  border-radius: var(--radius-sm);
}
.main-nav a:hover { color: var(--accent); background: var(--bg-alt); }

.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-left: auto; }

/* Rozwijany przycisk (dropdown) — np. „Wzory dokumentów” */
.dropdown { position: relative; display: inline-flex; }
.dropdown-toggle { cursor: pointer; }
.dropdown-toggle .caret { transition: transform .2s; }
.dropdown.open .dropdown-toggle .caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  min-width: 270px;
  max-height: 70vh;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: .4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  /* stan ukryty + animacja */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
  display: block;
  padding: .55rem .7rem;
  border-radius: 7px;
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.35;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus { background: var(--bg-alt); color: var(--accent); outline: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 11px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--navy); border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. HERO ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(21,150,216,.10), transparent 60%),
    linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-lead { font-size: 1.15rem; color: var(--text-muted); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; padding: 0; margin: 0; }
.hero-badges li { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.hero-badges .icon { color: var(--accent); }

/* Ilustracja hero (SVG) */
.hero-visual { display: flex; justify-content: center; }
.hero-illustration { width: 100%; max-width: 460px; filter: drop-shadow(var(--shadow-lg)); }
/* Logo jako grafika hero */
.hero-logo { width: 100%; max-width: 340px; height: auto; }
.hi-sky { fill: #eaf1f8; }
.hi-b1  { fill: var(--navy); }
.hi-b2  { fill: var(--navy-700); }
.hi-b3  { fill: var(--accent); }
.hi-win rect { fill: #ffd66b; opacity: .9; }
.hi-sun { fill: #ffd66b; }

/* ---------- 7. WSPÓLNE ELEMENTY ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(21,150,216,.10);
  color: var(--accent);
  margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--text-muted); margin: 0; font-size: .96rem; }

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }

/* Statystyki */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; color: var(--text-muted); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 1.15rem; height: 1.15rem;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center/contain no-repeat;
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
}
.stat-number { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.stat-label  { font-size: .88rem; color: rgba(255,255,255,.8); }

/* Pasek IKM — wniosek o dostęp do panelu mieszkańca */
.ikm-band { background: var(--navy); color: #fff; }
.ikm-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.ikm-band h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: .4rem; }
.ikm-band p { color: rgba(255,255,255,.85); margin: 0; max-width: 60ch; }
.ikm-text { display: flex; gap: 1.1rem; align-items: flex-start; }
.ikm-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; flex: none;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  color: #fff;
}
.ikm-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ikm-actions { display: flex; flex-direction: column; gap: .6rem; flex: none; }
.ikm-actions .btn { justify-content: center; }
.ikm-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,.45); }
.ikm-actions .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
@media (max-width: 720px) {
  .ikm-actions { width: 100%; }
}

/* ---------- 8. SEKCJE SZCZEGÓŁOWE ---------- */

/* Karty dla mieszkańców (klikalne) */
.residents-card { display: block; color: inherit; }
.residents-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.residents-card h3 { color: var(--navy); }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2.2rem; }

/* Zgłoś awarię */
.section-danger { background: linear-gradient(135deg, var(--danger) 0%, var(--danger-600) 100%); color: #fff; }
.section-danger h2 { color: #fff; }
.section-danger p { color: rgba(255,255,255,.9); }
.fault-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.fault-box {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-align: center;
}
.fault-label { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; font-weight: 700; margin: 0 0 .3rem; color: rgba(255,255,255,.85); }
.fault-phone { display: inline-block; font-size: 1.8rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.fault-phone:hover { color: #fff; text-decoration: underline; }
.fault-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* Dokumenty */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  transition: box-shadow .18s, border-color .18s;
}
.doc-item:hover { box-shadow: var(--shadow); border-color: transparent; }
.doc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: none;
  border-radius: 10px;
  background: rgba(12,58,91,.07);
  color: var(--navy);
}
.doc-icon svg { width: 22px; height: 22px; }
.doc-info { flex: 1; min-width: 0; }
.doc-info h3 { font-size: 1.02rem; margin: 0 0 .1rem; }
.doc-info p { color: var(--text-muted); font-size: .88rem; margin: 0; }

/* Aktualności */
.news-card { position: relative; }
.news-date { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: .5rem; }
.news-card h3 { margin: .3rem 0 .5rem; }

/* --- Aktualności dynamiczne (z data/aktualnosci.json) --- */
.news-wrap { display: grid; gap: 1.25rem; }
.news-empty { color: var(--text-muted); text-align: center; padding: 1.5rem 0; margin: 0; }

/* Wyróżniony (najnowszy) komunikat + kolorowy pasek powagi z lewej */
.news-featured {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  box-shadow: var(--shadow);
}
.news-featured h3 { font-size: 1.45rem; margin: .35rem 0 .5rem; }
.news-featured p  { color: var(--text-muted); margin: 0; }
.news-featured.krytyczny { border-left-color: var(--danger); }
.news-featured.wazny     { border-left-color: #d98a00; }
.news-featured.info      { border-left-color: var(--accent); }

/* Pozostałe 3 komunikaty — zawsze w jednym rzędzie na całą szerokość */
.news-rest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.25rem; }
@media (max-width: 560px) { .news-rest { grid-template-columns: 1fr; } }

/* Znacznik powagi (badge) */
.sev-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .25rem .7rem; border-radius: 999px;
  margin-bottom: .5rem;
}
.sev-badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.sev-badge.krytyczny { background: rgba(192,57,43,.12); color: #c0392b; }
.sev-badge.wazny     { background: rgba(217,138,0,.14); color: #b06d00; }
.sev-badge.info      { background: rgba(21,150,216,.12); color: var(--accent); }
/* Delikatne pulsowanie kropki przy komunikacie pilnym */
.news-featured.krytyczny .sev-badge.krytyczny::before { animation: sevPulse 1.6s ease-in-out infinite; }
@keyframes sevPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Link „Czytaj więcej” */
.news-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .9rem; font-weight: 600; font-size: .92rem; }
.news-link .icon { width: 1rem; height: 1rem; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .2rem .6rem; border-radius: 999px;
  background: var(--bg-alt); color: var(--text-muted);
}
.tag-info   { background: rgba(31,111,178,.12);  color: #1f6fb2; }
.tag-warn   { background: rgba(192,57,43,.12);   color: var(--danger); }
.tag-accent { background: rgba(21,150,216,.12);   color: var(--accent); }

/* Nieruchomości */
.property-card h3 { margin-bottom: .6rem; }
.prop-addr, .prop-admin { color: var(--text-muted); font-size: .92rem; margin: 0 0 .35rem; display: flex; align-items: center; gap: .4rem; }
.prop-admin { padding-left: 0; }
.prop-links { display: flex; gap: 1rem; margin-top: .8rem; font-weight: 600; font-size: .9rem; }

.map-embed {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.map-embed iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Mapa w sekcji kontakt — wypełnia wysokość obok danych kontaktowych */
.contact-map { margin-top: 0; height: 100%; min-height: 420px; }
.contact-map iframe { height: 100%; min-height: 420px; }

/* FAQ */
.faq { display: grid; gap: .7rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 1.3rem 1.2rem; color: var(--text-muted); }
.faq-body p { margin: 0; }

/* ---------- 9. FORMULARZ KONTAKTOWY ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: stretch; }

.contact-name { font-size: 1.15rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; color: var(--text-muted); }
.contact-list .icon { width: 1.3rem; height: 1.3rem; color: var(--accent); margin-top: .2rem; }
.contact-list a { color: var(--text); font-weight: 500; }
.contact-list a:hover { color: var(--accent); }

.contact-emergency {
  background: rgba(192,57,43,.07);
  border: 1px solid rgba(192,57,43,.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  text-align: center;
}
.contact-emergency .fault-label { color: var(--danger); }
.contact-emergency .fault-phone { color: var(--danger); font-size: 1.4rem; margin: 0; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: .35rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .96rem;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21,150,216,.15);
}
.form-field textarea { resize: vertical; }

.form-check { display: flex; gap: .6rem; align-items: flex-start; }
.form-check input { width: auto; margin-top: .3rem; flex: none; }
.form-check label { font-weight: 400; font-size: .85rem; color: var(--text-muted); }

.form-field input:invalid.touched,
.form-field textarea:invalid.touched { border-color: var(--danger); }

.form-status { margin: 1rem 0 0; font-weight: 600; font-size: .95rem; }
.form-status.ok  { color: var(--accent); }
.form-status.err { color: var(--danger); }

/* ---------- 10. STOPKA ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem,4vw,2.5rem);
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.logo-footer { color: #fff; margin-bottom: 1rem; }
.logo-footer .logo-mark { fill: #fff; }
.logo-footer .logo-text strong { color: #fff; }
.logo-footer .logo-text em { color: rgba(255,255,255,.6); }
.footer-desc { font-size: .92rem; max-width: 34ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .92rem; }
.footer-links a { color: rgba(255,255,255,.75); }
.footer-links a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-block: 1.2rem; }
.footer-bottom p { margin: 0; font-size: .85rem; }
.footer-credit { color: rgba(255,255,255,.5); }

/* ---------- 11. RESPONSYWNOŚĆ ---------- */

/* Tablet: chowamy nawigację do menu mobilnego */
@media (max-width: 960px) {
  /* Poniżej tej szerokości przyciski schodzą pod logo i mogą się zawijać */
  .header-inner { flex-wrap: wrap; row-gap: .6rem; padding-block: .6rem; }
  .header-actions { margin-left: auto; width: 100%; justify-content: flex-start; }
  .dropdown-menu { left: 0; right: auto; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-illustration { max-width: 360px; }

  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .fault-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Telefon */
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .doc-item { flex-wrap: wrap; }
  .doc-item .btn { width: 100%; justify-content: center; }
  .footer-bottom .container { flex-direction: column; }
  h1 { font-size: 2rem; }
}

/* ---------- 12. ANIMACJE ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Szacunek dla preferencji ograniczenia ruchu */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .residents-card:hover { transform: none; }
}
