/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #e91e8c;
  --primary-hover:  #c2185b;
  --primary-light:  rgba(233, 30, 140, 0.1);
  --secondary:      #3b6cc5;
  --secondary-light:rgba(59, 108, 197, 0.1);

  --bg-primary:     #f5f4f0;
  --bg-secondary:   #ffffff;
  --bg-card:        rgba(255,255,255,0.9);
  --bg-card-border: rgba(0,0,0,0.08);

  --text-primary:   #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;

  --footer-bg:      #1a1a2e;

  --font-heading:   'Lora', serif;
  --font-body:      'Inter', sans-serif;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4 { font-family: var(--font-heading); line-height: 1.25; }

/* ===== LAYOUT ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-primary);
  margin-bottom: .5rem;
}
.section-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.4rem;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background .18s, transform .1s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost     { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-sm { padding: .4rem 1rem; font-size: .8125rem; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600; line-height: 1;
}
[data-org="fundacja"]       .badge-org,
.badge-org[data-org="fundacja"]       { background: #fce7f3; color: #9d174d; }
[data-org="stowarzyszenie"] .badge-org,
.badge-org[data-org="stowarzyszenie"] { background: #eff6ff; color: #1e40af; }
[data-org="oba"]            .badge-org,
.badge-org[data-org="oba"]            { background: #fdf4ff; color: #6b21a8; }

.tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 500;
  background: rgba(0,0,0,.06); color: var(--text-secondary);
}

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--bg-card-border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .75rem 0;
  flex-wrap: wrap;
}
.logos {
  display: flex; align-items: center; gap: 1rem;
  flex-shrink: 0;
}
.logo-block {
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  text-decoration: none;
}
.logo-block img { height: 44px; width: auto; }
.logo-block span {
  font-size: .65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-secondary); line-height: 1;
  text-align: center; max-width: 80px;
}
.logo-sep { color: var(--text-muted); font-size: 1.25rem; font-weight: 300; }

.site-nav {
  display: flex; align-items: center; gap: .25rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.site-nav a {
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-primary);
  transition: background .15s;
}
.site-nav a:hover { background: var(--bg-primary); color: var(--primary); }
.site-nav .btn-primary { margin-left: .5rem; }

/* ===== HERO ===== */
.hero {
  padding: 5rem 0 4rem;
  background: var(--bg-primary);
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero-badges { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #fff;
  border: 1px solid var(--bg-card-border);
}
.hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
}

/* ===== FILTERS ===== */
.filters-bar {
  background: #fff;
  border-bottom: 1px solid var(--bg-card-border);
  padding: 1rem 0;
  position: sticky; top: 73px; z-index: 90;
}
.filters-inner {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: .375rem; flex-wrap: wrap; flex: 1; }
.filter-tab {
  padding: .375rem .875rem;
  border-radius: 999px;
  border: 1px solid var(--bg-card-border);
  background: var(--bg-primary);
  font-size: .8125rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}
.search-wrap { position: relative; flex-shrink: 0; }
.search-wrap svg {
  position: absolute; left: .65rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-muted); pointer-events: none;
}
.search-input {
  padding: .375rem .75rem .375rem 2.1rem;
  border: 1px solid var(--bg-card-border);
  border-radius: 999px;
  font-family: var(--font-body); font-size: .8125rem;
  background: var(--bg-primary); color: var(--text-primary);
  width: 200px; transition: border-color .15s, width .2s;
}
.search-input:focus { outline: none; border-color: var(--primary); width: 240px; }

/* ===== NEWS SECTION ===== */
#aktualnosci { padding: 3rem 0 5rem; }

/* Featured card */
.news-featured {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--bg-card-border);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  cursor: pointer; transition: box-shadow .2s;
}
.news-featured:hover { box-shadow: var(--shadow-lg); }
.news-featured-img {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.news-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.news-featured-img .img-placeholder {
  color: var(--text-muted); text-align: center; padding: 2rem;
}
.news-featured-img .img-placeholder svg { width: 48px; height: 48px; opacity: .35; margin: 0 auto .5rem; }
.news-featured-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.news-featured-body .meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.news-featured-body h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: .75rem;
}
.news-featured-body p { color: var(--text-secondary); font-size: .9375rem; margin-bottom: 1.5rem; }

/* News grid */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  margin-bottom: 2rem;
}

.news-card {
  background: var(--bg-secondary);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer; transition: box-shadow .18s, transform .18s;
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  display: flex; align-items: center; justify-content: center;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img .img-placeholder { color: var(--text-muted); }
.news-card-img .img-placeholder svg { width: 32px; height: 32px; opacity: .3; }
.news-card-body { padding: 1.25rem; }
.news-card-body .meta {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-bottom: .75rem; font-size: .8rem;
}
.news-card-body .date { color: var(--text-muted); font-size: .78rem; }
.news-card-body h3 {
  font-family: var(--font-heading);
  font-size: 1rem; margin-bottom: .5rem; line-height: 1.3;
}
.news-card-body p { color: var(--text-secondary); font-size: .8375rem; line-height: 1.5; }

/* News list (older entries) */
.news-list { list-style: none; margin-bottom: 1.5rem; }
.news-list-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .875rem 0; border-bottom: 1px solid #f1f5f9;
  cursor: pointer; transition: background .12s;
  border-radius: var(--radius-sm);
}
.news-list-item:hover { background: var(--bg-primary); padding-left: .5rem; }
.news-list-item .meta { display: flex; gap: .4rem; flex-shrink: 0; align-items: center; }
.news-list-item .info { flex: 1; min-width: 0; }
.news-list-item .info h4 {
  font-family: var(--font-heading); font-size: .9375rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: .15rem;
}
.news-list-item .info p { color: var(--text-muted); font-size: .8rem; }

.show-more-wrap { text-align: center; padding: 1rem 0; }
.no-results {
  text-align: center; padding: 3rem; color: var(--text-muted);
  font-size: .9375rem;
}

/* ===== PARTNERS ===== */
.partners-section {
  background: #fff;
  border-top: 1px solid var(--bg-card-border);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 3rem 0;
}
.partners-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}
.partners-list {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.partner-link {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .6rem 1.4rem;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 500; font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.partner-link:hover {
  border-color: var(--primary); color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.partner-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== CONTACT ===== */
#kontakt { background: var(--bg-primary); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.contact-form-card {
  background: #fff;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; gap: .875rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
.form-field label {
  display: block;
  font-size: .8125rem; font-weight: 500; color: #374151;
  margin-bottom: .3rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .875rem;
  background: #fff; color: var(--text-primary);
  transition: border-color .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-success {
  background: #dcfce7; color: #15803d;
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; display: none;
}
.form-success.show { display: block; }

.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-org {
  background: #fff;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.contact-org h3 {
  font-family: var(--font-heading);
  font-size: 1rem; margin-bottom: .75rem;
}
.contact-detail {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .875rem; color: var(--text-secondary);
  margin-bottom: .4rem;
}
.contact-detail svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: .15rem; color: var(--primary); }
.contact-detail a { color: var(--primary); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,.75);
  padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 1rem; color: #fff; margin-bottom: 1rem;
}
.footer-col p, .footer-col li {
  font-size: .85rem; line-height: 1.7; color: rgba(255,255,255,.65);
}
.footer-col ul { list-style: none; }
.footer-col a { color: rgba(255,255,255,.65); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-col .detail-row {
  display: flex; gap: .5rem; font-size: .8125rem;
  color: rgba(255,255,255,.55); margin-bottom: .25rem;
}
.footer-col .detail-row strong { color: rgba(255,255,255,.8); min-width: 50px; }
.footer-bottom {
  padding: 1.25rem 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
  font-size: .8rem; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ===== MODAL ===== */
dialog {
  border: none; padding: 0;
  margin: auto;
  border-radius: var(--radius-lg);
  max-width: 680px; width: 94vw;
  box-shadow: var(--shadow-lg);
  background: #fff;
  max-height: 90vh;
  overflow-y: auto;
}
dialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--bg-card-border);
  position: sticky; top: 0; background: #fff; z-index: 1;
  display: flex; align-items: flex-start; gap: 1rem;
}
.modal-header-meta { flex: 1; }
.modal-header-meta .meta {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-bottom: .6rem;
}
.modal-header-meta h2 {
  font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.25;
}
.modal-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: var(--bg-primary); border: none; border-radius: 50%;
  cursor: pointer; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: background .15s;
}
.modal-close:hover { background: #e5e7eb; }
.modal-body { padding: 1.75rem; }
.modal-features {
  list-style: none;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.modal-features li {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .35rem 0; font-size: .9rem; color: var(--text-primary);
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.modal-features li:last-child { border-bottom: none; }
.modal-features li::before {
  content: "✓"; color: var(--primary); font-weight: 700; flex-shrink: 0; margin-top: .05rem;
}
.modal-longdesc { color: var(--text-secondary); font-size: .9375rem; line-height: 1.7; }
.modal-longdesc p { margin-bottom: .875rem; }
.modal-longdesc p:last-child { margin-bottom: 0; }
.modal-actions {
  padding: 1.25rem 1.75rem 1.5rem;
  border-top: 1px solid var(--bg-card-border);
  display: flex; gap: .75rem;
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--footer-bg); color: rgba(255,255,255,.85);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8375rem; z-index: 200;
  max-width: 680px; width: 94vw;
}
.cookie-banner p { flex: 1; min-width: 200px; }
.cookie-banner .cookie-actions { display: flex; gap: .5rem; }
.cookie-hidden { display: none !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-grid     { grid-template-columns: 1fr; }
  .hero-image    { display: none; }
  .news-featured { grid-template-columns: 1fr; }
  .news-featured-img { min-height: 200px; }
  .news-grid     { grid-template-columns: repeat(2, 1fr); }
  .contact-grid  { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .header-inner { gap: .75rem; }
  .filters-bar { top: 69px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
