:root {
  --bg: #faf6ef;
  --card: #fffdf8;
  --ink: #2d2a24;
  --muted: #8a8273;
  --accent: #b8860b;
  --accent-dark: #8a6408;
  --wheat: #e8d9b0;
  --border: #e4dcc8;
  --danger: #a33;
  --ok: #3a7d44;
  --shadow: 0 2px 10px rgba(45, 42, 36, .07);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #3a5a2a 0%, #557a35 55%, #b8860b 130%);
  color: #fdfaf1;
  padding: 72px 20px 64px;
  text-align: center;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .78rem;
  opacity: .85; margin: 0 0 10px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; letter-spacing: -.02em; }
.hero .accent { color: #ffd977; }
.hero .sub { font-size: 1.08rem; opacity: .92; max-width: 620px; margin: 0 auto 26px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .08s ease, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #f5c84e; color: #33290a; }
.btn-primary:hover { background: #ffd76b; }
.btn-ghost { background: transparent; color: #fdf6f1; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Sections */
.section { max-width: 1080px; margin: 0 auto; padding: 44px 20px 8px; }
.section-head h2 { margin: 0 0 6px; font-size: 1.7rem; }
.muted { color: var(--muted); font-size: .92rem; }
.section-head { margin-bottom: 18px; }

/* Planer */
.planer-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.planer-bar input {
  flex: 1 1 280px; padding: 11px 16px; font-size: 1rem; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff;
}
.planer-bar input:focus { outline: 2px solid var(--accent); border-color: transparent; }
#loc-status { font-size: .9rem; }
.planer-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 16px; font-size: .95rem; }
.stat { background: var(--card, #fffdf8); border: 1px solid var(--border); border-radius: 10px; padding: 6px 14px; }
.stat b { color: var(--accent-dark); }

.planer-list { display: grid; gap: 10px; }
.planer-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow);
}
.planer-row .dist {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-dark);
  min-width: 90px; font-size: 1.05rem;
}
.planer-row .meta { flex: 1 1 260px; }
.planer-row .meta .t { font-weight: 600; }
.planer-row .meta .d { font-size: .85rem; color: var(--muted); }
.planer-row .when { font-weight: 600; white-space: nowrap; }
.planer-row .to-list { font-size: .82rem; }
.planer-row.dim { opacity: .55; }

/* Calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto 12px; }
.cal-nav button {
  background: var(--card); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 7px 16px; font-size: 1rem; cursor: pointer;
}
.cal-nav button:hover { border-color: var(--accent); }
.cal-nav .cal-title { font-weight: 700; font-size: 1.1rem; min-width: 200px; text-align: center; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
  max-width: 560px; margin: 0 auto 16px;
}
.cal-dow { text-align: center; font-size: .72rem; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--card); border: 1px solid var(--border);
  font-size: .95rem; cursor: default; position: relative;
}
.cal-day.other { opacity: .35; }
.cal-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(184,134,11,.25); }
.cal-day.has { background: #fdf3d3; border-color: var(--wheat); cursor: pointer; font-weight: 700; }
.cal-day.has:hover { background: #f7e6ae; }
.cal-day .dots { display: flex; gap: 2px; margin-top: 2px; }
.cal-day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-events { display: grid; gap: 8px; max-width: 760px; margin: 0 auto 20px; }
.cal-event {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px;
}
.cal-event .when { font-weight: 700; color: var(--accent-dark); min-width: 90px; }

/* Event grid */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.event-card img.poster {
  width: 100%; height: 190px; object-fit: cover; object-position: top;
  border-bottom: 1px solid var(--border);
}
.event-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-card .badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; background: #f1e8cf; color: #6b5410;
}
.badge.wojewodzkie { background: #3a5a2a; color: #fff; }
.badge.powiatowe, .badge.powiatowo-gminne { background: #d8c9f0; color: #4b2e83; }
.badge.diecezjalne { background: #c9e4d4; color: #1e5c3f; }
.event-card h3 { margin: 4px 0 0; font-size: 1.08rem; }
.event-card .when { font-weight: 700; color: var(--accent-dark); }
.event-card .place { font-size: .9rem; color: var(--muted); }
.event-card .desc { font-size: .9rem; }
.event-card .dist-line { font-size: .85rem; color: var(--muted); }
.event-card .src { margin-top: auto; padding-top: 8px; font-size: .8rem; }
.event-card .src a { color: var(--accent-dark); text-decoration: none; }
.event-card .src a:hover { text-decoration: underline; }
.event-card.over { opacity: .6; }

.filters { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .92rem; margin-top: 10px; }
.filters select {
  padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); font-size: .9rem;
}

/* Special events */
.special-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.special-card {
  background: linear-gradient(160deg, #fffdf8 0%, #fdf3d3 100%);
  border: 1.5px solid var(--wheat); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow); position: relative;
}
.special-card .star {
  position: absolute; top: -12px; right: 14px; font-size: 1.5rem;
  background: #fff8e0; border: 1px solid var(--wheat); border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.special-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.special-card .when { font-weight: 700; color: var(--accent-dark); font-size: .95rem; }
.special-card .why { margin: 8px 0; font-size: .95rem; }
.special-card .stars-line { font-size: .92rem; }
.special-card .stars-line b { color: var(--accent-dark); }
.special-card .acts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.act-tag { font-size: .78rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }

/* details in cards */
.event-card .details { margin-top: 6px; font-size: .88rem; display: grid; gap: 3px; }
.event-card .details .d-row { display: flex; gap: 6px; }
.event-card .details .d-label { font-weight: 700; color: var(--accent-dark); min-width: 72px; }
.event-card .fb-link { display: inline-block; margin-top: 8px; font-size: .85rem; }

footer {
  margin-top: 56px; padding: 26px 20px 40px; text-align: center;
  border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted);
}

@media (max-width: 560px) {
  .planer-row { flex-direction: column; align-items: flex-start; }
  .cal-grid { max-width: 100%; }
}
