/*
Theme Name: Hoffnung Schenken
Theme URI: https://www.hoffnung-schenken.org
Author: Hoffnung Schenken
Author URI: https://www.hoffnung-schenken.org
Description: Block-Theme (Full Site Editing) für den Website-Relaunch des gemeinnützigen Vereins Hoffnung Schenken, Neustadt am Main.
Version: 1.19.4
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hoffnung-schenken
Tags: block-theme, full-site-editing, one-column, custom-colors, custom-typography, charity
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT MODE (DEFAULT)
   ============================================================ */

:root {
  --hs-surface:          #FFFFFF;
  --hs-surface-alt:      #FDF6EE;
  --hs-surface-raised:   #FFFFFF;
  --hs-text:             #2C1810;
  --hs-text-muted:       #5C4033;
  --hs-primary:          #E8522A;
  --hs-primary-light:    #F28C5E;
  --hs-accent:           #F5A623;
  --hs-success:          #4CAF50;
  --hs-border:           rgba(44, 24, 16, 0.12);
  --hs-shadow-sm:        0 1px 4px rgba(44, 24, 16, 0.08);
  --hs-shadow-md:        0 4px 16px rgba(44, 24, 16, 0.12);
  --hs-shadow-lg:        0 8px 32px rgba(44, 24, 16, 0.16);
  --hs-radius:           8px;
  --hs-radius-lg:        16px;
  --hs-transition:       0.2s ease;
  --hs-header-bg:        #FFFFFF;
  --hs-header-height:    72px;
  --hs-input-bg:         #FFFFFF;
  --hs-input-border:     #9A7A6A;
}

/* ============================================================
   DARK MODE — SYSTEM PREFERENCE
   ============================================================ */

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --hs-surface:          #2A1509;
    --hs-surface-alt:      #1A0D07;
    --hs-surface-raised:   #3D1F0D;
    --hs-text:             #F5EDE6;
    --hs-text-muted:       #C4A88D;
    --hs-primary:          #F06540;
    --hs-primary-light:    #F59072;
    --hs-border:           rgba(245, 237, 230, 0.1);
    --hs-shadow-sm:        0 1px 4px rgba(0, 0, 0, 0.3);
    --hs-shadow-md:        0 4px 16px rgba(0, 0, 0, 0.4);
    --hs-shadow-lg:        0 8px 32px rgba(0, 0, 0, 0.5);
    --hs-header-bg:        #1A0D07;
    --hs-input-bg:         #3D1F0D;
    --hs-input-border:     #C4A88D;
    --wp--preset--color--background: #1A0D07;
    --wp--preset--color--text-dark:  #F5EDE6;
    --wp--preset--color--text-medium:#C4A88D;
  }
}

/* ============================================================
   DARK MODE — MANUELLER OVERRIDE
   ============================================================ */

html[data-theme="dark"] {
  --hs-surface:          #2A1509;
  --hs-surface-alt:      #1A0D07;
  --hs-surface-raised:   #3D1F0D;
  --hs-text:             #F5EDE6;
  --hs-text-muted:       #C4A88D;
  --hs-primary:          #F06540;
  --hs-primary-light:    #F59072;
  --hs-border:           rgba(245, 237, 230, 0.1);
  --hs-shadow-sm:        0 1px 4px rgba(0, 0, 0, 0.3);
  --hs-shadow-md:        0 4px 16px rgba(0, 0, 0, 0.4);
  --hs-shadow-lg:        0 8px 32px rgba(0, 0, 0, 0.5);
  --hs-header-bg:        #1A0D07;
  --hs-input-bg:         #3D1F0D;
  --hs-input-border:     #C4A88D;
  --wp--preset--color--background: #1A0D07;
  --wp--preset--color--text-dark:  #F5EDE6;
  --wp--preset--color--text-medium:#C4A88D;
}

/* ============================================================
   BASE / RESET
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--wp--preset--font-family--body);
  background-color: var(--hs-surface-alt);
  color: var(--hs-text);
  transition: background-color var(--hs-transition), color var(--hs-transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea,
code,
pre {
  font-family: inherit;
}

img, video {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   SKIP-TO-CONTENT (BARRIEREFREIHEIT)
   ============================================================ */

.hs-skip-link {
  position: fixed;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-100%);
  z-index: 9999;
  padding: 12px 28px;
  background: var(--hs-primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 0 0 var(--hs-radius) var(--hs-radius);
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: var(--hs-shadow-md);
}

.hs-skip-link:focus {
  transform: translateX(-50%) translateY(0);
  /* Kein outline:none – sichtbarer Fokus-Ersatz via box-shadow (WCAG 2.4.7) */
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--hs-primary), var(--hs-shadow-md);
}

/* ============================================================
   FOKUS-STYLES (WCAG 2.1 AA)
   ============================================================ */

:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
}

/* ============================================================
   HEADER
   ============================================================ */

.hs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--hs-header-bg) !important;
  border-bottom: 1px solid var(--hs-border);
  box-shadow: var(--hs-shadow-sm);
  transition: background-color var(--hs-transition), box-shadow var(--hs-transition), border-color var(--hs-transition);
}

.hs-header > .wp-block-group__inner-container,
.hs-header > div {
  min-height: var(--hs-header-height);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  gap: 16px;
}

.hs-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none !important;
  min-width: 0;
}

.hs-header-brand .wp-block-site-logo {
  flex-shrink: 0;
  flex-grow: 0;
}

.hs-header-brand .wp-block-site-logo img {
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  aspect-ratio: 300 / 276; /* native Bildgröße → reserviert Platz vor dem Laden (CLS) */
}

.hs-header-brand .wp-block-site-title {
  font-family: 'Dancing Script', Georgia, serif;
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
  flex-grow: 0;
  margin: 0;
  padding: 0;
}

.hs-header-brand .wp-block-site-title a,
.hs-header-brand .wp-block-site-title p {
  color: var(--hs-text) !important;
  text-decoration: none !important;
  font-size: inherit;
  margin: 0;
}

.hs-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   DARK-MODE-TOGGLE-BUTTON
   ============================================================ */

.hs-theme-toggle {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--hs-border);
  background: var(--hs-header-bg);
  color: var(--hs-text);
  cursor: pointer;
  transition: background var(--hs-transition), border-color var(--hs-transition), color var(--hs-transition);
  flex-shrink: 0;
  padding: 0;
  box-shadow: var(--hs-shadow-sm);
}

.hs-theme-toggle:hover {
  background: rgba(232, 82, 42, 0.1);
  border-color: var(--hs-primary);
  color: var(--hs-primary);
}

.hs-icon-sun  { display: none;  }
.hs-icon-moon { display: block; }

html[data-theme="dark"] .hs-icon-sun   { display: block; }
html[data-theme="dark"] .hs-icon-moon  { display: none;  }
html[data-theme="light"] .hs-icon-sun  { display: none  !important; }
html[data-theme="light"] .hs-icon-moon { display: block !important; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .hs-icon-sun  { display: block; }
  html:not([data-theme="light"]) .hs-icon-moon { display: none;  }
}

/* ============================================================
   NAVIGATION — DESKTOP
   ============================================================ */

.hs-header .wp-block-navigation__container {
  gap: 2px;
}

.hs-header .wp-block-navigation-item__content {
  padding: 8px 12px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--hs-text) !important;
  border-radius: var(--hs-radius) !important;
  transition: background var(--hs-transition), color var(--hs-transition) !important;
  text-decoration: none !important;
}

.hs-header .wp-block-navigation-item__content:hover {
  background: rgba(232, 82, 42, 0.08) !important;
  color: var(--hs-primary) !important;
}

.hs-header .current-menu-item > .wp-block-navigation-item__content {
  color: var(--hs-primary) !important;
}

/* ============================================================
   NAVIGATION — HAMBURGER-BUTTON
   ============================================================ */

.wp-block-navigation__responsive-container-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  border-radius: var(--hs-radius) !important;
  border: 2px solid var(--hs-border) !important;
  background: transparent !important;
  color: var(--hs-text) !important;
  cursor: pointer;
  transition: border-color var(--hs-transition), background var(--hs-transition) !important;
}

.wp-block-navigation__responsive-container-open:hover {
  border-color: var(--hs-primary) !important;
  background: rgba(232, 82, 42, 0.06) !important;
  color: var(--hs-primary) !important;
}

/* ============================================================
   NAVIGATION — MOBILES OVERLAY
   ============================================================ */

@keyframes hs-menu-slide-in {
  from { opacity: 0; transform: translateX(6%); }
  to   { opacity: 1; transform: translateX(0);  }
}

.wp-block-navigation__responsive-container.is-menu-open {
  background: #2C1810 !important; /* Warmes Dunkelbraun */
  display: flex !important;
  flex-direction: column;
  animation: hs-menu-slide-in 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Dialog-Wrapper: Inhalt vertikal zentriert, Scrolling falls nötig */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-dialog {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 72px 36px 48px;
  overflow-y: auto;
}

/* Nav-Container: vertikal gestapelt */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__container {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  align-items: flex-start !important;
  width: 100%;
}

/* Einzelner Menüpunkt */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid rgba(245, 237, 230, 0.10);
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item:first-child {
  border-top: 1px solid rgba(245, 237, 230, 0.10);
}

/* Menü-Link */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item__content {
  font-size: clamp(22px, 6vw, 30px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: #F5EDE6 !important;
  padding: 20px 0 !important;
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: color 0.15s ease, padding-left 0.15s ease !important;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-item__content:focus-visible {
  color: var(--hs-primary) !important;
  padding-left: 8px !important;
  background: transparent !important;
}

/* Aktiver Menüpunkt */
.wp-block-navigation__responsive-container.is-menu-open
.current-menu-item > .wp-block-navigation-item__content {
  color: var(--hs-primary) !important;
}

/* Untermenü (Projekte → Aktuelle Projekte / Archiv) */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__submenu-container {
  position: static !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 0 12px 20px !important;
  margin-top: -8px;
  border-left: 3px solid rgba(232, 82, 42, 0.5);
  min-width: 0 !important;
  width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__submenu-container
.wp-block-navigation-item {
  border-bottom: none;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__submenu-container
.wp-block-navigation-item:first-child {
  border-top: none;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__submenu-container
.wp-block-navigation-item__content {
  font-size: clamp(15px, 4vw, 18px) !important;
  font-weight: 500 !important;
  color: rgba(245, 237, 230, 0.65) !important;
  padding: 10px 0 !important;
  letter-spacing: 0 !important;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__submenu-container
.wp-block-navigation-item__content:hover {
  color: var(--hs-primary-light) !important;
  padding-left: 4px !important;
}

/* Untermenü-Toggle (Pfeil neben "Projekte") */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation-submenu__toggle {
  color: rgba(245, 237, 230, 0.5) !important;
  margin-left: 8px;
}

/* Schließen-Button (X) */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-container-close {
  position: fixed !important;
  top: 14px !important;
  right: 14px !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  border: 2px solid rgba(245, 237, 230, 0.2) !important;
  background: rgba(245, 237, 230, 0.08) !important;
  color: #F5EDE6 !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease !important;
  z-index: 1000;
}

.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-container-close:hover {
  background: rgba(232, 82, 42, 0.2) !important;
  border-color: var(--hs-primary) !important;
  color: #fff !important;
}

/* ============================================================
   HERO
   ============================================================ */

.hs-hero.wp-block-cover {
  min-height: 80vh;
}

.hs-hero .wp-block-cover__inner-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-wrapper {
  position: relative;
  padding: 2em 5em 2em 2em;
  border-radius: var(--hs-radius);
  width: fit-content;
  max-width: 100%;
  margin-left: 5em;
}

.hero-wrapper-background {
  background-color: rgba(44, 24, 16, 0.72);
  border-radius: var(--hs-radius);
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* ============================================================
   KARTEN (hs-card)
   ============================================================ */

.hs-card {
  background: var(--hs-surface) !important;
  border-radius: var(--hs-radius) !important;
  box-shadow: var(--hs-shadow-sm);
  border: 1px solid var(--hs-border) !important;
  transition: box-shadow var(--hs-transition), transform var(--hs-transition);
  overflow: hidden;
}

.hs-card:hover {
  box-shadow: var(--hs-shadow-md);
  transform: translateY(-3px);
}

/* Vertrauens-Bereich (patterns/vertrauens-bereich.php): ein Raster,
   alle Zeilen gleich hoch (1fr) – damit sind alle vier Kacheln gleich hoch. */
.hs-vertrauen__raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--wp--preset--spacing--l);
}

.hs-vertrauen__raster > * {
  margin: 0 !important; /* Block-Abstaende des Group-Layouts neutralisieren */
}

.hs-vertrauen__raster > .hs-card {
  height: 100%;
}

@media (min-width: 768px) {
  .hs-vertrauen__raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Sponsor-Aufruf (patterns/sponsor-aufruf.php): Band unter dem
   Vertrauens-Bereich. Mobil gestapelt, ab 768px Symbol | Text | Button. */
.hs-sponsor-aufruf {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--wp--preset--spacing--m);
  padding: var(--wp--preset--spacing--l);
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-left: 6px solid var(--hs-accent);
  border-radius: var(--hs-radius-lg);
  box-shadow: var(--hs-shadow-sm);
}

.hs-sponsor-aufruf > * {
  margin: 0 !important;
}

.hs-sponsor-aufruf__symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  line-height: 1;
  background: var(--hs-surface-alt);
  border-radius: 50%;
}

.hs-sponsor-aufruf__titel {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
}

.hs-sponsor-aufruf__beschreibung {
  margin: 0;
  color: var(--hs-text-muted);
  font-size: 16px;
}

.hs-sponsor-aufruf__aktion .wp-block-button__link {
  gap: 0.4em;
  padding: 14px 28px;
}

/* Ab 768px: Symbol links, Text und Button rechts daneben untereinander –
   drei Spalten waeren in der schmalen Inhaltsbreite zu eng fuer den Text. */
@media (min-width: 768px) {
  .hs-sponsor-aufruf {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--wp--preset--spacing--l);
    row-gap: var(--wp--preset--spacing--m);
    align-items: start;
  }

  .hs-sponsor-aufruf__aktion {
    grid-column: 2;
  }
}

/* Gleich hohe Kacheln im Post-Template-Grid */
.wp-block-post-template.is-layout-grid > li {
  display: flex;
  flex-direction: column;
}
.wp-block-post-template.is-layout-grid > li > .hs-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.wp-block-post-template.is-layout-grid > li > .hs-card > .wp-block-group {
  flex: 1;
}

/* Responsives Karten-Grid: WP setzt bei columnCount eine feste Spaltenzahl
   ohne Media Query – auf schmalen Viewports sonst unlesbar schmale Karten. */
@media (max-width: 1024px) {
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Jahres-Taxonomie über dem Projekttitel */
.hs-card .wp-block-post-terms {
  display: block;
  color: var(--hs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hs-card .wp-block-post-terms a {
  color: inherit;
  text-decoration: none;
}

.hs-card .wp-block-post-terms a:hover,
.hs-card .wp-block-post-terms a:focus-visible {
  color: var(--hs-primary);
  text-decoration: underline;
}

/* Beitragsbild füllt die Kartenbreite */
.hs-card .wp-block-post-featured-image {
  margin: 0;
}

.hs-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lange Projektnamen (z. B. "Inklusionsspielplatz") sauber trennen
   statt mitten im Wort umbrechen. */
.hs-card .wp-block-post-title {
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.hs-card .wp-block-post-excerpt__excerpt {
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

/* WP Standard-white-background in Dark Mode überschreiben */
html[data-theme="dark"] .has-white-background-color {
  background-color: var(--hs-surface) !important;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .has-white-background-color {
    background-color: var(--hs-surface) !important;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.wp-element-button,
.wp-block-button__link {
  border-radius: var(--hs-radius) !important;
  font-weight: 600 !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: background-color var(--hs-transition), transform var(--hs-transition), box-shadow var(--hs-transition) !important;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: var(--hs-shadow-md);
}

.wp-element-button:active,
.wp-block-button__link:active {
  transform: translateY(0);
}

/* ============================================================
   TYPOGRAFIE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  color: var(--hs-text);
  transition: color var(--hs-transition);
}

p {
  transition: color var(--hs-transition);
}

/* Lesbarkeit: max. Zeilenlänge */
.entry-content p,
.wp-block-post-content p {
  max-width: 70ch;
}

/* Die Seiten-H1 kommt aus dem Inhalt (page.html setzt keinen Post-Title mehr).
   Sie braucht dieselbe Luft nach unten, die der Post-Title vorher mitbrachte,
   sonst klebt die erste H2 direkt darunter. */
.entry-content > h1:first-child,
.wp-block-post-content > h1:first-child {
  margin-top: 0;
  margin-bottom: var(--wp--preset--spacing--l);
}

/* Flucht: Das Constrained-Layout setzt auf jedes direkte Kind
   margin-left/right:auto !important. Zusammen mit der begrenzten Zeilenlänge
   oben zentriert das den Absatz – er ruckte dadurch gegenüber Überschriften,
   Tabellen und Listen nach rechts ein. Absätze deshalb links bündig halten;
   bewusst zentrierte/rechtsbündige Absätze bleiben ausgenommen. */
.entry-content > p:not(.has-text-align-center):not(.has-text-align-right),
.wp-block-post-content > p:not(.has-text-align-center):not(.has-text-align-right) {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* ============================================================
   TABELLEN IM SEITENINHALT
   ============================================================ */

.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
  margin-left: 0;
  margin-right: 0;
  /* Schmale Viewports: Tabelle scrollt, statt das Layout zu sprengen */
  overflow-x: auto;
}

.entry-content .wp-block-table table,
.wp-block-post-content .wp-block-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  overflow: hidden;
  background: var(--hs-surface);
  box-shadow: var(--hs-shadow-sm);
  font-size: 16px;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td {
  /* Die Block-Library setzt auf jede Zelle einen 1px-Rahmen – der doppelt
     sich mit dem Rahmen der Tabelle. Nur eine Trennlinie pro Zeile. */
  border: 0;
  border-bottom: 1px solid var(--hs-border);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.entry-content .wp-block-table thead th,
.wp-block-post-content .wp-block-table thead th {
  background: var(--hs-surface-alt);
  color: var(--hs-text);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--hs-primary);
}

.entry-content .wp-block-table tbody tr:last-child td,
.wp-block-post-content .wp-block-table tbody tr:last-child td {
  border-bottom: 0;
}

.entry-content .wp-block-table tbody tr:nth-child(even) td,
.wp-block-post-content .wp-block-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--hs-surface-alt) 55%, transparent);
}

/* Erste Spalte trägt den Namen – etwas kräftiger als die Funktion daneben */
.entry-content .wp-block-table tbody td:first-child,
.wp-block-post-content .wp-block-table tbody td:first-child {
  font-weight: 600;
}

/* Beschriftung bündig zur Tabelle statt zentriert */
.entry-content .wp-block-table figcaption,
.wp-block-post-content .wp-block-table figcaption,
.entry-content .wp-element-caption,
.wp-block-post-content .wp-element-caption {
  text-align: left;
  color: var(--hs-text-muted);
  font-size: 14px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .entry-content .wp-block-table th,
  .entry-content .wp-block-table td,
  .wp-block-post-content .wp-block-table th,
  .wp-block-post-content .wp-block-table td {
    padding: 10px 12px;
  }
}

/* ============================================================
   BILDER
   ============================================================ */

.wp-block-image img,
.wp-block-post-featured-image img {
  border-radius: var(--hs-radius);
}

/* ============================================================
   SIDEBAR SPENDEN
   ============================================================ */

.hs-sidebar-spenden {
  background: var(--hs-surface) !important;
  border: 2px solid var(--hs-primary);
  border-radius: var(--hs-radius-lg) !important;
  margin-top: 48px;
  box-shadow: var(--hs-shadow-sm);
}

/* ============================================================
   PROJEKT-META
   ============================================================ */

/* Kompakte Zeile: Fakten links, Spenden-Knopf rechts. Frueher stapelte die Box
   zusaetzlich Ueberschrift und Auszug – der Auszug wiederholte dabei wortgleich
   den ersten Absatz des Artikels direkt darunter. */
.hs-projekt-meta {
  background: var(--hs-surface) !important;
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius) !important;
  padding: 14px 18px !important;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Das Constrained-Layout zentriert jedes Kind per margin:auto – in einer
   Zeile fuehrt das zu wandernden Elementen. */
.hs-projekt-meta > * {
  margin: 0 !important;
  max-width: none;
}

.hs-projekt-meta__fakten {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Der Shortcode fuer den Status laeuft durch wpautop und kommt in einem
   Absatz zurueck. Dessen Aussenabstand wuerde die Zeile auseinanderziehen. */
.hs-projekt-meta__fakten p {
  margin: 0;
}

.hs-projekt-meta__fakten .wp-block-post-terms {
  color: var(--hs-text-muted);
  font-size: 14px;
}

/* Der Knopf lief vorher ueber die volle Breite der Box und wirkte dadurch
   wie ein Formular-Absenden statt wie ein Angebot. */
.hs-projekt-meta__cta .wp-block-button__link {
  padding: 10px 20px;
  font-size: 15px;
  /* Klickziel nach WCAG 2.5.5 */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 600px) {
  .hs-projekt-meta {
    justify-content: flex-start;
  }

  .hs-projekt-meta__cta,
  .hs-projekt-meta__cta .wp-block-button,
  .hs-projekt-meta__cta .wp-block-button__link {
    width: 100%;
  }

  .hs-projekt-meta__cta .wp-block-button__link {
    justify-content: center;
  }
}
.hs-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hs-status-badge--aktiv {
  background: rgba(76, 175, 80, 0.12);
  color: #1B5E20; /* Kontrast 7.3:1 auf cremefarbenem Hintergrund (WCAG 1.4.3) */
  border: 1px solid rgba(76, 175, 80, 0.4);
}

html[data-theme="dark"] .hs-status-badge--aktiv {
  background: rgba(76, 175, 80, 0.15);
  color: #C8E6C9; /* Kontrast >11:1 auf dunklem Hintergrund (WCAG 1.4.3) */
  border-color: rgba(76, 175, 80, 0.3);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .hs-status-badge--aktiv {
    background: rgba(76, 175, 80, 0.15);
    color: #C8E6C9;
    border-color: rgba(76, 175, 80, 0.3);
  }
}

.hs-status-badge--abgeschlossen {
  background: var(--hs-border);
  color: var(--hs-text-muted);
  border: 1px solid var(--hs-border);
}

/* ============================================================
   VERTRAUENS-BEREICH (Icons)
   ============================================================ */

.hs-trust-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  line-height: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */

.hs-footer {
  color: rgba(245, 237, 230, 0.9);
  border-top: 3px solid var(--wp--preset--color--primary);
}

/* :not(.wp-element-button) – sonst faerbt diese Regel auch den Spenden-Button
   im Footer um: helles Orange auf Orange, nur 1.53:1. */
.hs-footer a:not(.wp-element-button) {
  color: var(--wp--preset--color--primary-light) !important;
  text-decoration: none;
}

.hs-footer a:not(.wp-element-button):hover {
  color: var(--wp--preset--color--accent) !important;
  text-decoration: underline;
}

.hs-footer .wp-block-heading {
  color: #FFFFFF !important;
}

/* Bereichstitel im Footer (parts/footer.html): span statt h3, gleiche Optik
   wie die fruehere Ueberschrift (15px, fett, Versalien, weiss).
   Schriftgroesse = der fluide Wert, den WordPress aus den 15px der
   Ueberschrift erzeugt hatte (wp_get_typography_font_size_value). */
.hs-footer__titel {
  display: block;
  margin: 0 0 var(--wp--preset--spacing--s);
  color: #FFFFFF;
  font-family: var(--wp--preset--font-family--heading);
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.114), 15px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hs-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 0;
  padding-top: 20px;
}

/* Footer: Touch-Ziele für Text-Links in Absätzen (E-Mail u.ä.) */
.hs-footer p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Footer: Navigations-Items – Touch-Ziele */
.hs-footer .wp-block-navigation-item__content {
  min-height: 44px;
  display: flex !important;
  align-items: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Footer: Social-Link (Facebook) */
.hs-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--wp--preset--color--primary-light) !important;
  text-decoration: none;
  min-height: 44px;
  margin-top: var(--wp--preset--spacing--m);
  transition: color var(--hs-transition);
  cursor: pointer;
}

.hs-footer-social-link:hover {
  color: var(--wp--preset--color--accent) !important;
  text-decoration: underline;
}

.hs-footer-social-link:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Footer: Legal Nav (Impressum · Datenschutz · Barrierefreiheit) */
.hs-footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 4px;
  margin: 0;
  padding: 0;
}

.hs-footer-legal-nav a {
  font-size: 13px;
  color: var(--wp--preset--color--primary-light) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  transition: color var(--hs-transition);
  cursor: pointer;
}

.hs-footer-legal-nav a:first-child {
  padding-left: 0;
}

.hs-footer-legal-nav a:hover {
  color: var(--wp--preset--color--accent) !important;
  text-decoration: underline;
}

.hs-footer-legal-nav a:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

.hs-footer-legal-nav a:not(:last-child) {
  border-right: 1px solid rgba(245, 237, 230, 0.2);
}

/* ============================================================
   QUERIES / BLOG-LISTE
   ============================================================ */

.hs-post-card {
  background: var(--hs-surface);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-sm);
  border: 1px solid var(--hs-border);
  overflow: hidden;
  transition: box-shadow var(--hs-transition), transform var(--hs-transition);
}

.hs-post-card:hover {
  box-shadow: var(--hs-shadow-md);
  transform: translateY(-3px);
}

.hs-post-card .wp-block-post-featured-image img {
  border-radius: var(--hs-radius) var(--hs-radius) 0 0 !important;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.hs-post-card-body {
  padding: 20px 24px 24px;
}

/* ============================================================
   KONTAKTFORMULAR
   ============================================================ */

.hs-contact-info {
  background: var(--hs-surface);
  border-radius: var(--hs-radius-lg);
  padding: 32px;
  border: 1px solid var(--hs-border);
  box-shadow: var(--hs-shadow-sm);
}

.hs-contact-info a {
  color: var(--hs-primary);
}

/* ============================================================
   WP-FORMULARE (Barrierefreiheit)
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  background: var(--hs-surface);
  color: var(--hs-text);
  border: 2px solid var(--hs-border);
  border-radius: var(--hs-radius);
  padding: 10px 14px;
  font-size: 16px;
  min-height: 44px;
  width: 100%;
  transition: border-color var(--hs-transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--hs-primary);
  outline: 3px solid var(--hs-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(232, 82, 42, 0.2);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--hs-text);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--hs-radius);
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--hs-transition), color var(--hs-transition);
}

.wp-block-query-pagination a:hover {
  background: var(--hs-primary);
  color: #fff;
  border-color: var(--hs-primary);
}

.wp-block-query-pagination-numbers .current {
  background: var(--hs-primary);
  color: #fff;
  border-color: var(--hs-primary);
}

/* ============================================================
   404-SEITE
   ============================================================ */

.hs-404-wrap {
  text-align: center;
  padding: 80px 20px;
}

.hs-404-wrap .hs-404-emoji {
  font-size: 80px;
  line-height: 1;
  margin-bottom: 24px;
  display: block;
}

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

@media (max-width: 782px) {
  /* Dark-Mode-Toggle: sticky unten-rechts auf Mobile */
  .hs-theme-toggle {
    top: auto;
    bottom: 20px;
    right: 20px;
  }

  /* Navigation: Desktop-Links ausblenden (Hamburger übernimmt) */
  .hs-header .wp-block-navigation__container {
    display: none;
  }

  /* Footer: Seitenabstand auf Mobile */
  .hs-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Footer-Spalten: untereinander statt nebeneinander */
  .hs-footer .wp-block-columns {
    flex-direction: column !important;
  }
  .hs-footer .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .hs-footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  /* Footer: Schriftgrößen auf Mobile anheben */
  .hs-footer .wp-block-column p {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
  .hs-footer-bottom > p {
    font-size: 14px !important;
  }
}

@media (max-width: 600px) {
  :root {
    --hs-header-height: 0;
  }

  .hs-header > .wp-block-group__inner-container,
  .hs-header > div {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding-top: 24px !important;
    padding-bottom: 28px !important;
    position: relative;
  }

  .hs-header-brand {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  /* Hamburger oben rechts – aus dem Flex-Flow herausnehmen */
  .hs-header-right {
    position: absolute !important;
    top: -34px;
    right: 16px;
    width: auto !important;
    min-width: 44px;
    z-index: 10;
  }

  .hs-header-brand .wp-block-site-logo img {
    max-width: 220px;
    max-height: 200px;
    aspect-ratio: 300 / 276;
  }

  .hs-header-brand .wp-block-site-title {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    font-size: 38px !important;
    font-weight: 700 !important;
    white-space: normal;
    min-height: 44px;
  }

  .hs-hero.wp-block-cover {
    min-height: 70vh;
  }

  /* Hero-Textbox: kein seitlicher Versatz auf kleinen Screens */
  .hero-wrapper {
    margin-left: 0;
    padding: 1.5em;
    width: 100%;
  }

  /* Seiten-Padding reduzieren */
  .hs-section {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 480px) {
  /* Footer Legal Nav: untereinander auf sehr kleinen Screens */
  .hs-footer-legal-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .hs-footer-legal-nav a {
    font-size: 14px !important;
    border-right: none !important;
    padding: 0 0 !important;
  }
  .hs-footer-legal-nav a:first-child {
    padding-left: 0 !important;
  }
}

/* ============================================================
   BARRIEREFREIHEIT: REDUZIERTE BEWEGUNG
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   DRUCK
   ============================================================ */

@media print {
  .hs-header,
  .hs-theme-toggle,
  .wp-block-navigation,
  .hs-footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000 !important;
    background: #fff !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #555;
  }
}

/* ============================================================
   SPENDEN-BEREICH
   ============================================================ */

.hs-spenden-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 0;
}

.hs-spenden-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.hs-spenden-card {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
}

.hs-spenden-card--primary {
  border-left: 3px solid #E8522A;
  border-color: rgba(255, 255, 255, 0.15);
  border-left-color: #E8522A;
}

.hs-spenden-card__icon {
  line-height: 1;
}

.hs-spenden-card__divider {
  width: 40px;
  height: 2px;
  background-color: #E8522A;
  margin-bottom: 16px;
}

/* IBAN-Blöcke */
.hs-iban-block {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 0;
}

.hs-iban-block__bank {
  font-size: 13px;
  font-weight: 700;
  color: #F5C9B3;
  margin-bottom: 4px;
  display: block;
}

.hs-iban-block__label {
  font-size: 13px;
  color: #F5EDE6;
  margin: 0;
}

.hs-iban-block__code {
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.05em;
  font-size: 13px;
  background: none;
  padding: 0;
  color: inherit;
}

/* Mobile: Spalten untereinander */
@media (max-width: 600px) {
  .hs-spenden-card {
    padding: 20px 16px;
  }

  .hs-spenden-badges {
    flex-direction: column;
    gap: 6px;
  }
}

/* ============================================================
   NÄCHSTE VERANSTALTUNG (Homepage-Sektion)
   ============================================================ */

.hs-next-event {
  background-color: var(--hs-dark, #2C1810);
  color: #F5EDE6;
  padding-top: var(--wp--preset--spacing--xl);
  padding-bottom: var(--wp--preset--spacing--xl);
}

/* Gleiche Inhaltsbreite wie die uebrigen Startseiten-Abschnitte (theme.json
   contentSize) – mit 1200px begann der Abschnitt weiter links als der Rest. */
.hs-next-event__inner {
  max-width: var(--wp--style--global--content-size, 760px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--l);
}

.hs-next-event__inner--has-image {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

/* Poster */
.hs-next-event__poster-wrap {
  display: flex;
  justify-content: center;
}

.hs-next-event__poster {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

/* Content */
.hs-next-event__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hs-accent, #F5A623);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.hs-next-event__title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 20px;
  color: #FFFFFF;
}

.hs-next-event__title a {
  color: inherit;
  text-decoration: none;
}

.hs-next-event__title a:hover {
  color: var(--hs-primary-light, #F28C5E);
}

/* Meta: Datum + Ort */
.hs-next-event__meta {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hs-next-event__meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #F5EDE6;
}

.hs-next-event__meta svg {
  flex-shrink: 0;
  color: var(--hs-accent, #F5A623);
}

/* Excerpt */
.hs-next-event__excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(245, 237, 230, 0.75);
  margin: 0 0 28px;
  max-width: 52ch;
}

/* Buttons */
.hs-next-event__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.hs-next-event__cta {
  background-color: var(--hs-primary, #E8522A) !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  padding: 14px 28px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.hs-next-event__cta:hover {
  background-color: var(--hs-primary-light, #F28C5E) !important;
}

.hs-next-event__all-link {
  font-size: 14px;
  font-weight: 600;
  color: rgba(245, 237, 230, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hs-next-event__all-link:hover {
  color: #F5EDE6;
}

/* Responsive: Poster über Text auf kleinen Screens */
@media (max-width: 768px) {
  .hs-next-event__inner--has-image {
    grid-template-columns: 1fr;
  }

  .hs-next-event__poster {
    max-width: 260px;
  }

  .hs-next-event__title {
    font-size: clamp(24px, 6vw, 32px);
  }
}

/* ============================================================
   KONTAKTFORMULAR
   ============================================================ */

.hs-kontakt-form {
  /* Das Formular kommt aus einem wp:html-Block; dessen rohe Ausgabe wird vom
     Constrained-Layout nicht erfasst und liefe sonst über die volle Seite.
     Daher explizit auf die Inhaltsbreite setzen – bündig mit Kontaktdaten-Karte
     und Datenschutzhinweis darüber. */
  max-width: var(--wp--style--global--content-size, 760px);
  margin-left: auto;
  margin-right: auto;
}

/* Honeypot unsichtbar */
.hs-hp-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hs-form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wp--preset--spacing--m);
}

.hs-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--wp--preset--spacing--m);
}

.hs-form-group:last-child {
  margin-bottom: 0;
}

.hs-form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--hs-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hs-form-required {
  color: var(--hs-primary);
}

.hs-form-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--hs-text-muted);
}

.hs-form-input,
.hs-form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--hs-text);
  background-color: var(--hs-input-bg);
  border: 1.5px solid var(--hs-input-border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  will-change: border-color, box-shadow;
}

.hs-form-input:focus,
.hs-form-textarea:focus {
  outline: 2px solid var(--hs-primary);
  outline-offset: 1px;
  border-color: var(--hs-primary);
  box-shadow: 0 0 0 3px rgba(232, 82, 42, 0.18);
}

.hs-form-input--error,
.hs-form-textarea.hs-form-input--error {
  border-color: #922B21 !important;
  background-color: #FFF3F0;
}

.hs-form-error-msg {
  display: block;
  font-size: 13px;
  color: #922B21;
  margin-top: 4px;
  min-height: 1em;
}

.hs-form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Datenschutz-Checkbox */
.hs-form-group--checkbox {
  margin-bottom: var(--wp--preset--spacing--m);
}

.hs-form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--hs-text);
  cursor: pointer;
}

.hs-form-checkbox-text {
  padding-top: 2px;
}

.hs-form-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  accent-color: var(--hs-primary);
  cursor: pointer;
}

/* Footer: Button + Pflichtfeldhinweis */
.hs-form-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: var(--wp--preset--spacing--m);
}

.hs-form-submit {
  min-height: 48px;
  padding: 12px 28px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.hs-form-required-note {
  font-size: 13px;
  color: var(--hs-text-muted);
  margin: 0;
}

/* Hinweis-Boxen (Erfolg / Fehler) */
.hs-form-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: var(--wp--preset--spacing--m);
  font-size: 15px;
}

.hs-form-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.hs-form-notice p {
  margin: 4px 0 0;
  font-size: 14px;
}

.hs-form-notice--success {
  background-color: #EDFAF0;
  border: 1.5px solid #4CAF50;
  color: #1B5E20;
}

.hs-form-notice--success svg {
  color: #4CAF50;
}

.hs-form-notice--error {
  background-color: #FFF3F0;
  border: 1.5px solid #E8522A;
  color: #7B2400;
}

.hs-form-notice--error svg {
  color: #E8522A;
}

/* Responsive */
@media (max-width: 600px) {
  .hs-form-row--two {
    grid-template-columns: 1fr;
  }

  .hs-form-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hs-form-submit {
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   KONTAKTSEITE
   ============================================================ */

/* Datenschutz-Hinweis über dem Formular */
.hs-hinweis {
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-left: 4px solid var(--hs-primary);
  border-radius: var(--hs-radius);
}

/* Kontaktdaten-Karte: lange E-Mail-Adressen und URLs brechen in der
   schmalen Spalte sonst mitten im Wort um. */
.hs-kontakt-card {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}

.hs-kontakt-card a {
  overflow-wrap: anywhere;
}

.hs-kontakt-card__fussnote {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--hs-text-muted);
}

.hs-kontakt-card .wp-block-separator {
  margin-block: var(--wp--preset--spacing--m);
  border: 0;
  border-top: 1px solid var(--hs-border);
  opacity: 1;
}

/* Kontaktdaten dreispaltig in voller Breite.
   Unter 782px stapelt WordPress die Spalten selbst – dann braucht es
   nur noch vertikalen Abstand zwischen ihnen. */
.hs-kontakt-daten {
  margin-bottom: 0;
}

@media (max-width: 781px) {
  .hs-kontakt-daten > .wp-block-column:not(:last-child) {
    margin-bottom: var(--wp--preset--spacing--m);
  }
}

/* Zweispaltige Formularzeile: Abstand traegt die Zeile, nicht die Gruppe.
   Sonst addiert sich margin-bottom der Gruppe auf den grid-gap, und
   .hs-form-group:last-child trifft nur das rechte Feld -> schiefe Zeile. */
.hs-form-row--two {
  margin-bottom: var(--wp--preset--spacing--m);
}

.hs-form-row--two > .hs-form-group {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .hs-form-row--two {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   BUTTON-KONTRAST (WCAG 1.4.3)
   ============================================================ */

/* Die Buttons tragen im Markup die Klasse .has-white-color, die WordPress mit
   !important ausspielt. Weiss auf dem Markenorange #E8522A ergibt aber nur
   3.70:1 und verfehlt die geforderten 4.5:1 – im Hover (#F28C5E) sind es sogar
   nur 2.42:1. Dunkles Markenbraun erreicht 4.55:1 / 6.98:1 und im Dark Mode
   (#F06540) 5.33:1. Die Regel greift nur bei orangefarbenem Button-Hintergrund,
   damit hell auf dunkel gesetzte Buttons unberuehrt bleiben. */
.wp-block-button__link.has-primary-background-color,
.wp-element-button.has-primary-background-color {
  color: var(--wp--preset--color--text-dark) !important;
}

/* ============================================================
   PLATZHALTER-BEITRAGSBILD (VEREINSLOGO)
   ============================================================ */

/* Liegt zu einem Projekt kein Foto vor, setzt inc/beitragsbild-platzhalter.php
   das Vereinslogo ein. Das Logo ist rund und wuerde im 4:3-Zuschnitt der
   Kachel oben und unten abgeschnitten – deshalb einpassen statt fuellen,
   mit Luft ringsum und abgesetztem Grund, damit es als Platzhalter lesbar
   bleibt und nicht wie ein Projektfoto wirkt. */
.hs-bild-platzhalter {
  object-fit: contain !important;
  background: var(--hs-surface-alt);
  padding: 12px;
}

html[data-theme="dark"] .hs-bild-platzhalter,
.hs-card .hs-bild-platzhalter {
  background: var(--hs-surface-alt);
}

/* Auf der Projekt-Einzelseite stuende das Logo sonst ueber die volle
   Inhaltsbreite. Die Datei in der Mediathek misst nur 300x276 px – der
   Deckel haelt die Anzeige darunter, sonst wird das Logo hochskaliert
   und unscharf. */
.wp-block-post-featured-image .hs-bild-platzhalter {
  max-height: 240px;
  width: 100%;
}

/* Beitragsbild im Text der Projekt-Einzelseite (inc/projekt-beitragsbild.php):
   rechts neben dem ersten Absatz, damit der Text gleich oben beginnt. */
.wp-block-image.hs-projekt-beitragsbild {
  width: 42%;
  max-width: 340px;
  margin: 0.4em 0 1em 1.5em;
}

.wp-block-image.hs-projekt-beitragsbild img {
  width: 100%;
  height: auto;
}

/* Umflossene Bilder im Inhalt: Auf schmalen Bildschirmen bliebe neben dem
   Bild nur eine schmale Textspalte – dort stehen sie ueber volle Breite. */
@media (max-width: 600px) {
  .wp-block-post-content .wp-block-image.alignleft,
  .wp-block-post-content .wp-block-image.alignright {
    float: none;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 1.5em;
  }

  .wp-block-post-content .wp-block-image.alignleft img,
  .wp-block-post-content .wp-block-image.alignright img {
    width: 100% !important; /* ueberschreibt die im Editor gesetzte Bildbreite */
  }

  /* Core setzt die Bildunterschrift umflossener Bilder auf table-caption.
     Ohne display:table an der figure schrumpft sie auf das laengste Wort
     und bricht nach jedem Wort um – hier wieder normale Blockbreite. */
  .wp-block-post-content .wp-block-image.alignleft > figcaption,
  .wp-block-post-content .wp-block-image.alignright > figcaption {
    display: block;
    width: 100%;
  }

  /* Hochformat-Beitragsbild sonst bildschirmhoch: auf Querformat zuschneiden. */
  .wp-block-image.hs-projekt-beitragsbild img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: 50% 20%;
  }
}

/* ============================================================
   BREADCRUMB (inc/breadcrumb.php)
   Links in Textfarbe gedämpft statt Primär-Orange: Orange auf Creme
   erreicht bei 15px keine 4,5:1.
   ============================================================ */

.hs-breadcrumb {
  margin-block: 0 var(--wp--preset--spacing--m, 1.5rem);
  font-size: 15px;
  line-height: 1.4;
  color: var(--hs-text-muted);
}

.hs-breadcrumb__liste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-breadcrumb__punkt {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.hs-breadcrumb__trenner {
  padding-inline: 0.5em;
  color: var(--hs-text-muted);
}

.hs-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* Klickziel mobil, siehe CLAUDE.md 3.6 */
  color: var(--hs-text-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.hs-breadcrumb__link:hover {
  color: var(--hs-text);
}

.hs-breadcrumb__aktuell {
  color: var(--hs-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .hs-breadcrumb__link {
    min-height: 0;
  }
}

/* ============================================================
   TEILEN-LEISTE
   ============================================================ */

.hs-teilen {
  margin-top: var(--wp--preset--spacing--xl);
  padding: 20px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
}

.hs-teilen__titel {
  font-size: 18px !important;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--hs-text);
}

.hs-teilen__text {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--hs-text-muted);
  max-width: none !important;
}

.hs-teilen__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hs-teilen__eintrag {
  margin: 0;
}

.hs-teilen__knopf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Klickziel nach WCAG 2.5.5 */
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  background: var(--hs-surface-alt);
  color: var(--hs-text) !important;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none !important;
  cursor: pointer;
  transition: background var(--hs-transition), border-color var(--hs-transition), transform var(--hs-transition);
}

/* display:inline-flex oben wuerde das [hidden] des Instagram-Knopfes
   ueberstimmen – ohne Teilen-Menue stuende dort sonst ein Knopf,
   der nichts tut. */
.hs-teilen__knopf[hidden] {
  display: none !important;
}

.hs-teilen__knopf:hover {
  background: var(--hs-surface);
  border-color: currentColor;
  transform: translateY(-1px);
}

.hs-teilen__knopf:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
}

.hs-teilen__icon {
  flex-shrink: 0;
}

/* Erkennungsfarben nur auf dem Icon. Alle vier Werte liegen in hellem wie
   dunklem Modus ueber 3:1 (WCAG 1.4.11); Threads erbt die Textfarbe, weil
   sein Zeichen einfarbig ist und sonst im Dark Mode verschwinden wuerde. */
.hs-teilen__knopf--whatsapp .hs-teilen__icon  { color: #128C7E; }
.hs-teilen__knopf--facebook .hs-teilen__icon  { color: #1877F2; }
.hs-teilen__knopf--instagram .hs-teilen__icon { color: #C13584; }
.hs-teilen__knopf--threads .hs-teilen__icon   { color: currentColor; }
.hs-teilen__knopf--mehr .hs-teilen__icon      { color: var(--hs-primary); }

.hs-teilen__hinweis {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hs-text-muted);
  max-width: none !important;
}

.hs-teilen__status {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hs-primary);
  min-height: 1.2em;
  max-width: none !important;
}

@media (max-width: 600px) {
  .hs-teilen__liste {
    gap: 8px;
  }

  /* Keine feste Spaltenbreite: Flex-Elemente schrumpfen nicht unter ihre
     Inhaltsbreite, ein erzwungenes flex-basis:50% schob die breiteren
     Knoepfe daher aus dem Bild. Inhaltsbreit umbrechen laesst sie passen. */
  .hs-teilen__knopf {
    padding: 10px 14px;
    font-size: 14px;
    max-width: 100%;
  }
}

/* ============================================================
   SPENDENZIEL (Projektbezug auf der Spendenseite)
   ============================================================ */

.hs-spendenziel {
  margin-bottom: var(--wp--preset--spacing--l);
  padding: 22px;
  background: var(--hs-surface);
  border: 2px solid var(--hs-primary);
  border-radius: var(--hs-radius-lg);
  box-shadow: var(--hs-shadow-sm);
}

.hs-spendenziel__kopf {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hs-text-muted);
}

.hs-spendenziel__titel {
  margin: 4px 0 16px !important;
  font-size: clamp(22px, 3vw, 28px) !important;
}

.hs-spendenziel__titel a {
  color: var(--hs-text) !important;
  text-decoration: none;
}

.hs-spendenziel__titel a:hover,
.hs-spendenziel__titel a:focus-visible {
  text-decoration: underline;
}

/* Verwendungszweck: der eigentliche Zuordnungsschluessel bei Ueberweisungen */
.hs-spendenziel__zweck {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--hs-surface-alt);
  border: 1px dashed var(--hs-border);
  border-radius: var(--hs-radius);
}

.hs-spendenziel__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hs-text-muted);
}

.hs-spendenziel__wert {
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--hs-text);
  background: none;
  padding: 0;
}

.hs-spendenziel__kopieren {
  margin-left: auto;
  /* Klickziel nach WCAG 2.5.5 */
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  background: var(--hs-surface);
  color: var(--hs-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--hs-transition), border-color var(--hs-transition);
}

.hs-spendenziel__kopieren:hover {
  border-color: var(--hs-primary);
}

.hs-spendenziel__kopieren:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
}

.hs-spendenziel__text {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--hs-text-muted);
  max-width: none !important;
}

.hs-spendenziel__paypal {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hs-border);
}

.hs-spendenziel__knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--hs-primary);
  /* Weiss ergaebe auf dem Markenorange nur 3.70:1 – siehe Button-Kontrast oben */
  color: var(--wp--preset--color--text-dark) !important;
  font-weight: 700;
  text-decoration: none !important;
}

.hs-spendenziel__knopf:hover {
  background: var(--hs-primary-light);
}

.hs-spendenziel__knopf:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
}

.hs-spendenziel__hinweis,
.hs-spendenziel__datenschutz {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hs-text-muted);
  max-width: none !important;
}

.hs-spendenziel__datenschutz {
  font-size: 13px;
}

.hs-spendenziel__status {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hs-primary);
  min-height: 1.2em;
  max-width: none !important;
}

@media (max-width: 600px) {
  .hs-spendenziel__kopieren {
    margin-left: 0;
    width: 100%;
  }

  .hs-spendenziel__knopf {
    width: 100%;
  }
}

/* Der Spenden-Knopf der Seitenleiste kommt aus einem Shortcode und bringt den
   Abstand des frueheren wp:buttons-Behaelters nicht mit. */
.hs-sidebar-spenden__cta {
  margin-bottom: var(--wp--preset--spacing--l);
}

/* ============================================================
   SPENDENKONTEN
   ============================================================ */

/* Die Abschnitte der Spendenseite standen zu dicht beieinander: Die H2
   "Überweisung" klebte direkt unter dem PayPal-Knopf. Überschriften im
   Seiteninhalt brauchen mehr Luft nach oben als der Standard-Blockabstand. */
.wp-block-post-content > h2,
.entry-content > h2 {
  margin-top: var(--wp--preset--spacing--xl);
}

.wp-block-post-content > h3,
.entry-content > h3 {
  margin-top: var(--wp--preset--spacing--l);
}

/* Direkt nach der H1 gilt das nicht – dort setzt bereits die H1-Regel den Abstand. */
.wp-block-post-content > h1 + h2,
.entry-content > h1 + h2 {
  margin-top: 0;
}

.hs-konten {
  /* Der Shortcode folgt direkt auf die H2 "Überweisung" – ohne eigenen
     Abstand klebte der Empfänger an der Überschrift. */
  margin: 16px 0 0;
}

.hs-konten__empfaenger {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 16px !important;
  max-width: none !important;
}

.hs-konten__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hs-text-muted);
}

.hs-konten__name {
  font-weight: 600;
  color: var(--hs-text);
}

/* Zwei Konten nebeneinander statt als ein durchlaufender Textblock. */
.hs-konten__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hs-konto {
  margin: 0;
  padding: 16px 18px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-sm);
}

.hs-konto__bank {
  margin: 0 0 10px !important;
  font-weight: 700;
  font-size: 16px;
  color: var(--hs-text);
  max-width: none !important;
}

/* Label links, Kopieren rechts – die IBAN steht darunter ueber die volle
   Kartenbreite und muss sich den Platz nicht mit dem Knopf teilen. */
.hs-konto__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.hs-konto__iban {
  display: block;
  /* Ziffernblöcke gleich breit – so lässt sich die IBAN abgleichen. */
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hs-text);
  background: none;
  padding: 0;
  overflow-wrap: anywhere;
}

.hs-konto__kopieren {
  /* Klickziel nach WCAG 2.5.5 */
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  background: var(--hs-surface-alt);
  color: var(--hs-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--hs-transition), border-color var(--hs-transition);
}

.hs-konto__kopieren:hover {
  border-color: var(--hs-primary);
}

.hs-konto__kopieren:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 3px;
}

.hs-konten__status {
  margin: 12px 0 0 !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--hs-primary);
  min-height: 1.2em;
  max-width: none !important;
}

@media (max-width: 782px) {
  .hs-konten__liste {
    grid-template-columns: minmax(0, 1fr);
  }
}



/* ============================================================
   VORSCHAU LAUFENDER PROJEKTE (STARTSEITE)
   ============================================================ */

.hs-vorschau__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--wp--preset--spacing--l);
}

/* Mehrere Projekte: so viele Spalten wie Projekte, hoechstens drei. Eine feste
   Dreierspalte liesse bei zwei Projekten eine Luecke stehen. */
.hs-vorschau--drei .hs-vorschau__liste {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hs-vorschau--zwei .hs-vorschau__liste {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hs-vorschau__eintrag {
  margin: 0;
  display: flex;
}

.hs-vorschau__karte {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--hs-transition), transform var(--hs-transition);
}

.hs-vorschau__karte:hover {
  box-shadow: var(--hs-shadow-md);
  transform: translateY(-3px);
}

.hs-vorschau__bildlink {
  display: block;
  line-height: 0;
}

.hs-vorschau__bild {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hs-vorschau__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--wp--preset--spacing--m);
}

.hs-vorschau__jahr {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hs-text-muted);
}

.hs-vorschau__titel {
  margin: 0 0 8px !important;
  font-size: 20px !important;
}

.hs-vorschau__titel a {
  color: var(--hs-text) !important;
  text-decoration: none;
}

.hs-vorschau__titel a:hover,
.hs-vorschau__titel a:focus-visible {
  color: var(--hs-primary) !important;
  text-decoration: underline;
}

.hs-vorschau__auszug {
  margin: 0 0 var(--wp--preset--spacing--s);
  font-size: 15px;
  color: var(--hs-text-muted);
  max-width: none !important;
}

/* Schiebt die Aktionen auf gleiche Hoehe, auch wenn die Texte unterschiedlich
   lang sind. */
.hs-vorschau__aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: auto 0 0 !important;
  max-width: none !important;
}

.hs-vorschau__knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Klickziel nach WCAG 2.5.5 */
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 8px;
  background: var(--hs-primary);
  /* Weiss ergaebe auf dem Markenorange nur 3.70:1 */
  color: var(--wp--preset--color--text-dark) !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
}

.hs-vorschau__knopf:hover {
  background: var(--hs-primary-light);
}

.hs-vorschau__mehr {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  color: var(--hs-primary) !important;
}

/* --- Nur ein laufendes Projekt: quer statt schmal ---------------------- */

.hs-vorschau--eins .hs-vorschau__karte {
  flex-direction: row;
  align-items: stretch;
}

.hs-vorschau--eins .hs-vorschau__bildlink {
  flex: 0 0 42%;
}

.hs-vorschau--eins .hs-vorschau__bild {
  aspect-ratio: auto;
  min-height: 100%;
}

.hs-vorschau--eins .hs-vorschau__text {
  padding: var(--wp--preset--spacing--l);
  justify-content: center;
}

.hs-vorschau--eins .hs-vorschau__titel {
  font-size: clamp(22px, 3vw, 30px) !important;
}

.hs-vorschau--eins .hs-vorschau__auszug {
  font-size: 17px;
}

/* --- Kein laufendes Projekt ------------------------------------------- */

.hs-vorschau--leer {
  padding: var(--wp--preset--spacing--l);
  background: var(--hs-surface);
  border: 1px dashed var(--hs-border);
  border-radius: var(--hs-radius-lg);
}

.hs-vorschau__leertext {
  margin: 0 0 var(--wp--preset--spacing--m);
  font-size: 17px;
  color: var(--hs-text-muted);
  max-width: none !important;
}

@media (max-width: 1024px) {
  .hs-vorschau--drei .hs-vorschau__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .hs-vorschau--drei .hs-vorschau__liste,
  .hs-vorschau--zwei .hs-vorschau__liste {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Quer wird auf dem Handy wieder untereinander */
  .hs-vorschau--eins .hs-vorschau__karte {
    flex-direction: column;
  }

  .hs-vorschau--eins .hs-vorschau__bildlink {
    flex: 1 1 auto;
  }

  .hs-vorschau--eins .hs-vorschau__bild {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .hs-vorschau--eins .hs-vorschau__text {
    padding: var(--wp--preset--spacing--m);
  }

  .hs-vorschau__knopf,
  .hs-vorschau__mehr {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   VERANSTALTUNGEN (inc/veranstaltungen-liste.php)
   Archiv: kommende oben, Trennstrich, vergangene darunter.
   ============================================================ */

.hs-veranstaltungen__titel {
  margin: 0 0 var(--wp--preset--spacing--m);
  font-size: clamp(22px, 3vw, 28px);
}

.hs-veranstaltungen__raster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--wp--preset--spacing--l);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-veranstaltungen__raster > li {
  display: flex;
  margin: 0;
}

@media (min-width: 768px) {
  .hs-veranstaltungen__raster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .hs-veranstaltungen__raster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hs-veranstaltungen__leer {
  margin: 0;
  font-size: 18px;
}

.hs-veranstaltungen__trenner {
  width: 100%;
  max-width: none !important;
  height: 0;
  margin: var(--wp--preset--spacing--xl) 0 !important;
  border: 0;
  border-top: 2px solid var(--hs-border);
  opacity: 1;
}

.hs-veranstaltung-karte {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hs-veranstaltung-karte__bild {
  display: block;
}

.hs-veranstaltung-karte__bild img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Vergangene: Bild entsaettigt – Text bleibt voll lesbar (Kontrast). */
.hs-veranstaltungen__bereich--vergangen .hs-veranstaltung-karte__bild img {
  filter: grayscale(0.7);
}

.hs-veranstaltung-karte__inhalt {
  flex: 1;
  padding: var(--wp--preset--spacing--m);
}

.hs-veranstaltung-karte__titel {
  margin: 0 0 8px;
  font-size: 20px;
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 700;
  line-height: 1.3;
}

.hs-veranstaltung-karte__titel a {
  color: inherit;
  text-decoration: none;
}

.hs-veranstaltung-karte__titel a:hover,
.hs-veranstaltung-karte__titel a:focus-visible {
  text-decoration: underline;
}

.hs-veranstaltung-karte__meta,
.hs-veranstaltung-infos {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: var(--hs-text-muted);
  font-size: 15px;
}

.hs-veranstaltung-karte__meta li,
.hs-veranstaltung-infos li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.hs-veranstaltung-karte__meta svg,
.hs-veranstaltung-infos svg {
  flex-shrink: 0;
  color: var(--hs-primary);
}

.hs-veranstaltung-karte__auszug {
  margin: 0;
  font-size: 15px;
}

/* Einzelseite: Termin-Infos unter dem Titel */
.hs-veranstaltung-infos {
  margin-bottom: var(--wp--preset--spacing--l);
  font-size: 16px;
  font-weight: 600;
}

/* ============================================================
   PROJEKTSEITE (/projekte/)
   inc/projekt-vorschau.php → hs_projekte_archiv_kopf_html()
   Spotlight „aktive Projekte“, Herz-Trenner, Karten der abgeschlossenen.
   ============================================================ */

/* Linkfarbe mit ausreichendem Kontrast: Markenorange #E8522A erreicht auf
   Weiss nur 3.70:1, #B53A18 rund 5.9:1. Im Dunkelmodus reicht #F06540. */
.hs-fokus,
.hs-projekte-liste {
  --hs-link-stark: #B53A18;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .hs-fokus,
  html:not([data-theme="light"]) .hs-projekte-liste {
    --hs-link-stark: #F06540;
  }
}

html[data-theme="dark"] .hs-fokus,
html[data-theme="dark"] .hs-projekte-liste {
  --hs-link-stark: #F06540;
}

/* --- Spotlight-Flaeche ------------------------------------------------- */

.hs-fokus {
  position: relative;
  margin: var(--wp--preset--spacing--l) 0 0;
  padding: var(--wp--preset--spacing--l);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 166, 35, 0.18), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(232, 82, 42, 0.12), transparent 50%),
    var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-lg);
  box-shadow: var(--hs-shadow-md);
}

.hs-fokus__kopf {
  margin-bottom: var(--wp--preset--spacing--l);
}

.hs-fokus__hinweis {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--hs-surface-alt);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hs-fokus__punkt {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hs-primary);
  animation: hs-fokus-puls 2s infinite;
}

@keyframes hs-fokus-puls {
  0%   { box-shadow: 0 0 0 0 rgba(232, 82, 42, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(232, 82, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 82, 42, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hs-fokus__punkt { animation: none; }
}

.hs-fokus__titel {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
}

.hs-fokus__liste {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--wp--preset--spacing--l);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-fokus__eintrag {
  display: flex;
  margin: 0;
}

.hs-fokus__karte {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-lg);
  box-shadow: var(--hs-shadow-sm);
}

.hs-fokus__bildlink {
  display: block;
  overflow: hidden;
  line-height: 0;
}

/* Feste Bildhoehe – hochkant fotografierte Bilder zogen die Karte sonst
   in die Laenge. Gesichter sitzen meist im oberen Drittel. */
.hs-fokus__bild {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.5s ease;
}

.hs-fokus__karte:hover .hs-fokus__bild {
  transform: scale(1.03);
}

.hs-fokus__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: var(--wp--preset--spacing--l);
}

.hs-fokus__jahr {
  margin: 0 0 6px;
  color: var(--hs-text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hs-fokus__name {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.15;
}

.hs-fokus__name a {
  color: var(--hs-text) !important;
  text-decoration: none;
}

.hs-fokus__name a:hover,
.hs-fokus__name a:focus-visible {
  color: var(--hs-link-stark) !important;
  text-decoration: underline;
}

.hs-fokus__auszug {
  margin: 0 0 var(--wp--preset--spacing--m);
  color: var(--hs-text-muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: none !important;
}

.hs-fokus__aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: auto 0 0 !important;
  max-width: none !important;
}

.hs-fokus__spenden {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--hs-primary);
  /* Weiss ergaebe auf dem Markenorange nur 3.70:1 */
  color: var(--wp--preset--color--text-dark) !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(232, 82, 42, 0.3);
  transition: background var(--hs-transition), transform var(--hs-transition);
}

.hs-fokus__spenden:hover,
.hs-fokus__spenden:focus-visible {
  background: var(--hs-primary-light);
  transform: translateY(-2px);
}

.hs-fokus__geschichte {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--hs-link-stark) !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.hs-fokus__geschichte:hover,
.hs-fokus__geschichte:focus-visible {
  text-decoration-thickness: 2px !important;
}

/* Mehrere aktive Projekte: zwei pro Zeile */
@media (min-width: 768px) {
  .hs-fokus:not(.hs-fokus--einzeln) .hs-fokus__liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hs-fokus:not(.hs-fokus--einzeln) .hs-fokus__name {
    font-size: clamp(22px, 2.6vw, 28px);
  }
}

/* Ein aktives Projekt: volle Breite, Bild links, Text rechts */
@media (min-width: 900px) {
  .hs-fokus--einzeln .hs-fokus__karte {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .hs-fokus--einzeln .hs-fokus__bildlink {
    position: relative;
    min-height: 420px;
  }

  .hs-fokus--einzeln .hs-fokus__bild {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .hs-fokus--einzeln .hs-fokus__text {
    justify-content: center;
    padding: var(--wp--preset--spacing--xl);
  }
}

@media (max-width: 600px) {
  .hs-fokus {
    padding: var(--wp--preset--spacing--m);
  }

  .hs-fokus__text {
    padding: var(--wp--preset--spacing--m);
  }

  .hs-fokus__spenden {
    width: 100%;
  }
}

/* --- Trenner mit Herz ------------------------------------------------- */

.hs-projekte-trenner {
  margin: var(--wp--preset--spacing--xl) 0 var(--wp--preset--spacing--l);
  text-align: center;
}

.hs-projekte-trenner__symbol {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: var(--wp--preset--spacing--m);
  color: var(--hs-primary);
  font-size: 22px;
  line-height: 1;
}

.hs-projekte-trenner__symbol::before,
.hs-projekte-trenner__symbol::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hs-border) 30%, var(--hs-border) 70%, transparent);
}

.hs-projekte-trenner--ohne-linie {
  margin-top: var(--wp--preset--spacing--l);
}

.hs-projekte-trenner__titel {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
}

.hs-projekte-trenner__text {
  margin: 0 auto;
  color: var(--hs-text-muted);
  font-size: 16px;
}

/* --- Karten der abgeschlossenen Projekte (Query-Loop der Vorlage) ----- */

.hs-projekte-liste .hs-card .wp-block-post-featured-image img {
  aspect-ratio: 3 / 2 !important;
  object-fit: cover;
  object-position: center 30%;
}

.hs-projekte-liste .wp-block-post-terms {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hs-surface-alt);
  border: 1px solid var(--hs-border);
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hs-projekte-liste .wp-block-post-terms a {
  color: var(--hs-text-muted) !important;
  text-decoration: none;
}

.hs-projekte-liste .wp-block-post-title {
  font-weight: 700;
  line-height: 1.25;
  /* 18px: auch lange Namen wie „Inklusionsspielplatz“ passen ohne
     Trennung in die schmale Karte (Silbentrennung fehlt manchen Browsern). */
  font-size: 18px !important;
}

.hs-projekte-liste .wp-block-post-title a {
  color: var(--hs-text) !important;
  text-decoration: none;
}

.hs-projekte-liste .wp-block-post-title a:hover,
.hs-projekte-liste .wp-block-post-title a:focus-visible {
  color: var(--hs-link-stark) !important;
  text-decoration: underline;
}

/* Auszug auf drei Zeilen kuerzen – Karten werden gleichmaessiger */
.hs-projekte-liste .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--hs-text-muted);
}

.hs-projekte-liste .wp-block-post-excerpt__more-text {
  margin-top: 12px;
}

.hs-projekte-liste .wp-block-post-excerpt__more-link {
  font-weight: 700;
  color: var(--hs-link-stark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hs-projekte-liste .wp-block-post-excerpt__more-link:hover,
.hs-projekte-liste .wp-block-post-excerpt__more-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Startseite: Spotlight ohne eigene Ueberschrift – nur das Etikett */
.hs-fokus--ohne-titel .hs-fokus__kopf {
  margin-bottom: var(--wp--preset--spacing--m);
}

.hs-fokus--ohne-titel .hs-fokus__hinweis {
  margin: 0;
}

/* ============================================================
   STARTSEITE: VEREINSBESCHREIBUNG MIT FAQ
   patterns/verein-beschreibung.php, Text in inc/verein-text.php
   ============================================================ */

.hs-verein {
  /* Linkfarbe mit 4.5:1 – Markenorange erreicht auf Hell nur 3.70:1 */
  --hs-link-stark: #B53A18;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .hs-verein {
    --hs-link-stark: #F06540;
  }
}

html[data-theme="dark"] .hs-verein {
  --hs-link-stark: #F06540;
}

.hs-verein a:not(.wp-element-button) {
  color: var(--hs-link-stark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hs-verein a:not(.wp-element-button):hover,
.hs-verein a:not(.wp-element-button):focus-visible {
  text-decoration-thickness: 2px;
}

.hs-verein h3 {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  line-height: 1.3;
}

.hs-verein p {
  line-height: 1.7;
}

/* --- Einleitung ------------------------------------------------------ */

.hs-verein__einleitung {
  margin-bottom: var(--wp--preset--spacing--xl);
}

.hs-verein__titel {
  margin: 0 0 var(--wp--preset--spacing--m);
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.2;
}

.hs-verein__lead {
  font-size: clamp(18px, 1.8vw, 20px);
  color: var(--hs-text);
}

/* --- Zwei Spalten (Geschichte / Hilfe, Feiern / Mithelfen) ----------- */

.hs-verein__spalten {
  gap: var(--wp--preset--spacing--xl) !important;
  /* nur oben/unten – links/rechts zentriert das Constrained-Layout */
  margin-top: 0 !important;
  margin-bottom: var(--wp--preset--spacing--xl) !important;
}

/* --- Vier Grundsaetze ------------------------------------------------ */

.hs-verein__grundsaetze {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--wp--preset--spacing--m);
  margin: var(--wp--preset--spacing--m) 0 var(--wp--preset--spacing--xl);
}

.hs-verein__grundsaetze > * {
  margin: 0 !important;
}

@media (min-width: 768px) {
  .hs-verein__grundsaetze {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hs-verein__grundsatz {
  padding: var(--wp--preset--spacing--m);
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-top: 4px solid var(--hs-accent);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-sm);
}

.hs-verein__grundsatz h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.hs-verein__grundsatz p {
  margin: 0;
  color: var(--hs-text-muted);
  font-size: 16px;
}

/* --- Auszeichnung ---------------------------------------------------- */

.hs-verein__preis {
  position: relative;
  margin: 0 0 var(--wp--preset--spacing--xl);
  padding: var(--wp--preset--spacing--l);
  padding-left: calc(var(--wp--preset--spacing--l) + 56px);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 166, 35, 0.2), transparent 55%),
    var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-lg);
}

.hs-verein__preis::before {
  content: "\1F3C6"; /* Pokal */
  position: absolute;
  top: var(--wp--preset--spacing--l);
  left: var(--wp--preset--spacing--l);
  font-size: 36px;
  line-height: 1;
}

.hs-verein__preis p {
  margin: 0;
}

@media (max-width: 600px) {
  .hs-verein__preis {
    padding: var(--wp--preset--spacing--m);
    padding-top: calc(var(--wp--preset--spacing--m) + 48px);
  }

  .hs-verein__preis::before {
    top: var(--wp--preset--spacing--m);
    left: var(--wp--preset--spacing--m);
  }
}

/* --- So kannst du helfen --------------------------------------------- */

.hs-verein__hilfe {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hs-verein__hilfe li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 28px;
  line-height: 1.6;
}

.hs-verein__hilfe li::before {
  content: "\2665"; /* Herz */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hs-primary);
}

/* --- FAQ (Details-Bloecke) ------------------------------------------- */

.hs-verein .hs-faq {
  margin: 0 0 12px !important;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow-sm);
}

.hs-verein .hs-faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 56px 14px 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.hs-verein .hs-faq summary::-webkit-details-marker {
  display: none;
}

.hs-verein .hs-faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hs-primary);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.hs-verein .hs-faq[open] summary::after {
  content: "\2212"; /* Minus */
}

.hs-verein .hs-faq summary:focus-visible {
  outline: 3px solid var(--hs-primary);
  outline-offset: 2px;
  border-radius: var(--hs-radius);
}

.hs-verein .hs-faq > p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--hs-text-muted);
}
