/* Desktop: only explicit cross-device features and necessary compatibility fixes.
 * Original site/Customizer styles remain authoritative for ordinary content. */
:root { --wh-red: #ae2b13; --wh-action-radius: 8px; --wh-action-height: 44px; --wh-section-gap: 2.25rem; }
.wh-header-search { display: none; }
.wh-image-zoom { display: none; }
.wh-disclosure { clear: both; margin: 1rem 0; border: 1px solid #d4d4d4; border-radius: 2px; background: #fafafa; }
.wh-disclosure > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; min-height: 44px; }
.wh-disclosure-content { padding: 0 1rem 1rem; }
.wh-disclosure-content > :first-child { margin-top: .5rem !important; }
.wh-disclosure-content > :last-child { margin-bottom: 0 !important; }
.wh-disclosure .balken, .wh-disclosure .balken > .wp-block-group__inner-container { width: 100% !important; padding: 0 !important; margin: 0 !important; transform: none !important; background: transparent; }
.wh-donation-followup { clear: both; margin-top: var(--wh-section-gap); }
.wh-donation-shopping { float: none !important; width: 100% !important; max-width: none !important; margin: 1.25rem 0 !important; padding: 1.25rem !important; border: 1px solid #ccc; background: #f5f5f5; }
.wh-donation-shopping h2 { margin-top: 0 !important; }
/* Badge limits must win over legacy image sizing and portrait classification. */
.wh-donation-followup img:is([src*="sgs-" i], [src*="Spendenstempel" i], [src*="spendenguetesiegel" i]) { display: block; max-height: 7rem !important; max-width: min(100%, 11rem) !important; width: auto !important; height: auto !important; object-fit: contain; margin-inline: auto; }
.wh-donation-followup .wp-block-spacer { height: .75rem !important; }
#spenden-direkt { scroll-margin-top: 10rem; }
.wh-donation-amount { margin-top: 1.5rem; clear: both; }
.page-template-page-online-spende .spenden-container .btn { box-sizing: border-box; vertical-align: middle; }
.page-template-page-online-spende .btn label { display: flex; align-items: center; justify-content: center; gap: .4rem; box-sizing: border-box; min-height: 44px; margin: 0; }
.page-template-page-online-spende .btn .custom-eur { width: 7rem !important; max-width: 100% !important; min-height: 0 !important; height: 2rem !important; margin: 0 !important; padding: .25rem .5rem !important; box-sizing: border-box; }
.page-template-page-online-spende .grid-item button.wh-project-select { display: flex; align-items: center; justify-content: center; box-sizing: border-box; margin: .75rem 0 0 !important; padding: .5rem .75rem !important; width: 100%; height: auto !important; min-height: 44px; font-size: .95rem; line-height: 1.3; white-space: normal; border-radius: 3px; }
.page-template-page-online-spende .grid-item button.wh-project-select[aria-pressed=true] { background: #5d2015; }
.page-template-page-online-spende .grid-item .wh-disclosure { margin: .75rem 0; text-align: left; }
.page-template-page-online-spende .grid-item .wh-disclosure summary { font-size: .95rem; }

/* Scope the new carousel mechanics so the non-JS fallback keeps its content. */
.slider.wh-carousel { height: auto !important; touch-action: pan-y pinch-zoom; background: var(--wh-slider-gray) !important; }
.slider.wh-carousel .inner { display: flex !important; align-items: stretch; width: 100% !important; left: 0 !important; transition: transform .4s ease; background: var(--wh-slider-gray) !important; }
.slider.wh-carousel .inner::before, .slider.wh-carousel .inner::after { display: none; }
.slider.wh-carousel .inner > .slide { position: relative; flex: 0 0 100%; width: 100% !important; min-width: 0; float: none; height: auto !important; margin: 0 !important; }
.slider.wh-carousel .hero-image.frontpage { height: auto !important; aspect-ratio: 2 / 1; overflow: hidden; }
.slider.wh-carousel .hero-image.frontpage img { position: static !important; width: 100% !important; height: 100% !important; object-fit: cover; }
.slider.wh-carousel .controls[hidden] { display: none !important; }
/* The decorative caption must not intercept clicks on the photograph. */
.slider.wh-carousel .hero-image.frontpage > a { display: block; width: 100%; }
.slider.wh-carousel .overlay { pointer-events: none; }
.slider.wh-carousel .overlay a { pointer-events: auto; }
.slider.wh-carousel .controls:focus-visible { opacity: 1; outline: 3px solid #21759b; outline-offset: -3px; }
.wh-map-navigation { display: none; }
@media (prefers-reduced-motion: reduce) { .slider.wh-carousel .inner { transition: none; } }
@media (min-width: 769px) {
  .wh-disclosure-mobile { border: 0; background: transparent; }
  /* Match the later donation summary rule's specificity. Mobile-only toggles
   * must stay hidden on desktop, including project cards and partner content. */
  .wh-disclosure-mobile > summary,
  .page-template-page-online-spende .wh-disclosure.wh-disclosure-mobile > summary { display: none; }
  .wh-disclosure-mobile > .wh-disclosure-content { padding: 0; }
}

/* Native details stay keyboard-operable; the chevron reflects their actual state. */
.page-template-page-online-spende .wh-disclosure > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; list-style: none;
  box-sizing: border-box; width: 100%; min-height: var(--wh-action-height); padding: .5rem .75rem;
  font-size: 1rem; line-height: 1.3; font-weight: 400; border-radius: var(--wh-action-radius);
}
.page-template-page-online-spende .wh-disclosure > summary::-webkit-details-marker { display: none; }
.page-template-page-online-spende .wh-disclosure > summary::after {
  content: ''; display: block; flex: 0 0 .55rem; width: .55rem; height: .55rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: .2rem;
}
.page-template-page-online-spende .wh-disclosure[open] > summary::after { transform: rotate(225deg); }
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure { width: 100%; box-sizing: border-box; border: 0; border-radius: var(--wh-action-radius); }
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure > summary { border: 1px solid #d4d4d4; }
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure > summary { min-height: 44px; }
.page-template-page-online-spende .grid-item { padding: 0 !important; }
.page-template-page-online-spende .grid-item .grid-item__content { padding: .75rem 0 !important; }
.page-template-page-online-spende .grid-item .grid-item__content > :is(h3, h4, div:not(.wh-disclosure)) { margin-inline: .75rem !important; }
.page-template-page-online-spende .grid-item h3 { margin-top: .5rem !important; margin-bottom: .5rem !important; }
.page-template-page-online-spende .grid-item h4 { margin-top: .35rem !important; margin-bottom: .35rem !important; }
.page-template-page-online-spende .grid-item .wh-disclosure { margin: .5rem 0 !important; border: 0; background: transparent; }
.page-template-page-online-spende .grid-item .wh-disclosure > summary,
.page-template-page-online-spende .grid-item button.wh-project-select {
  width: 100% !important; min-height: var(--wh-action-height); margin-inline: 0 !important;
  background: var(--wh-red); color: #fff; border-radius: var(--wh-action-radius); text-align: center;
}
.page-template-page-online-spende .grid-item .wh-disclosure > summary { justify-content: center; }
.page-template-page-online-spende .grid-item .wh-disclosure-content { padding: .75rem; }
.page-template-page-online-spende .grid-item button.wh-project-select { margin-top: .5rem !important; }
.page-template-page-online-spende .grid-item .hero-image { height: auto !important; min-height: 0 !important; }
.page-template-page-online-spende .grid-item .hero-image img:not(.hero-image__icon) { display: block; width: 100% !important; height: auto !important; max-height: 10rem !important; object-fit: cover; aspect-ratio: 2.4 / 1; }
.page-template-page-online-spende .grid-item img.hero-image__icon { width: 36px !important; height: 36px !important; max-width: 36px !important; flex-basis: 36px; margin-top: -1.125rem !important; }

/* December 4: keep compact mobile cards separate from the desktop layout. */
@media (min-width: 769px) {
  /* Divide the available form width after the gap, without a leftover right gutter. */
  .page-template-page-online-spende .spenden-container .grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-template-page-online-spende .grid-item {
    padding: 0 10px 10px !important;
    min-width: 0;
  }
  .page-template-page-online-spende .grid-item .hero-image {
    flex: 0 0 auto;
    width: calc(100% + 20px);
    margin: 0 -10px;
    padding: 0 !important;
    aspect-ratio: 2 / 1;
    overflow: hidden;
  }
  .page-template-page-online-spende .grid-item .hero-image img:not(.hero-image__icon) {
    position: static !important;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto;
    object-fit: cover;
    transform: none !important;
  }
  .page-template-page-online-spende .grid-item .grid-item__content {
    flex: 1 1 auto;
    height: auto;
    min-width: 0;
    padding: 0 !important;
  }
  .page-template-page-online-spende .grid-item .grid-item__content > :is(h3, h4, div:not(.wh-disclosure)) { margin-inline: 0 !important; }
  .page-template-page-online-spende .grid-item img.hero-image__icon {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    margin-top: 0 !important;
  }
  .page-template-page-online-spende .grid-item h4 { margin: 1.2em 0 0 !important; }
  .page-template-page-online-spende .grid-item h3 { margin: 0 !important; }
  .page-template-page-online-spende .grid-item .wh-disclosure { flex: 1 0 auto; margin: .75rem 0 !important; }
  .page-template-page-online-spende .grid-item .wh-disclosure-content { padding: 0; }
  .page-template-page-online-spende .grid-item button.wh-project-select { flex: 0 0 auto; margin-top: auto !important; }

  .page-template-page-online-spende .spenden-container radiogroup {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
  }
  .page-template-page-online-spende .spenden-container .wh-donation-amount radiogroup { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .page-template-page-online-spende .spenden-container radiogroup > .btn {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  .page-template-page-online-spende .spenden-container radiogroup > .btn label { width: 100%; padding: .5rem; }
  .page-template-page-online-spende .wh-donation-amount .btn .custom-eur { width: 100% !important; min-width: 0; flex: 1 1 0; }
  .page-template-page-online-spende .wh-donation-amount .btn input[type=radio] { flex: 0 0 auto; }
  .wh-partner-desktop-heading { display: block; }
}
@media (max-width: 768px) {
  .wh-partner-desktop-heading { display: none; }
}

@media (min-width: 769px) {
  .slider.wh-carousel .hero-image.frontpage { padding-bottom: 0 !important; height: min(50vw, 600px) !important; aspect-ratio: auto; }
  .slider.wh-carousel .hero-image.frontpage > a { height: 100%; }
  .slider.wh-carousel .hero-image.frontpage img { height: 100% !important; aspect-ratio: auto; object-fit: cover; }
  .page-template-page-online-spende .wh-donation-followup {
    box-sizing: border-box;
    width: 100%;
    max-width: 780px;
    margin-inline: auto;
    padding-inline: 1rem;
  }
  .wh-donation-followup .wh-disclosure-mobile > .wh-disclosure-content {
    padding: 1.25rem;
    background: #eee;
  }
  .wh-donation-followup .wh-disclosure-mobile .balken { text-align: left; }
  .wh-donation-followup .wh-disclosure-mobile .balken p { text-align: left; }
  .page-template-page-online-spende .wh-donation-followup > :is(.kontakt, .contact-card, .mehrerekontakte) {
    box-sizing: border-box;
    float: none;
    max-width: 100%;
    margin: 1.5rem 0 1.5rem auto;
  }
}

.page-template-page-online-spende .wh-donation-followup + .balken {
  margin-top: 2rem;
  padding: 2rem 1rem;
  box-sizing: border-box;
}
.page-template-page-online-spende .wh-donation-followup + .balken > .wp-block-group__inner-container { margin: 0; padding: 0; }
.page-template-page-online-spende .wh-donation-followup + .balken p { max-width: 780px; margin-inline: auto; }
@media (max-width: 768px) {
  .slider.wh-carousel .inner > .slide { max-height: none; }
}



/* Restore the original desktop shopping box; mobile keeps its stacked layout. */
@media (min-width: 769px) {
  .page-template-page-online-spende .wh-donation-shopping {
    width: 260px !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto 25px !important;
    padding: 30px 20px !important;
    background: #972e22;
    border: 1px solid #cea38c;
  }
  .page-template-page-online-spende .wh-donation-shopping,
  .page-template-page-online-spende .wh-donation-shopping :is(h2, p) {
    color: #fff !important;
    text-align: center !important;
  }
  .page-template-page-online-spende form[name="spenden_form"] { clear: both; }
}
@media (min-width: 1000px) {
  .page-template-page-online-spende .wh-donation-shopping {
    float: left !important;
    margin: 0 35px 25px -100px !important;
  }
}

/* Keep the original desktop text flow inside the aligned campaign container. */
.wh-campaign-story { min-width: 0; }
@media (min-width: 769px) {
  .page-template-page-online-spende .wh-campaign-layout {
    display: flow-root;
    margin-block: 1.5rem;
  }
  .page-template-page-online-spende .wh-campaign-layout .wh-donation-shopping {
    float: left !important;
    margin: 0 35px 25px 0 !important;
    width: 260px !important;
    box-sizing: border-box;
  }
  /* Let authored paragraphs wrap beside the box, then use the full text width.
   * Gutenberg spacers/media rows can clear it just as in the original theme. */
  .page-template-page-online-spende .wh-campaign-story { display: contents; }
  .wh-campaign-story > :first-child { margin-top: 0 !important; }
  .page-template-page-online-spende .wh-campaign-story .wh-campaign-contact {
    display: flow-root;
    margin: 0 0 1.5rem 295px; /* 260px shopping box + 35px gutter. */
  }
  .page-template-page-online-spende .wh-campaign-contact :is(.kontakt, .contact-card, .mehrerekontakte) {
    box-sizing: border-box;
    float: none;
    max-width: 100%;
    margin: 0;
  }
  /* Match the original full-width, centred closing banner on desktop. */
  .page-template-page-online-spende .wh-donation-followup.wh-donation-partner {
    width: 100vw;
    max-width: none;
    margin: 2rem 0 1.5rem 50%;
    transform: translateX(-50%);
    padding: 2rem 1rem;
    background: #eee;
    text-align: center;
  }
  .wh-donation-partner > .wh-partner-desktop-heading { margin: 0 auto 1rem; max-width: 780px; }
  .page-template-page-online-spende .wh-donation-partner > .wh-disclosure-mobile {
    max-width: 780px;
    margin: 0 auto;
    background: transparent;
  }
  .wh-donation-partner .wh-disclosure-mobile > .wh-disclosure-content { padding: 0; background: transparent; }
  .wh-donation-followup.wh-donation-partner .wh-disclosure-mobile .balken,
  .wh-donation-followup.wh-donation-partner .wh-disclosure-mobile .balken p { text-align: center; }
}


.page-template-page-online-spende .grid-item button.wh-project-select[aria-pressed=true] { background: #5d2015; }

.site-footer .footer-accordion-btn { display: none !important; }
.site-footer .footer-fold, .site-footer .footer-fold[hidden] { display: contents !important; }
.wh-page-ending > .donate-for-project { display: none; }

.wh-newsletter-mobile-only { display: none !important; }

/* Original desktop cards remain the click targets. Keep the extra mobile action
 * available to keyboard users without adding a permanent desktop button row. */
.page-template-page-online-spende .grid-item button.wh-project-select:not(:focus-visible) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Transparency is an expandable content section, not a form action. */
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always > summary {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: .5rem 0;
  min-height: 44px;
  font-weight: 400;
  line-height: 1.35;
  font-size: 1.5rem;
  justify-content: center;
  text-align: center;
}
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always > summary::after {
  color: var(--wh-red);
}
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always > summary:hover {
  color: var(--wh-red);
}
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always > summary:focus-visible {
  outline: 2px solid var(--wh-red);
  outline-offset: 4px;
}
.page-template-page-online-spende .wh-donation-followup > .wh-disclosure-always > .wh-disclosure-content {
  margin-top: 1.25rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid #ddd;
}

/* Give the expanded transparency rows their own desktop spacing. */
.page-template-page-online-spende .wh-disclosure-always > .wh-disclosure-content > .wp-block-spacer:not(:first-child) {
  height: 2rem !important;
}

/* The homepage news block uses .termin for its image wrapper. Keep this
 * thumbnail at the original 300px news-image scale, even on wide screens. */
.startseite .news-veranstaltungen > .news .termin {
  width: 300px;
  max-width: 100%;
  margin-bottom: .75rem;
}
.startseite .news-veranstaltungen > .news .termin img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
