/* ============================================
   OCIEPLANIEFUNDAMENTOW.PL — Rbud Projekt
   ============================================ */

:root {
  --grafit: #1c2024;
  --grafit-jasny: #2a3038;
  --pomaranczowy: #e8622c;
  --pomaranczowy-ciemny: #c74d1c;
  --piaskowy: #f4f1ec;
  --bialy: #ffffff;
  --szary: #6b7280;
  --szary-jasny: #e5e7eb;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--grafit);
  line-height: 1.65;
  background: var(--bialy);
  -webkit-font-smoothing: antialiased;
}

.kontener { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 16px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
p { margin-bottom: 14px; }

a { color: var(--pomaranczowy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- PASEK GÓRNY ---------- */
.pasek-top {
  background: var(--grafit);
  color: #cfd4da;
  font-size: 0.85rem;
  padding: 8px 0;
}
.pasek-top .kontener {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pasek-top a { color: var(--bialy); font-weight: 600; }

/* ---------- NAGŁÓWEK ---------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bialy);
  border-bottom: 1px solid var(--szary-jasny);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.naglowek-in {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--max); margin: 0 auto;
}
.logo { font-size: 1.35rem; font-weight: 900; color: var(--grafit); letter-spacing: -0.03em; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--pomaranczowy); }
.logo small { display: block; font-size: 0.62rem; font-weight: 600; color: var(--szary); letter-spacing: 0.14em; text-transform: uppercase; margin-top: -2px; }

nav ul { display: flex; gap: 26px; list-style: none; align-items: center; }
nav a { color: var(--grafit); font-weight: 600; font-size: 0.94rem; }
nav a:hover { color: var(--pomaranczowy); text-decoration: none; }

.btn {
  display: inline-block;
  background: var(--pomaranczowy);
  color: var(--bialy) !important;
  padding: 13px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--pomaranczowy-ciemny); text-decoration: none; transform: translateY(-1px); }
.btn-duzy { padding: 17px 40px; font-size: 1.08rem; }
.btn-obramowany {
  background: transparent; color: var(--bialy) !important;
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-obramowany:hover { background: rgba(255,255,255,0.12); border-color: var(--bialy); }

.menu-toggle { display: none; background: none; border: none; font-size: 1.7rem; cursor: pointer; color: var(--grafit); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: linear-gradient(rgba(20,24,28,0.62), rgba(20,24,28,0.82)), url('img/hero.jpg') center/cover no-repeat, var(--grafit);
  color: var(--bialy);
  padding: 100px 0 90px;
  text-align: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 1.18rem; max-width: 720px; margin: 0 auto 12px; color: #dfe3e8; }
.hero .region {
  display: inline-block; margin-bottom: 26px;
  background: rgba(232,98,44,0.18); border: 1px solid rgba(232,98,44,0.45);
  color: #ffb492; padding: 6px 16px; border-radius: 40px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- TRUST BAR ---------- */
.trust { background: var(--piaskowy); padding: 34px 0; border-bottom: 1px solid var(--szary-jasny); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.trust-item strong { display: block; font-size: 1.5rem; color: var(--pomaranczowy); font-weight: 900; }
.trust-item span { font-size: 0.88rem; color: var(--szary); font-weight: 600; }

/* ---------- SEKCJE ---------- */
section { padding: 76px 0; }
.sekcja-szara { background: var(--piaskowy); }
.sekcja-ciemna { background: var(--grafit); color: var(--bialy); }
.sekcja-ciemna h2, .sekcja-ciemna h3 { color: var(--bialy); }
.sekcja-ciemna p { color: #c9cfd6; }

.naglowek-sekcji { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.naglowek-sekcji p { color: var(--szary); font-size: 1.06rem; }
.sekcja-ciemna .naglowek-sekcji p { color: #a8b0ba; }

.etykieta {
  display: inline-block; color: var(--pomaranczowy);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- PROBLEM ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.karta {
  background: var(--bialy); padding: 30px 26px;
  border-radius: 6px; border: 1px solid var(--szary-jasny);
  border-top: 3px solid var(--pomaranczowy);
}
.karta .ikona { font-size: 1.9rem; margin-bottom: 12px; display: block; }
.karta p { color: var(--szary); font-size: 0.96rem; margin-bottom: 0; }

/* ---------- PROCES ---------- */
.proces { counter-reset: krok; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.krok { position: relative; padding-top: 12px; }
.krok::before {
  counter-increment: krok; content: counter(krok, decimal-leading-zero);
  display: block; font-size: 2.6rem; font-weight: 900;
  color: rgba(232,98,44,0.28); line-height: 1; margin-bottom: 8px;
}
.sekcja-ciemna .krok::before { color: rgba(232,98,44,0.55); }
.krok p { font-size: 0.95rem; margin-bottom: 0; }

/* ---------- DWIE KOLUMNY ---------- */
.dwie-kolumny { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.dwie-kolumny img { width: 100%; border-radius: 6px; display: block; }
.lista-zalet { list-style: none; margin-top: 18px; }
.lista-zalet li { padding: 9px 0 9px 32px; position: relative; font-size: 0.98rem; }
.lista-zalet li::before {
  content: "✓"; position: absolute; left: 0; top: 9px;
  color: var(--pomaranczowy); font-weight: 900; font-size: 1.05rem;
}

/* ---------- GALERIA ---------- */
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.galeria figure {
  margin: 0; overflow: hidden; border-radius: 6px;
  background: var(--szary-jasny); aspect-ratio: 4/3; cursor: pointer;
  position: relative;
}
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.galeria figure:hover img { transform: scale(1.06); }
.galeria .placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--szary); font-size: 0.85rem; text-align: center; padding: 12px;
  border: 2px dashed #c8cdd4;
}

/* Lightbox */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(12,14,17,0.94); align-items: center; justify-content: center;
  padding: 30px;
}
#lightbox.aktywny { display: flex; }
#lightbox img { max-width: 92%; max-height: 88%; border-radius: 4px; }
#lightbox .zamknij {
  position: absolute; top: 18px; right: 28px; color: var(--bialy);
  font-size: 2.4rem; cursor: pointer; line-height: 1; background: none; border: none;
}

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--szary-jasny);
  padding: 18px 0;
}
.faq summary {
  font-weight: 700; cursor: pointer; font-size: 1.04rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--pomaranczowy); font-size: 1.5rem; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--szary); font-size: 0.97rem; margin-bottom: 0; }

/* ---------- OBSZAR DZIAŁANIA ---------- */
.miasta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.miasta a, .miasta span {
  background: var(--bialy); border: 1px solid var(--szary-jasny);
  padding: 8px 18px; border-radius: 40px; font-size: 0.9rem;
  color: var(--grafit); font-weight: 600;
}
.miasta a:hover { border-color: var(--pomaranczowy); color: var(--pomaranczowy); text-decoration: none; }

/* ---------- FORMULARZ ---------- */
.formularz-box {
  background: var(--bialy); padding: 40px; border-radius: 8px;
  box-shadow: 0 6px 34px rgba(0,0,0,0.10);
}
.pole { margin-bottom: 16px; }
.pole label { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; }
.pole input, .pole textarea, .pole select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--szary-jasny);
  border-radius: 4px; font-size: 0.97rem; font-family: inherit; color: var(--grafit);
  background: var(--bialy);
}
.pole input:focus, .pole textarea:focus, .pole select:focus {
  outline: none; border-color: var(--pomaranczowy);
  box-shadow: 0 0 0 3px rgba(232,98,44,0.12);
}
.pole textarea { min-height: 105px; resize: vertical; }
.zgoda { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.zgoda input { width: auto; margin-top: 4px; flex-shrink: 0; }
.zgoda label { font-size: 0.78rem; color: var(--szary); font-weight: 400; line-height: 1.5; }
.formularz-box .btn { width: 100%; }
.info-kontakt { display: flex; flex-direction: column; gap: 22px; }
.info-poz { display: flex; gap: 16px; align-items: flex-start; }
.info-poz .ikona { font-size: 1.4rem; flex-shrink: 0; }
.info-poz strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--szary); }
.info-poz a, .info-poz p { font-size: 1.12rem; font-weight: 700; color: var(--bialy); margin: 0; }
.sekcja-ciemna .info-poz strong { color: #8d96a1; }

/* ---------- CTA PASEK ---------- */
.cta-pasek {
  background: var(--pomaranczowy); color: var(--bialy);
  padding: 48px 0; text-align: center;
}
.cta-pasek h2 { color: var(--bialy); }
.cta-pasek p { color: rgba(255,255,255,0.92); font-size: 1.06rem; max-width: 620px; margin: 0 auto 24px; }
.cta-pasek .btn { background: var(--bialy); color: var(--pomaranczowy) !important; }
.cta-pasek .btn:hover { background: #f5f5f5; }

/* ---------- STOPKA ---------- */
footer { background: var(--grafit); color: #9aa3ad; padding: 56px 0 24px; font-size: 0.9rem; }
.stopka-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
footer h4 { color: var(--bialy); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: #9aa3ad; }
footer a:hover { color: var(--pomaranczowy); }
.stopka-uslugi { font-size: 0.78rem; color: #6f7883; line-height: 1.7; }
.stopka-dol {
  border-top: 1px solid #333a42; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: #6f7883;
}

/* ---------- TELEFON MOBILNY (przycisk pływający) ---------- */
.tel-mobile {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: var(--pomaranczowy); color: var(--bialy) !important;
  text-align: center; padding: 15px; font-weight: 800; font-size: 1.05rem;
}
.tel-mobile:hover { text-decoration: none; }

/* ---------- STRONY TEKSTOWE ---------- */
.tresc { max-width: 820px; margin: 0 auto; }
.tresc h2 { margin-top: 34px; font-size: 1.4rem; }
.tresc h3 { margin-top: 22px; }
.tresc ul, .tresc ol { margin: 0 0 16px 22px; }
.tresc li { margin-bottom: 7px; }
.tresc table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.tresc th, .tresc td { border: 1px solid var(--szary-jasny); padding: 10px 12px; text-align: left; font-size: 0.93rem; }
.tresc th { background: var(--piaskowy); font-weight: 700; }

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 900px) {
  .problem-grid, .proces, .trust-grid, .galeria { grid-template-columns: repeat(2, 1fr); }
  .dwie-kolumny, .stopka-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 640px) {
  nav { display: none; }
  nav.otwarte {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bialy); border-bottom: 1px solid var(--szary-jasny);
    padding: 16px 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }
  nav.otwarte ul { flex-direction: column; gap: 4px; align-items: stretch; }
  nav.otwarte li { padding: 10px 0; border-bottom: 1px solid var(--szary-jasny); }
  nav.otwarte li:last-child { border: none; padding-top: 14px; }
  .menu-toggle { display: block; }
  .problem-grid, .proces, .trust-grid, .galeria { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 56px; }
  section { padding: 52px 0; }
  .formularz-box { padding: 26px 20px; }
  .pasek-top .kontener { justify-content: center; font-size: 0.78rem; }
  .tel-mobile { display: block; }
  body { padding-bottom: 54px; }
}
