/* Hufiec ZHP Piaseczno — temporary static page.
   Palette, background and the green "signup" card follow zhp.pl. */

:root {
  --green-1: #afca0b;
  --green-2: #86a315;
  --green-3: #587d18;
  --purple-1: #5d2f88;
  --ink: #000;
  --ink-2: #444;
  --muted: #6b6b6b;
  --line: #e7e5e4;
  --wrap: 1120px;
  --font: "Museo Sans", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: #fff;
  background-image: url(img/bg.png);   /* same as zhp.pl body */
  background-size: 100% auto;
  background-repeat: repeat-y;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-3); text-underline-offset: 2px; }
a:hover { color: var(--purple-1); }
h1, h2, h3 { line-height: 1.2; margin: 0; }

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

/* ---------- header ---------- */
.site-header { text-align: center; padding: 40px 0 16px; }
.logos { display: flex; justify-content: center; align-items: center; gap: 32px; }
.logos .zhp { height: 72px; width: auto; }
.logos .hufiec { height: 96px; width: 96px; }
.logos .sep { width: 1px; height: 64px; background: var(--line); }
.site-header h1 { font-size: 26px; font-weight: 800; margin-top: 20px; }
.site-header h1 span { display: block; font-size: 16px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.path { font-size: 14px; color: var(--muted); margin-top: 8px; }
.path b { color: var(--green-2); font-weight: 700; margin: 0 6px; }
.notice { font-style: italic; color: var(--ink-2); margin: 16px 0 0; }
.social { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.social a {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600;
  padding: 6px 12px; border-radius: 6px; color: #fff; background: var(--green-3);
}
.social a:hover { color: #fff; filter: brightness(1.08); }
.social svg { width: 16px; height: 16px; }

/* ---------- green card (zhp.pl "Chcesz zapisać swoje dziecko…") ---------- */
.signup {
  display: grid; grid-template-columns: 60% 40%;
  min-height: 400px; border-radius: 12px; overflow: hidden;
  background: var(--green-2); color: #fff;
}
.signup-text { padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.signup h2 { font-size: 34px; font-weight: 900; text-transform: uppercase; margin-bottom: 16px; }
.signup p { margin: 0 0 32px; }
.signup-actions { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 400; line-height: 1.4;
  padding: 8px 16px; border-radius: 6px; color: #fff; background: var(--green-3);
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn.light { background: var(--green-1); }
.signup-photo {
  position: relative; margin: 0;
  clip-path: ellipse(100% 115% at 100% 50%); /* curved left edge, as on zhp.pl */
}
.signup-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.signup-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(-90deg, rgba(175,202,11,.25) 0%, rgba(175,202,11,0) 100%);
}
.signup-photo figcaption {
  position: absolute; right: 8px; bottom: 6px; z-index: 1;
  font-size: 11px; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* ---------- section titles ---------- */
.title { font-size: 28px; font-weight: 900; text-transform: uppercase; margin-bottom: 20px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.card.place { grid-row: span 2; display: flex; flex-direction: column; }
.card.place .actions { margin-top: auto; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px;
}
.card .role { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--green-3); margin-bottom: 6px; }
.card .who { font-weight: 700; font-size: 17px; }
.card .when { color: var(--ink-2); font-size: 14px; margin: 2px 0 10px; }
.card .who + a { display: inline-block; margin-top: 10px; }
.card a { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.card address { font-style: normal; font-size: 17px; line-height: 1.45; margin-bottom: 12px; }
.card.place { border-color: var(--green-1); border-width: 2px; }
.card .btn { font-weight: 400; margin: 4px 6px 0 0; }

dialog {
  border: 0; border-radius: 12px; padding: 28px; max-width: min(560px, calc(100vw - 32px)); width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { font-size: 22px; font-weight: 900; text-transform: uppercase; margin-bottom: 4px; }
dialog h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--green-3); margin: 18px 0 6px; }
dialog p { margin: 0; line-height: 1.5; }
dialog .close { position: absolute; top: 14px; right: 14px; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
dialog .close:hover { color: var(--ink); }
.dialog-actions { margin-top: 22px; text-align: right; }

/* ---------- units ---------- */
.unit-cat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden;
}
.unit-cat summary {
  list-style: none; cursor: pointer; padding: 16px 22px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.unit-cat summary::-webkit-details-marker { display: none; }
.unit-cat summary::before {
  content: ""; width: 9px; height: 9px; flex: none; align-self: center;
  border-right: 2px solid var(--green-2); border-bottom: 2px solid var(--green-2);
  rotate: -45deg; transition: rotate .15s; margin-right: 4px;
}
.unit-cat[open] summary::before { rotate: 45deg; }
.unit-cat summary:hover { background: #fafaf9; }
.unit-cat summary h3 { font-size: 18px; font-weight: 800; }
.unit-cat summary .count {
  font-size: 13px; font-weight: 700; color: #fff; background: var(--green-2);
  border-radius: 999px; padding: 0 8px; line-height: 1.6;
}
.unit-cat summary .age { font-size: 14px; color: var(--muted); flex-basis: 100%; padding-left: 25px; }
.units {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
  padding: 4px 22px 22px;
}
.unit {
  --c1: var(--green-1); --c2: var(--c1);   /* unit colours, set per card from units.js */
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px 14px 22px;
}
.unit::before { /* colour stripe: top half colour 1, bottom half colour 2 */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(var(--c1) 50%, var(--c2) 50%);
  box-shadow: inset -1px 0 0 rgba(0,0,0,.12); /* keeps white/light colours visible */
}
.unit h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px; line-height: 1.35; }
.unit .num { color: var(--green-3); }
.badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 1px 6px; border-radius: 3px; background: #eee6f5; color: var(--purple-1); margin-left: 6px; vertical-align: 2px;
}
.unit p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.unit p + p { margin-top: 2px; }
.unit a { overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.site-footer { padding: 40px 0 48px; text-align: center; }
.footer-logos { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 24px 40px; }
.footer-logos img { height: 64px; width: auto; }
.footer-logos .wide { height: 48px; }
.funding { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; font-size: 13px; color: var(--muted); text-align: left; }
.funding img { height: 44px; width: auto; flex: none; }
.funding p { margin: 0; max-width: 560px; }
.copyright { font-size: 13px; color: var(--muted); margin-top: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
  .card.place { grid-row: auto; }
  .signup { grid-template-columns: 1fr; }
  .signup-photo { order: -1; min-height: 220px; clip-path: none; }
  .signup h2 { font-size: 26px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .logos { gap: 20px; }
  .logos .zhp { height: 52px; }
  .logos .hufiec { height: 72px; width: 72px; }
  .site-header h1 { font-size: 22px; }
  .units { grid-template-columns: 1fr; padding: 4px 14px 14px; }
  .unit-cat summary { padding: 14px 16px; }
  .funding { flex-direction: column; text-align: center; }
}
