/*
Theme Name: Förderverein Borsigwalder
Theme URI: https://www.borsigwalder-freunde.de
Description: Block-Theme für die Freunde der Borsigwalder Grundschule e.V. – abgeleitet aus Vereinslogo und Flyer.
Version: 1.0.8
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: foerderverein
License: GPL-2.0-or-later
*/

/* ---------- Grundlagen ---------- */
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .wp-element-button:focus-visible {
  outline: 3px solid var(--wp--preset--color--dunkelgruen);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Kopfzeile ---------- */
.fv-kopf { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--wp--preset--color--linie); }
.fv-wortmarke .wp-block-site-title { font-weight: 800; font-size: 17px; line-height: 1.25; margin: 0; }
.fv-wortmarke .wp-block-site-title a { color: var(--wp--preset--color--text); text-decoration: none; }
.fv-wortmarke .wp-block-site-tagline { font-size: 15px; color: var(--wp--preset--color--grau); margin: 0; }
@media (max-width: 520px) { .fv-wortmarke { display: none !important; } }
.fv-kopf .wp-block-navigation a { padding: 12px 10px; text-decoration: none; }
.fv-kopf .wp-block-navigation__responsive-container-open { width: 48px; height: 48px; border: 1.5px solid #CFDCC4; border-radius: 14px; justify-content: center; }
.fv-kopf .fv-cta .wp-block-button__link { padding: 11px 20px; white-space: nowrap; }
@media (max-width: 600px) { .fv-kopf .fv-cta .wp-block-button__link { font-size: 16px; padding: 11px 16px; } }

/* ---------- Handschrift nur im Einstieg ---------- */
.fv-handschrift { font-family: var(--wp--preset--font-family--caveat) !important; text-transform: none !important; color: var(--wp--preset--color--handschrift) !important; line-height: .95 !important; }
.fv-zeile { font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--dunkelgruen); margin: 0; }

/* ---------- Blätter-Konfetti um Figuren ---------- */
.fv-konfetti { position: relative; padding: 36px 30px 0; }
.fv-konfetti::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("assets/images/konfetti.svg") center / contain no-repeat;
}
.fv-konfetti img { position: relative; }

/* ---------- Kleine Blätter (Kategorie, Leiste, Karten) ---------- */
.fv-blatt::before {
  content: ""; display: inline-block; width: 9px; height: 13px; margin-right: 6px; vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("assets/images/blatt.svg") center / contain no-repeat; mask: url("assets/images/blatt.svg") center / contain no-repeat;
}
.fv-blatt-gross::before { width: 26px; height: 36px; display: block; margin: 0 0 6px; }
.fv-blatt-mittel { position: relative; padding-left: 34px; }
.fv-blatt-mittel::before { position: absolute; left: 0; top: 2px; width: 20px; height: 28px; margin: 0; }
.fv-blatt-blau::before { background: var(--wp--preset--color--blatt-blau); }
.fv-blatt-gruen::before { background: var(--wp--preset--color--blatt-gruen); }
.fv-blatt-orange::before { background: var(--wp--preset--color--blatt-orange); }
.fv-blatt-gelb::before { background: var(--wp--preset--color--blatt-gelb); }
.fv-blatt-pink::before { background: var(--wp--preset--color--blatt-pink); }
.fv-blatt-rot::before { background: var(--wp--preset--color--blatt-rot); }

/* Kategorie-Blatt automatisch an Beiträgen in Abfrage-Schleifen */
.wp-block-post-terms.taxonomy-category a { color: var(--wp--preset--color--text); font-weight: 800; text-decoration: none; }
.wp-block-post-terms.taxonomy-category a::before {
  content: ""; display: inline-block; width: 9px; height: 13px; margin-right: 6px; vertical-align: -1px; background: var(--wp--preset--color--grau);
  -webkit-mask: url("assets/images/blatt.svg") center / contain no-repeat; mask: url("assets/images/blatt.svg") center / contain no-repeat;
}
.category-veranstaltung .wp-block-post-terms.taxonomy-category a::before { background: var(--wp--preset--color--blatt-orange); }
.category-gefoerdert .wp-block-post-terms.taxonomy-category a::before { background: var(--wp--preset--color--blatt-blau); }
.category-vereinsleben .wp-block-post-terms.taxonomy-category a::before { background: var(--wp--preset--color--blatt-pink); }
.category-schulleben .wp-block-post-terms.taxonomy-category a::before { background: var(--wp--preset--color--blatt-gelb); }

/* ---------- Karten und Listen ---------- */
.fv-karte { border-radius: 20px; }
.fv-karte-rahmen { border: 1px solid var(--wp--preset--color--linie); border-radius: 20px; }
.fv-news-liste .wp-block-post { padding: 16px 0; border-bottom: 1px solid var(--wp--preset--color--linie); }
.fv-news-liste .wp-block-post:last-child { border-bottom: 0; }
.fv-news-liste .wp-block-post-title { font-size: 20px; margin: 4px 0 0; }
.fv-fakten { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 700; font-size: 16px; }

/* ---------- Spenden ---------- */
.fv-iban { white-space: nowrap; font-weight: 800; }
.fv-kopieren { font: inherit; font-size: 15px; font-weight: 800; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--wp--preset--color--gruen); background: #fff; color: var(--wp--preset--color--gruen); cursor: pointer; min-height: 40px; }

/* ---------- Formulare (Contact Form 7) ---------- */
/* Contact Form 7 setzt Zeilenumbrüche und Absätze um die Felder; Abstände regeln wir hier einheitlich. */
.wpcf7 form br { display: none; }
.wpcf7 form > p { margin: 0 0 22px; }
.wpcf7 form h3 { margin: 40px 0 18px; font-size: 22px; }
.wpcf7 form h3:first-of-type { margin-top: 8px; }

.wpcf7 label,
.wpcf7 form > p:has(+ p .wpcf7-radio) { display: block; font-weight: 700; font-size: 16px; color: var(--wp--preset--color--text, #1E2B22); }
.wpcf7 form > p > label { margin-bottom: 18px; }
.wpcf7 form > p > label:last-child { margin-bottom: 0; }
.wpcf7 form > p:has(+ p .wpcf7-radio) { margin-bottom: 10px; }
.wpcf7 label .wpcf7-form-control-wrap { display: block; margin-top: 6px; }

.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=number], .wpcf7 input[type=tel], .wpcf7 textarea {
  font: inherit; font-weight: 400; width: 100%; padding: 12px 14px; border: 1.5px solid #9DB0A3; border-radius: 12px; min-height: 50px; background: #fff; color: inherit;
}
.wpcf7 textarea { min-height: 160px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--wp--preset--color--gruen, #3F7E08); outline: 3px solid rgba(63,126,8,.18); outline-offset: 0; }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: #7A887F; }
.wpcf7 input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.wpcf7 input[type=number]::-webkit-outer-spin-button, .wpcf7 input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Auswahl (Rolle, Beitrag) als Kacheln */
.wpcf7 .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.wpcf7 form > p > .wpcf7-form-control-wrap:last-child .wpcf7-radio { margin-bottom: 0; }
.wpcf7 .wpcf7-radio .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-radio .wpcf7-list-item label { margin: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border: 1.5px solid #9DB0A3; border-radius: 999px; background: #fff; font-weight: 700; cursor: pointer; }
.wpcf7 .wpcf7-radio .wpcf7-list-item label:has(input:checked) { border-color: var(--wp--preset--color--gruen, #3F7E08); background: var(--wp--preset--color--hellgruen, #EEF4E3); box-shadow: inset 0 0 0 1px var(--wp--preset--color--gruen, #3F7E08); }
.wpcf7 input[type=radio], .wpcf7 input[type=checkbox] { accent-color: var(--wp--preset--color--gruen, #3F7E08); width: 20px; height: 20px; margin: 0; flex: none; }

/* Mithelfen */
.wpcf7 .wpcf7-checkbox .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-checkbox .wpcf7-list-item label { margin: 0; display: flex; align-items: flex-start; gap: 12px; font-weight: 700; cursor: pointer; }
.wpcf7 .wpcf7-checkbox input[type=checkbox] { width: 22px; height: 22px; margin-top: 2px; }

/* „Anderer Betrag“ erst zeigen, wenn er ausgewählt ist */
.wpcf7 form:has(input[name=beitrag][value="Anderer Betrag"]:not(:checked)) label:has([data-name=betrag]) { display: none; }
.wpcf7 label:has([data-name=betrag]) { margin-top: 16px; max-width: 280px; }

.wpcf7 .fv-hinweis { font-size: 15px; color: var(--wp--preset--color--grau, #56655B); }

/* Absenden wie die übrigen Buttons der Seite */
.wpcf7 input[type=submit] {
  font-family: var(--wp--preset--font-family--nunito, inherit); font-size: 18px; font-weight: 800; line-height: 1.3;
  padding: 15px 32px; border: 0; border-radius: 999px; cursor: pointer; min-height: 52px;
  background: var(--wp--preset--color--gruen, #3F7E08); color: #fff; margin-top: 8px;
}
.wpcf7 input[type=submit]:hover { background: var(--wp--preset--color--dunkelgruen, #2D5B37); }
.wpcf7 input[type=submit]:disabled { opacity: .6; cursor: wait; }
.wpcf7 .wpcf7-spinner { vertical-align: middle; margin: 8px 0 0 12px; }

/* Fehler und Rückmeldungen */
.wpcf7 .wpcf7-not-valid { border-color: var(--wp--preset--color--fehler, #B42318) !important; }
.wpcf7 .wpcf7-not-valid-tip { font-size: 14px; font-weight: 700; margin-top: 6px; color: var(--wp--preset--color--fehler, #B42318); }
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; border-radius: 16px; padding: 16px 20px; font-weight: 700; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border: 2px solid #B42318; background: #FEF3F2; }
.wpcf7 form.sent .wpcf7-response-output { border: 2px solid var(--wp--preset--color--gruen, #3F7E08); background: var(--wp--preset--color--hellgruen, #EEF4E3); }

/* ---------- Seiten: Text links bündig mit dem Kopf, Personen-Raster in voller Breite ---------- */
.wp-block-post-content > .fv-personen { max-width: var(--wp--style--global--wide-size, 1200px); }

/* ---------- „Für die Kinder bereits ermöglicht“: Karten füllen die Reihe ---------- */
.fv-ermoeglicht.fv-ermoeglicht { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .fv-ermoeglicht.fv-ermoeglicht { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fv-ermoeglicht.fv-ermoeglicht { grid-template-columns: 1fr; } }

/* Honigtopf-Feld der Formulare (fv-sicherheit.php) nie anzeigen */
.fv-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mobil ---------- */
@media (max-width: 620px) { .fv-figur-klein { max-width: 150px !important; margin-inline: auto; } }

/* ---------- Personen (Vorstand, Beisitz) ---------- */
.fv-personen { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 20px 16px; }
.fv-personen li { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.35; color: #56655B; }
.fv-personen li img, .fv-personen .fv-initialen { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; margin: 0 0 10px; background: #EEF4E3; }
.fv-personen .fv-initialen { display: flex; align-items: center; justify-content: center; font-family: var(--wp--preset--font-family--barlow-condensed, 'Barlow Condensed', sans-serif); font-weight: 700; font-size: 44px; color: #3F7E08; }
.fv-personen li strong { color: #1E2B22; font-weight: 800; font-size: 17px; }

/* Sechs Einträge im Kopf (mit Kontakt): Menü-Knopf bis 1140 px statt bis 600 px, Einträge nicht umbrechen */
.fv-kopf .wp-block-navigation a { white-space: nowrap; }
@media (max-width: 1140px) {
  .fv-kopf .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .fv-kopf .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* ---------- Menü auf dem Handy und Tablet (Overlay) ---------- */
@media (max-width: 1140px) {
  .fv-kopf .wp-block-navigation__responsive-container-open { align-items: center; padding: 0; }
  .fv-kopf .wp-block-navigation__responsive-container-open svg { width: 26px; height: 26px; }
  .fv-kopf .wp-block-navigation__responsive-container.is-menu-open { padding: 16px 20px 32px; background: #fff; color: var(--wp--preset--color--text, #1E2B22); }
  .fv-kopf .is-menu-open .wp-block-navigation__responsive-close { max-width: 640px; margin: 0 auto; }
  .fv-kopf .is-menu-open .wp-block-navigation__responsive-container-close {
    top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border: 1.5px solid #CFDCC4; border-radius: 14px; background: #fff;
  }
  .fv-kopf .is-menu-open .wp-block-navigation__responsive-container-close svg { width: 26px; height: 26px; }
  .fv-kopf .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 72px !important; align-items: stretch !important; }
  .fv-kopf .is-menu-open .wp-block-navigation__container { align-items: stretch !important; justify-content: flex-start !important; gap: 0 !important; width: 100%; }
  .fv-kopf .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--wp--preset--color--linie, #E3EBD8); }
  .fv-kopf .is-menu-open .wp-block-navigation-item:first-child { border-top: 1px solid var(--wp--preset--color--linie, #E3EBD8); }
  .fv-kopf .is-menu-open .wp-block-navigation-item__content {
    display: flex !important; align-items: center; justify-content: space-between; width: 100%;
    padding: 18px 4px !important; font-size: 22px; font-weight: 800; line-height: 1.2; color: inherit;
  }
  .fv-kopf .is-menu-open .wp-block-navigation-item__content::after {
    content: ""; width: 10px; height: 10px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(45deg); opacity: .45; flex: none; margin-right: 6px;
  }
  .fv-kopf .is-menu-open .current-menu-item > .wp-block-navigation-item__content,
  .fv-kopf .is-menu-open .wp-block-navigation-item__content[aria-current="page"] { color: var(--wp--preset--color--gruen, #3F7E08); }
}
@media (max-width: 420px) {
  .fv-kopf .fv-cta .wp-block-button__link { font-size: 15px; padding: 10px 14px; }
}

/* ---------- Bildergalerien in Beiträgen ---------- */
.wp-block-gallery.has-nested-images { gap: 10px; margin-top: 28px; margin-bottom: 28px; }
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 14px; }
.wp-block-gallery.has-nested-images figure.wp-block-image { border-radius: 14px; overflow: hidden; }
.wp-block-gallery.has-nested-images figure.wp-block-image:has(img) { cursor: zoom-in; }
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption { border-radius: 0 0 14px 14px; font-size: 14px; }
@media (max-width: 600px) { .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image) { width: calc(50% - 5px); } }
.wp-block-image img { border-radius: 14px; }
/* Vergrößerte Ansicht (Lightbox) mit dunklem Hintergrund */
.wp-lightbox-overlay .scrim { background-color: rgba(18, 28, 21, .92) !important; }
.wp-lightbox-overlay .close-button { color: #fff; }
.wp-lightbox-overlay .close-button svg { fill: #fff; }

