/* Fundacja Trzy Kolory — style główne (v2) */
:root {
  --red: #d32f2f;
  --red-dark: #b01f1f;
  --red-soft: #fdecec;
  --blue: #1e5bb8;
  --blue-dark: #164a99;
  --blue-soft: #e9f0fb;
  --gray: #8a8f98;
  --ink: #171e29;
  --muted: #5a6472;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --border: #e5e9ef;
  --radius: 16px;
  --shadow-sm: 0 2px 8px rgba(23, 30, 41, .06);
  --shadow: 0 8px 30px rgba(23, 30, 41, .09);
  --shadow-lg: 0 18px 50px rgba(23, 30, 41, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff;
  padding: 10px 18px; z-index: 100; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; }
.brand-logo { height: 60px; width: auto; display: block; transition: transform .2s; }
.brand:hover .brand-logo { transform: scale(1.03); }
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .93rem;
  padding: 9px 13px; border-radius: 999px; transition: background .18s, color .18s;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.site-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer; font-size: .96rem; font-family: inherit;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-donate {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff !important; padding: 10px 20px !important; margin-left: 8px;
  box-shadow: 0 4px 14px rgba(211, 47, 47, .35);
}
.btn-donate:hover { background: var(--red-dark) !important; box-shadow: 0 6px 20px rgba(211, 47, 47, .45); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(30, 91, 184, .3);
}
.btn-secondary { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.btn-secondary:hover { background: var(--blue-soft); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 60; }
.nav-toggle span:not(.sr-only) {
  display: block; width: 26px; height: 3px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; background: linear-gradient(160deg, #f2f6fc 0%, #fdf4f4 85%); }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none;
}
.hero::before { width: 420px; height: 420px; background: #aecdf5; top: -140px; right: -80px; }
.hero::after { width: 360px; height: 360px; background: #f2b8b8; bottom: -160px; left: -100px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.14; font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 .accent-red { color: var(--red); }
.hero h1 .accent-blue { color: var(--blue); }
.hero p { font-size: 1.15rem; color: var(--muted); margin-bottom: 32px; max-width: 33em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge { text-align: center; }
.hero-badge img {
  max-width: 330px; border-radius: 50%; box-shadow: var(--shadow-lg);
  border: 8px solid #fff; animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-badge img { animation: none; }
  html { scroll-behavior: auto; }
  .card:hover, .post-card:hover, .btn:hover { transform: none; }
}

/* ---------- Sekcje ---------- */
section { padding: 76px 0; }
section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.tricolor-bar { display: flex; gap: 7px; justify-content: center; margin-bottom: 18px; }
.tricolor-bar span { width: 36px; height: 7px; border-radius: 4px; }
.tricolor-bar span:nth-child(1) { background: var(--blue); }
.tricolor-bar span:nth-child(2) { background: var(--gray); }
.tricolor-bar span:nth-child(3) { background: var(--red); }

/* ---------- Karty ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px 28px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .22s, box-shadow .22s;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 33%, var(--gray) 33% 66%, var(--red) 66% 100%);
  opacity: 0; transition: opacity .22s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: 10px; font-size: 1.18rem; font-weight: 700; }
.card p { color: var(--muted); font-size: .96rem; }
.ficon {
  display: block; margin-bottom: 16px; width: 58px; height: 58px;
  transition: transform .25s;
}
.card:hover .ficon { transform: scale(1.1) rotate(-3deg); }

/* ---------- Statystyki ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 14px; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--blue); }
.stat:nth-child(even) b { color: var(--red); }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s; border-top: 5px solid var(--blue);
}
.post-card:nth-child(3n+2) { border-top-color: var(--gray); }
.post-card:nth-child(3n) { border-top-color: var(--red); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card time { color: var(--gray); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.post-card h3 { font-size: 1.14rem; line-height: 1.4; font-weight: 700; }
.post-card h3 a { color: var(--ink); text-decoration: none; transition: color .18s; }
.post-card h3 a:hover { color: var(--red); }
.post-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.read-more { font-weight: 700; text-decoration: none; color: var(--blue); font-size: .94rem; }
.read-more:hover { color: var(--red); }

/* ---------- Artykuł ---------- */
.article { max-width: 780px; margin: 0 auto; padding: 64px 24px; }
.article header { margin-bottom: 36px; }
.article h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.22; font-weight: 800; letter-spacing: -.015em; margin-bottom: 14px; }
.article time { color: var(--gray); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.article-body { font-size: 1.1rem; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { margin-bottom: 1.25em; }
.article-body h2, .article-body h3 { margin: 1.6em 0 .6em; letter-spacing: -.01em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body blockquote {
  border-left: 4px solid var(--red); padding: .6em 0 .6em 1.2em;
  color: var(--muted); background: var(--bg-soft); border-radius: 0 10px 10px 0;
}
.article-body img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.article-body a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Formularze ---------- */
.form-grid { display: grid; gap: 18px; max-width: 640px; }
label { font-weight: 600; display: block; margin-bottom: 6px; font-size: .95rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  font: inherit; background: #fff; transition: border-color .18s, box-shadow .18s;
}
input:hover, textarea:hover, select:hover { border-color: #c9d2dd; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30, 91, 184, .14);
}
textarea { min-height: 140px; resize: vertical; }
.alert { padding: 15px 20px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; }
.alert-success { background: #e7f6ec; color: #1b7a3d; border: 1px solid #bfe6cd; }
.alert-error { background: var(--red-soft); color: var(--red-dark); border: 1px solid #f5c6c6; }

/* ---------- Sekcja darowizn ---------- */
.donate-box {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; border-radius: 22px; padding: 52px 40px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.donate-box::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); top: -140px; right: -100px;
}
.donate-box::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(211, 47, 47, .25); bottom: -110px; left: -70px; filter: blur(10px);
}
.donate-box h2 { font-size: 1.8rem; margin-bottom: 10px; letter-spacing: -.01em; position: relative; z-index: 1; }
.donate-box .krs {
  font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: .06em;
  background: rgba(255, 255, 255, .16); display: inline-block; padding: 12px 30px;
  border-radius: 14px; margin: 16px 0; border: 1px solid rgba(255, 255, 255, .25);
  position: relative; z-index: 1;
}
.donate-box p { opacity: .93; position: relative; z-index: 1; }

/* ---------- Dwie kolumny / listy ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.check-list { list-style: none; }
.check-list li { padding-left: 32px; position: relative; margin-bottom: 11px; }
.check-list li::before {
  content: "✔"; position: absolute; left: 0; top: 4px; color: #fff; font-size: .68rem;
  background: var(--red); width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.check-list li:nth-child(even)::before { background: var(--blue); }

/* ---------- Stopka ---------- */
.site-footer {
  background: var(--ink); color: #cfd6df; margin-top: 48px;
  border-top: 6px solid; border-image: linear-gradient(90deg, var(--blue) 0 33%, var(--gray) 33% 66%, var(--red) 66% 100%) 1;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; padding: 56px 24px 36px; }
.site-footer h3 { color: #fff; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { text-decoration: none; opacity: .85; transition: opacity .15s; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.krs-box { font-size: 1.2rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid #2c3542; padding: 20px 24px; font-size: .88rem;
}
.footer-bottom a { color: #9aa4b1; }

/* ---------- Responsywność ---------- */
@media (max-width: 960px) {
  .cards, .post-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 64px; }
  .hero-badge { order: -1; }
  .hero-badge img { max-width: 190px; border-width: 6px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .cards, .post-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 16px; border-radius: 12px; font-size: 1rem; }
  .btn-donate { margin-left: 0; text-align: center; margin-top: 6px; padding: 13px 20px !important; }
  .brand-logo { height: 46px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .donate-box { padding: 40px 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat b { font-size: 1.8rem; }
}
