/* Berlin Kids Football — single mobile-first stylesheet (index + club pages). */

:root {
  --ink: #1a1f2e;
  --ink-soft: #586375;
  --ink-fade: #8b95a7;
  --paper: #ffffff;
  --paper-soft: #f6f8fb;
  --paper-edge: #e6ebf3;
  --brand: #0b6b3a;
  --brand-dark: #084d29;
  --brand-soft: #e6f3ec;
  --accent: #2563eb;
  --green: #1f9b4e;
  --yellow: #d49c1d;
  --red: #c84a3a;
  --grey: #9aa3b2;
  --girls: #b35aa6;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 6px rgba(15, 23, 42, 0.04);
  --shadow-pop: 0 10px 30px rgba(15, 23, 42, 0.12);
  --max-width: 1180px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; }
ul, ol { padding-left: 1.2em; margin: 0 0 .8em; }
.bullets { padding-left: 1.1em; }
.bullets li { margin-bottom: .25em; }

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

/* ============ header ============ */
.site-header {
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
  position: sticky; top: 0; z-index: 50;
}
.header-row {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; font-weight: 700;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.6rem; }
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.header-nav {
  display: none; gap: 18px;
}
.header-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.92rem;
}
.header-nav a:hover { color: var(--brand); text-decoration: none; }

/* ============ hero ============ */
.hero {
  background:
    radial-gradient(ellipse at top left, #d6efe1 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, #e0e8ff 0%, transparent 55%),
    var(--paper-soft);
  padding: 28px 0 32px;
}
.hero-inner {
  display: grid; gap: 22px;
}
.hero-copy h1 { margin-top: 4px; max-width: 16ch; }
.hero-lede {
  font-size: 1.05rem; color: var(--ink-soft); margin: 0 0 18px; max-width: 60ch;
}

.hero-search {
  display: grid; gap: 8px;
  background: var(--paper); padding: 14px;
  border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.hero-field { display: flex; flex-direction: column; gap: 4px; }
.hero-field-label {
  font-size: 0.78rem; color: var(--ink-soft); font-weight: 600;
}
.hero-field input, .hero-field select {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--paper-edge); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.hero-field input:focus, .hero-field select:focus {
  outline: 2px solid var(--brand); outline-offset: -2px;
}
.hero-submit {
  margin-top: 4px;
  padding: 12px 18px; font-weight: 600; font-size: 1rem;
  background: var(--brand); color: white; border: 0; border-radius: var(--radius-sm);
}
.hero-submit:hover { background: var(--brand-dark); }
.hero-status {
  margin: 8px 0 0; font-size: 0.85rem; color: var(--ink-soft); min-height: 1.1em;
}
.hero-status.error { color: var(--red); }
.hero-status.success { color: var(--brand); }

.hero-map-wrap {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--paper-edge);
  background: #dde4ee;
}
.hero-map { height: 360px; }
.hero-map-legend {
  position: absolute; bottom: 8px; left: 8px;
  display: flex; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,0.94); padding: 6px 10px;
  border-radius: 999px; font-size: 0.78rem; color: var(--ink-soft);
  box-shadow: var(--shadow-card);
}
.hero-map-legend span { display: inline-flex; align-items: center; gap: 4px; }

/* ============ stats ============ */
.stats {
  background: var(--paper); border-bottom: 1px solid var(--paper-edge);
  padding: 16px 0;
}
.stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 22px;
}
.stat {
  display: flex; flex-direction: column;
}
.stat strong { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.stat span { font-size: 0.8rem; color: var(--ink-soft); }

/* ============ sections ============ */
.section { padding: 36px 0; border-top: 1px solid var(--paper-edge); }
.section:nth-of-type(even) { background: var(--paper-soft); }
.section-head {
  margin-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  justify-content: space-between;
}
.section-head h2 { margin: 0; }
.section-tag { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ============ cards (grid) ============ */
.cards-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
.card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius);
  color: inherit; transition: border-color .12s, transform .12s, box-shadow .12s;
}
.card:hover {
  text-decoration: none; border-color: var(--brand);
  transform: translateY(-1px); box-shadow: var(--shadow-card);
}
.card-status {
  flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%; margin-top: 2px;
}
.card-status.status-green   { background: var(--green); }
.card-status.status-yellow  { background: var(--yellow); }
.card-status.status-red     { background: var(--red); }
.card-status.status-grey    { background: var(--grey); }
.card-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.card-name { font-weight: 600; color: var(--ink); }
.card-sub { font-size: 0.83rem; color: var(--ink-soft); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag {
  display: inline-block; background: var(--paper-soft); color: var(--ink-soft);
  padding: 1px 8px; border-radius: 999px; font-size: 0.72rem;
  border: 1px solid var(--paper-edge);
}
.tag-girls { background: #fbe9f5; color: var(--girls); border-color: #f0c7e2; }
.tag-dist { background: #eef3ff; color: var(--accent); border-color: #c9d6f5; }
.card-chev { color: var(--ink-fade); font-size: 1.5rem; flex: 0 0 auto; }
.card.active { border-color: var(--brand); background: var(--brand-soft); }
.card.hidden { display: none; }

/* ============ filters bar ============ */
.filters-bar {
  display: grid; gap: 10px;
  margin-bottom: 18px;
}
.search-row input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--paper-edge); border-radius: var(--radius-sm);
  background: var(--paper);
}
.search-row input:focus { outline: 2px solid var(--brand); outline-offset: -2px; }

.filters-wrap {
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius);
}
.filters-summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; font-weight: 600; color: var(--ink-soft);
  user-select: none;
}
.filters-summary::-webkit-details-marker { display: none; }
.filters-summary::after { content: '▾'; margin-left: auto; transition: transform .15s; }
.filters-wrap[open] .filters-summary::after { transform: rotate(180deg); }
.active-count {
  background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; font-size: 0.75rem; padding: 1px 8px; min-width: 18px; text-align: center;
}
.active-count:empty { display: none; }
.filters { padding: 4px 14px 14px; display: grid; gap: 12px; }
.field label {
  display: block; font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600;
}
.field select, .field input[type="text"], .field input[type="search"] {
  width: 100%; padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--paper-edge); background: var(--paper);
}
.field.checkbox { display: flex; align-items: center; }
.field.checkbox label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 0.95rem; color: var(--ink); font-weight: 400;
}
.dist-row { display: flex; gap: 8px; }
.dist-row input { flex: 1 1 auto; min-width: 0; }
.dist-row select { flex: 0 0 90px; }
.locate-btn, .reset-btn {
  padding: 9px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--paper-edge); background: var(--paper); color: var(--ink);
}
.locate-btn { width: 100%; }
.locate-btn.active { background: var(--brand); color: white; border-color: var(--brand); }
.reset-btn { width: 100%; color: var(--ink-soft); }
.locate-status { margin: 4px 0 0; font-size: 0.78rem; color: var(--ink-soft); min-height: 1.1em; }
.locate-status.error { color: var(--red); }

/* ============ Bezirk grid ============ */
.bezirk-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.bezirk-grid a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500;
}
.bezirk-grid a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.bezirk-count {
  font-size: 0.85rem; color: var(--ink-soft); font-weight: 600;
  background: var(--paper-soft); padding: 1px 8px; border-radius: 999px;
}

/* ============ pager ============ */
.pager {
  margin-top: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.show-more {
  padding: 11px 22px; min-width: 200px;
  background: var(--paper); color: var(--brand);
  border: 1px solid var(--brand); border-radius: var(--radius-sm);
  font-weight: 600;
}
.show-more:hover { background: var(--brand); color: white; }
.pager-status { margin: 0; text-align: center; }

/* ============ legend dots ============ */
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle;
}
.dot.status-green   { background: var(--green); }
.dot.status-yellow  { background: var(--yellow); }
.dot.status-red     { background: var(--red); }
.dot.status-grey    { background: var(--grey); }

/* ============ map pins (Leaflet) ============ */
.leaflet-container { background: #dde4ee; font: inherit; }
.pin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.pin.status-green   { background: var(--green); }
.pin.status-yellow  { background: var(--yellow); }
.pin.status-red     { background: var(--red); }
.pin.status-grey    { background: var(--grey); }
.pin.active {
  transform: scale(1.4); z-index: 1000;
  box-shadow: 0 0 0 4px rgba(11,107,58,0.25), 0 1px 4px rgba(0,0,0,.4);
}
.home-pin {
  width: 12px; height: 12px; background: var(--accent); border: 2px solid white; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.25), 0 1px 3px rgba(0,0,0,.35);
}
.leaflet-popup-content { margin: 10px 12px; font-size: 0.9rem; }
.popup-name { font-weight: 600; }
.popup-row { color: var(--ink-soft); font-size: 0.82rem; margin: 2px 0 6px; }
.popup-link {
  display: inline-block; background: var(--brand); color: white !important; padding: 4px 10px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.85rem;
}
.popup-link:hover { background: var(--brand-dark); text-decoration: none; }

/* ============ about ============ */
.section-about { background: var(--paper-soft); }
.about-grid {
  display: grid; gap: 22px;
}
.about-grid h2 { font-size: 1.15rem; }
.about-grid p { color: var(--ink-soft); }
.report-link {
  display: inline-block; padding: 9px 14px; background: var(--paper);
  border: 1px solid var(--paper-edge); border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.report-link:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* ============ footer ============ */
.site-footer {
  background: var(--ink); color: rgba(255,255,255,0.7);
  padding: 28px 0; font-size: 0.92rem;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: white; text-decoration: underline; }
.site-footer strong { color: white; }
.site-footer .muted { color: rgba(255,255,255,0.55); }
.footer-row {
  display: grid; gap: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 22px; }

/* ============ club page ============ */
.page-club { background: var(--paper-soft); }
.crumbs {
  max-width: var(--max-width); margin: 0 auto; padding: 14px 16px;
  font-size: 0.85rem; color: var(--ink-soft);
}
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li::after { content: '/'; margin-left: 6px; color: var(--ink-fade); }
.crumbs li:last-child::after { content: ''; }
.crumbs li[aria-current="page"] { color: var(--ink); font-weight: 500; }

.club {
  max-width: 780px; margin: 0 auto 40px; padding: 0;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.club-hero { padding: 22px 20px 16px; }
.club-hero h1 { font-size: 1.5rem; margin-bottom: 10px; }
.hero-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero-tag {
  display: inline-block; background: var(--paper-soft); color: var(--ink-soft);
  padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; border: 1px solid var(--paper-edge);
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500;
  background: var(--paper-soft); color: var(--ink); border: 1px solid var(--paper-edge);
}
.status-pill.status-green  { background: #e6f6ec; border-color: #b6e0c2; color: #0d6c33; }
.status-pill.status-yellow { background: #fdf4dd; border-color: #f0d99a; color: #8a6614; }
.status-pill.status-red    { background: #fbe7e4; border-color: #f0bbb3; color: #91362a; }
.status-pill.status-grey   { background: var(--paper-soft); }

.locator { height: 240px; border-top: 1px solid var(--paper-edge); border-bottom: 1px solid var(--paper-edge); }

.block { padding: 18px 20px; border-top: 1px solid var(--paper-edge); }
.block h2 { font-size: 1rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.block p { margin: 0 0 .6em; }

.facts {
  display: grid; gap: 10px 16px; grid-template-columns: max-content 1fr;
  margin: 0;
}
.facts .fact { display: contents; }
.facts dt { color: var(--ink-soft); font-size: 0.85rem; }
.facts dd { margin: 0; }

.age-group { padding: 10px 0; border-top: 1px solid var(--paper-edge); }
.age-group:first-child { border-top: 0; }
.age-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.age-label { font-weight: 600; }
.age-detail { margin-top: 6px; color: var(--ink-soft); font-size: 0.9rem; }
.age-line { margin: 2px 0; }

.confidence {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
}
.confidence.high { background: #e6f6ec; color: #0d6c33; }
.confidence.medium { background: #fdf4dd; color: #8a6614; }
.confidence.low { background: var(--paper-edge); color: var(--ink-soft); }

.club-foot { padding: 18px 20px 8px; border-top: 1px solid var(--paper-edge); }
.cards-stacked { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* ============ desktop ============ */
@media (min-width: 720px) {
  .header-nav { display: inline-flex; }
  .container { padding: 0 22px; }
  .stats-row { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .stat strong { font-size: 1.6rem; }
  .filters-bar {
    grid-template-columns: 1fr 1fr; align-items: start;
  }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:nth-of-type(5) { grid-column: 1 / -1; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .bezirk-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-row { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 980px) {
  .hero { padding: 44px 0 48px; }
  .hero-inner { grid-template-columns: 1.05fr 1.15fr; gap: 38px; align-items: stretch; }
  .hero-map { height: 100%; min-height: 420px; }
  .hero-search {
    grid-template-columns: 1.4fr 0.8fr 0.7fr auto; gap: 10px; align-items: end;
  }
  .hero-submit { margin-top: 0; height: 44px; }
  .stats-row { gap: 22px; }
  .bezirk-grid { grid-template-columns: repeat(4, 1fr); }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: 160px 1fr; }
  .club-hero { padding: 30px 32px 22px; }
  .block { padding: 24px 32px; }
  .club-foot { padding: 24px 32px 14px; }
  .crumbs { padding-left: 22px; padding-right: 22px; }
}
