/*
Theme Name: FSV Reddehausen
Description: Vereinstheme mit Terminkalender für Alte Herren, Dart und Feste. Schriften liegen lokal im Theme, es werden keine externen Dienste geladen.
Version: 1.2.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: fsv
License: GPL-2.0-or-later
*/

@font-face {
  font-family: "Bitter";
  src: url("assets/fonts/bitter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Grundwerte ---------- */
:root {
  --rasen: #1d7a3e;
  --tanne: #0f3a22;
  --kreide: #ffffff;
  --papier: #f7faf6;
  --tint: #e9f2e8;
  --linie: #d9e3d6;
  --text: #16231b;
  --text-soft: #4a5b50;
  --dart: #b3302a;
  --fest: #e9b92e;
  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  /* Terminart-Standard, wird pro Klasse überschrieben */
  --c-bg: #e6ebe4;
  --c-fg: #26332b;
  --c-bd: #9aa89d;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rasen); text-underline-offset: 0.2em; }
a:hover { color: var(--tanne); }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--tanne);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 800;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--tanne);
  outline-offset: 3px;
}

.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--tanne);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

.empty { color: var(--text-soft); }
.sep { color: var(--linie); padding: 0 0.3em; }

/* ---------- Kopfzeile ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--linie);
  position: relative;
  z-index: 20;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--tanne);
}
.brand-logo { height: 3.4rem; width: auto; max-width: 3.4rem; object-fit: contain; flex: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 3.2rem; height: 3.2rem;
  border-radius: 50%;
  background: var(--rasen);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.1;
}

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 700;
  background: var(--tanne);
  color: #fff;
  border: 0;
  border-radius: 0.35rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.15rem; }
.menu li { position: relative; }
.menu a {
  display: block;
  padding: 0.7rem 0.9rem;
  color: var(--tanne);
  font-weight: 700;
  text-decoration: none;
}
.menu a:hover { background: var(--tint); }
.menu .current-menu-item > a,
.menu .current-menu-ancestor > a,
.menu .current_page_item > a {
  box-shadow: inset 0 -3px 0 var(--rasen);
}
.menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  position: absolute;
  left: 0; top: 100%;
  min-width: 12rem;
  background: #fff;
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rasen);
  display: none;
}
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu { display: block; }
.menu .sub-menu a { white-space: nowrap; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .js .nav { display: none; }
  .js .nav-open .nav { display: block; }
  .nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--linie);
    padding: 0.5rem 1rem 1rem;
  }
  .menu { flex-direction: column; }
  .menu .sub-menu {
    display: block;
    position: static;
    border: 0;
    border-left: 3px solid var(--tint);
    margin-left: 0.9rem;
    padding: 0;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}
.btn-green { background: var(--rasen); color: #fff; }
.btn-green:hover { background: var(--tanne); color: #fff; }
.btn-outline { border-color: var(--rasen); color: var(--rasen); background: #fff; }
.btn-outline:hover { background: var(--tint); color: var(--tanne); }
.btn-light { background: #fff; color: var(--tanne); }
.btn-light:hover { background: var(--tint); color: var(--tanne); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.85); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Terminarten (Farben) ---------- */
.art-ah-heim       { --c-bg: var(--rasen); --c-fg: #fff;    --c-bd: var(--rasen); }
.art-ah-auswaerts  { --c-bg: #fff;         --c-fg: var(--tanne); --c-bd: var(--rasen); }
.art-ah-training   { --c-bg: #d6ead6;      --c-fg: var(--tanne); --c-bd: #6fae7e; }
.art-dart-turnier  { --c-bg: var(--dart);  --c-fg: #fff;    --c-bd: var(--dart); }
.art-dart-training { --c-bg: #f6dedb;      --c-fg: #5e1713; --c-bd: #d98a84; }
.art-fest          { --c-bg: var(--fest);  --c-fg: #2b2306; --c-bd: #c99a0e; }
.art-verein        { --c-bg: #e3e9e1;      --c-fg: #26332b; --c-bd: #8a9a8e; }

.pill {
  display: inline-block;
  padding: 0.05rem 0.65rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--c-bg);
  color: var(--c-fg);
  border: 1.5px solid var(--c-bd);
}

/* ---------- Startseite: Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--tanne);
  color: #fff;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/img/spielfeld.svg") no-repeat 115% 50% / auto 150%;
  opacity: 0.13;
  pointer-events: none;
}
.hero.has-photo {
  background: linear-gradient(90deg, rgba(15, 58, 34, 0.94) 25%, rgba(15, 58, 34, 0.55)), var(--hero-img) center / cover, var(--tanne);
}
.hero.has-photo::before { display: none; }

.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: end;
}
.hero-id { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; margin-bottom: 1.6rem; }
.hero-crest { width: 6.5rem; height: auto; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.hero h1 { color: #fff; font-size: clamp(2rem, 6.2vw, 3.6rem); line-height: 1.08; margin-bottom: 0.35em; text-wrap: balance; }
.hero-motto { font-family: 'Bitter', Georgia, serif; font-style: italic; font-size: 1.2rem; margin: 0; padding-left: 0.9rem; border-left: 3px solid var(--fest); color: rgba(255, 255, 255, 0.95); }
@media (min-width: 640px) { .hero-id { flex-direction: row; align-items: center; gap: 1.6rem; } .hero-crest { width: 8rem; } }
.foot-crest { width: 4.2rem; height: auto; margin-bottom: 0.8rem; }
.foot-motto { font-style: italic; opacity: 0.85; }
.hero-lead { font-size: 1.3rem; max-width: 30rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.hero :focus-visible, .site-footer :focus-visible, .board :focus-visible { outline-color: #fff; }

.board {
  position: relative;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(15, 58, 34, 0.55);
}
.board::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.board-label { font-weight: 700; margin: 0 0 1rem; }
.board-main { display: flex; gap: 1.1rem; align-items: flex-start; }
.board-date { text-align: center; min-width: 4.2rem; }
.board-day { display: block; font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; line-height: 0.95; }
.board-mon { display: block; font-weight: 700; }
.board-title { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; line-height: 1.2; margin: 0 0 0.35rem; }
.board-title a { color: #fff; text-decoration: none; }
.board-title a:hover { text-decoration: underline; }
.board-meta { margin: 0; color: rgba(255, 255, 255, 0.88); }
.board-empty { margin: 0 0 0.5rem; }
.board-link { color: #fff; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.35fr 1fr; }
}

/* ---------- Abschnitte ---------- */
.block { padding: clamp(2.2rem, 5vw, 3.8rem) 0; }
.block-tint { background: var(--tint); }
.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.4rem;
}
.block-head h2 { margin: 0; }
.block-head p { margin: 0; }

.page-head {
  background: var(--tint);
  border-bottom: 1px solid var(--linie);
  padding: clamp(1.8rem, 4vw, 3rem) 0 clamp(1.2rem, 3vw, 2rem);
}
.page-head h1 { margin: 0.2em 0 0; }
.page-head .lead { margin: 0.4rem 0 0; color: var(--text-soft); }

.prose-wrap { padding: 2rem 0 3.5rem; }
.prose > * { max-width: 42rem; }
.prose > .people, .prose > .timeline, .prose > .wp-block-group { max-width: none; }
.prose > .ev-list { max-width: 46rem; }
.prose h2 { margin-top: 1.6em; }
.prose img { height: auto; }
.more { margin-top: 1.2rem; font-weight: 700; }
.post-img { margin-bottom: 1.5rem; max-width: 42rem; }

/* ---------- Terminliste ---------- */
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--linie);
}
.ev:first-child { border-top: 0; }
.ev-date {
  border-left: 6px solid var(--c-bd);
  padding-left: 0.7rem;
  line-height: 1.1;
}
.ev-wd, .ev-mon { display: block; font-size: 0.95rem; color: var(--text-soft); font-weight: 700; }
.ev-day { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--tanne); }
.ev-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--tanne);
  text-decoration: none;
}
.ev-title:hover { text-decoration: underline; }
.ev-meta { margin: 0.15rem 0 0.4rem; color: var(--text-soft); }

/* ---------- Kalenderseite ---------- */
.cal { padding: 1.5rem 0 3.5rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.filter {
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  border: 1.5px solid var(--c-bd);
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.filter:hover { background: var(--tint); }
.filter.is-active { background: var(--c-bg); color: var(--c-fg); }
.filters > .filter:first-child.is-active { background: var(--tanne); color: #fff; border-color: var(--tanne); }

.cal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.month-nav { display: flex; align-items: center; gap: 1rem; }
.month-title { margin: 0; min-width: 11rem; text-align: center; }
.cal .btn { padding: 0.5rem 1rem; }

.view-toggle { display: inline-flex; border: 2px solid var(--rasen); border-radius: 0.35rem; overflow: hidden; }
.view-toggle a { padding: 0.45rem 1rem; font-weight: 700; text-decoration: none; color: var(--rasen); background: #fff; }
.view-toggle a[aria-current] { background: var(--rasen); color: #fff; }

.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.cal-table th {
  padding: 0.5rem;
  background: var(--tanne);
  color: #fff;
  font-weight: 700;
  text-align: left;
}
.cal-table td {
  height: 6.8rem; /* wirkt als Mindesthöhe */
  vertical-align: top;
  padding: 0.3rem;
  border: 1px solid var(--linie);
  overflow: hidden;
}
.cal-table td.is-empty { background: var(--papier); }
.daynum { display: inline-block; min-width: 1.6rem; padding: 0 0.3rem; font-weight: 700; color: var(--text-soft); text-align: center; }
.is-today .daynum { background: var(--rasen); color: #fff; border-radius: 99px; }
.chip {
  display: block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.8rem;
  line-height: 1.3;
  background: var(--c-bg);
  color: var(--c-fg);
  border: 1px solid var(--c-bd);
  border-radius: 0.25rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.chip:hover { text-decoration: underline; color: var(--c-fg); }

.cal-view-liste .cal-grid { display: none; }
.cal-view-monat .cal-list { display: none; }
.cal-list { max-width: 46rem; }

@media (max-width: 760px) {
  .cal.cal-view-monat .cal-grid,
  .cal.cal-view-liste .cal-grid { display: none; }
  .cal.cal-view-monat .cal-list,
  .cal.cal-view-liste .cal-list { display: block; }
  .view-toggle { display: none; }
  .month-title { min-width: 0; font-size: 1.4rem; }
}

.subscribe { margin-top: 2.5rem; padding: 1.4rem 1.5rem; background: var(--tint); border-left: 6px solid var(--rasen); max-width: 46rem; }
.subscribe p { margin-bottom: 0.7em; }
.subscribe p:last-child { margin-bottom: 0; }
.subscribe-link { margin-left: 0.8rem; }

/* ---------- Einzeltermin ---------- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; margin: 0 0 1.5rem; max-width: 42rem; }
.facts dt { font-weight: 700; color: var(--tanne); }
.facts dd { margin: 0; }

/* ---------- Abteilungen ---------- */
.dept-grid { display: grid; gap: 1.5rem; margin-top: 1.2rem; }
@media (min-width: 760px) { .dept-grid { grid-template-columns: 1fr 1fr; } }

.dept {
  position: relative;
  background: #fff;
  border-top: 6px solid var(--c-bd);
  padding: 1.5rem;
}
.dept-ah   { --c-bd: var(--rasen); }
.dept-dart { --c-bd: var(--dart); }
.dept-icon { color: var(--c-bd); margin-bottom: 0.6rem; }
.dept h3 { font-size: 1.7rem; margin-bottom: 0.3em; }
.dept h3 a { color: var(--tanne); text-decoration: none; }
.dept h3 a::after { content: ""; position: absolute; inset: 0; }
.dept:hover h3 a { text-decoration: underline; }
.dept:focus-within { outline: 3px solid var(--tanne); outline-offset: 3px; }
.dept h3 a:focus-visible { outline: 0; }
.dept-next { margin: 0; font-weight: 700; color: var(--text-soft); }

/* ---------- News ---------- */
.news-grid { display: grid; gap: 2rem; margin-top: 1.2rem; }
@media (min-width: 760px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-img { display: block; margin-bottom: 0.8rem; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint); }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-date { display: block; color: var(--text-soft); font-size: 0.95rem; margin-bottom: 0.2rem; }
.news h3 { margin-bottom: 0.3em; }
.news h3 a { color: var(--tanne); text-decoration: none; }
.news h3 a:hover { text-decoration: underline; }
.news p { color: var(--text-soft); margin: 0; }
.pager { margin-top: 2rem; }
.pager .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pager .page-numbers { padding: 0.4rem 0.8rem; border: 1px solid var(--linie); text-decoration: none; background: #fff; }
.pager .current { background: var(--rasen); color: #fff; border-color: var(--rasen); }

/* ---------- Vorstand ---------- */
.people { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.person-photo img, .person-initials { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person-initials { display: grid; place-items: center; background: var(--tint); color: var(--rasen); font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; }
.person h3 { margin: 0.8rem 0 0.1rem; font-size: 1.2rem; }
.person-role { margin: 0 0 0.4rem; font-weight: 700; color: var(--text-soft); }
.person-contact { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }

/* ---------- Geschichte ---------- */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0 0 0 1.4rem; border-left: 3px solid var(--rasen); max-width: 54rem; }
.tl { position: relative; padding: 0 0 2.8rem 1.2rem; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: calc(-1.4rem - 9px); top: 0.6rem; width: 15px; height: 15px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 4px solid var(--rasen); }
.tl-year { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; line-height: 1.1; color: var(--rasen); }
.tl h3 { margin: 0.2rem 0 0.4rem; }
.tl-text > :last-child { margin-bottom: 0; }
.tl-img { margin: 1rem 0 0; max-width: 34rem; }
.tl-img img { width: 100%; }
.tl-img figcaption { margin-top: 0.4rem; font-size: 0.95rem; color: var(--text-soft); }

/* ---------- Mitglied werden ---------- */
.downloads { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.2rem 0; }

/* ---------- Mitmach-Band ---------- */
.cta { background: var(--rasen); color: #fff; padding: clamp(2rem, 5vw, 3.2rem) 0; }
.cta h2 { color: #fff; margin-bottom: 0.3em; }
.cta p { margin: 0; max-width: 38rem; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta .btn-green { background: #fff; color: var(--tanne); }
.cta .btn-green:hover { background: var(--tint); }
.cta :focus-visible { outline-color: #fff; }

/* ---------- Sponsoren ---------- */
.sponsors { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.2rem; margin: 1.2rem 0 0; padding: 0; }
.sponsors a { display: block; }
.sponsors img { width: auto; }
.sponsors-premium img { max-height: 5rem; }
.sponsors-partner img { max-height: 3rem; filter: grayscale(1); opacity: 0.8; transition: filter 0.15s, opacity 0.15s; }
.sponsors-partner a:hover img, .sponsors-partner a:focus-visible img { filter: none; opacity: 1; }
.sponsor-name { font-family: var(--font-head); font-weight: 700; color: var(--tanne); }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--tanne); color: rgba(255, 255, 255, 0.9); padding-top: 2.5rem; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; gap: 1.8rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
.foot-title { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 0.5rem; }
.site-footer p { margin-bottom: 0.4em; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 0.3em; }
.foot-base { margin-top: 2rem; padding: 1rem 0 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.2); font-size: 0.95rem; }
.foot-base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Platzsponsoring: Spendenseite mit Zwei-Klick-Laden */
.spende-box { border: 2px solid var(--rasen); border-radius: 6px; background: #fff; padding: 1.4rem; margin: 1.5rem 0; }
.prose > .spende-box { max-width: none; }
.spende-box p { max-width: 42rem; }
.spende-box.is-loaded { border: 0; padding: 0; background: none; border-radius: 0; }
.spende-box .btn { margin-right: 0.6rem; margin-bottom: 0.5rem; }
.spende-frame { width: 100%; height: calc(100vh - 5rem); min-height: 720px; border: 0; background: #fff; display: block; }
.spende-note { font-size: 0.95rem; color: #3b4a3f; }

button.btn { font-family: inherit; font-size: 1rem; cursor: pointer; }
