/* Lokale Anzeigehilfen und gezielte Korrekturen des bestehenden Designs. */
:root { --hs-header-offset: 110px; }
html[data-hs-text-size="125"] { font-size: 125%; }
html[data-hs-text-size="150"] { font-size: 150%; }
html[data-hs-text-size="200"] { font-size: 200%; }

/* Gold bleibt erhalten, die Beschriftung erhält ausreichenden Kontrast. */
.btn-main { color: #3e2c1a; }
.btn-main:hover, .btn-main:focus-visible, .btn-main:active { background: #7c5c3e; color: #fff; }
#bewohner .blockquote, #aufnahme .blockquote { color: #7c5c3e !important; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #21382a !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px #fff !important;
}
.skip-link:focus, .skip-link:focus-visible {
  position: fixed; top: .5rem; left: .5rem; z-index: 12000;
  width: auto; height: auto; max-width: calc(100% - 1rem); overflow: visible;
  padding: .75rem 1rem; background: #fff; color: #21382a;
}
main { padding-top: var(--hs-header-offset); }
section[id], #aufnahme, #termine, #main, #hof-expose, #mitarbeiten { scroll-margin-top: var(--hs-header-offset); }
html.hs-text-enlarged .floating-navbar .navbar-brand {
  max-width: calc(100% - 4rem); white-space: normal; overflow-wrap: anywhere; min-width: 0;
}
html.hs-text-enlarged .floating-navbar .container { flex-wrap: wrap; }
html.hs-text-enlarged .navbar-expand-xl .navbar-toggler { display: block; }
html.hs-text-enlarged .navbar-expand-xl .navbar-collapse { flex-basis: 100%; }
html.hs-text-enlarged .navbar-expand-xl .navbar-collapse.collapse:not(.show) { display: none !important; }
html.hs-text-enlarged .navbar-expand-xl .navbar-nav { flex-direction: column; align-items: stretch; }
html.hs-text-enlarged .floating-navbar .nav-link { white-space: normal; font-size: 1rem; }
html.hs-text-enlarged .floating-navbar .nav-link.nav-apply { margin: .4rem 0; white-space: normal; }
html.hs-text-enlarged .floating-navbar .navbar-collapse { max-height: calc(100dvh - 8rem); overflow-y: auto; }
html.hs-text-enlarged .expose-preview-action { white-space: normal; width: min(90%, 18rem); }
html.hs-text-enlarged .viewer-topbar { flex-wrap: wrap; }
.footer { padding-bottom: 5.5rem; }

.hs-display-launcher {
  position: fixed; bottom: max(1rem, env(safe-area-inset-bottom)); right: max(1rem, env(safe-area-inset-right));
  z-index: 1040; display: grid; place-items: center;
  width: 48px; height: 48px; min-width: 48px; min-height: 48px; padding: 0;
  border: 1px solid #7c5c3e; border-radius: 50%;
  background: #fffdf8; color: #65472f; box-shadow: 0 3px 12px #65472f20;
  cursor: pointer;
}
.hs-display-launcher > svg { display: block; width: 28px; height: 28px; pointer-events: none; }
.hs-display-launcher:hover { background: #f0e5d1; color: #3e2c1a; }
html.hs-high-contrast .hs-display-launcher { background: #fff; color: #142b1a; border-color: #142b1a; }
.invitation-open .hs-display-launcher, .modal-open .hs-display-launcher { display: none !important; }
.hs-display-dialog {
  width: min(32rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto;
  padding: 0; border: 1px solid #d5ddcf; border-radius: 1rem; overflow-y: auto;
  color: #263b2e; background: #fffdf8; box-shadow: 0 15px 65px #0004;
}
.hs-display-dialog::backdrop { background: #152218b8; }
.hs-display-dialog [hidden], #lightboxOverlay[hidden], #lightboxOverlay [hidden] { display: none !important; }
.hs-display-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid #d5ddcf; }
.hs-display-header h2 { margin: 0; font: 700 1.2rem/1.4 system-ui, sans-serif; }
.hs-display-close { min-height: 44px; min-width: 44px; padding: .4rem; border: 1px solid #b8c7b1; border-radius: .4rem; background: #fff; color: #263b2e; font: inherit; font-size: 1.45rem; cursor: pointer; }
.hs-display-body { padding: 1.2rem; }
.hs-display-hint { margin: 0 0 1.2rem; font-size: .95rem; line-height: 1.6; }
.hs-display-dialog fieldset { margin: 0; padding: 0; border: 0; }
.hs-display-dialog legend { float: none; width: auto; margin: 0 0 .65rem; padding: 0; font-size: 1rem; font-weight: 700; }
.hs-display-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .5rem; }
.hs-display-size { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: .65rem; border: 1px solid #c7d1bf; border-radius: .45rem; font-size: .95rem; cursor: pointer; }
.hs-display-size:has(input:checked) { background: #e9efe3; border-color: #405942; }
.hs-display-dialog input { flex: none; width: 1.1em; height: 1.1em; accent-color: #405942; }
.hs-display-options { display: grid; gap: .25rem; margin: 1rem 0; }
.hs-display-check { display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: .5rem 0; line-height: 1.5; cursor: pointer; }
.hs-display-reset { min-height: 44px; padding: .65rem 1rem; border: 1px solid #405942; border-radius: .45rem; background: #405942; color: #fff; font: inherit; cursor: pointer; }
.hs-display-status { min-height: 1.5em; margin: .9rem 0 0; font-size: .875rem; line-height: 1.5; }
.hs-display-dialog-open, .hs-gallery-open { overflow: hidden; }
.hs-lageplan-button { padding: 0; border: 0; background: transparent; width: min(350px, 100%); max-width: 100%; margin-top: 20px; cursor: pointer; }
.hs-lageplan-button img { display: block; max-width: 100% !important; height: auto; margin-top: 0 !important; }
#faq h3.card-title { font-size: calc(1.275rem + .3vw); }
#viewerFullscreenStatus:empty { display: none; }
@media (min-width: 1200px) { #faq h3.card-title { font-size: 1.5rem; } }

/* Die alte Galerie erhält einen besser nutzbaren Bild-/Textbereich. */
.lightbox-overlay { padding: 4.75rem 4rem 2rem; overflow: auto; }
.lightbox-content { position: static; transform: none; margin: auto; max-width: min(100%, 75rem); max-height: none; min-width: 0; }
.lightbox-image { display: block; margin: 0 auto; width: auto; max-width: 100%; max-height: calc(100dvh - 11rem); object-fit: contain; }
.lightbox-caption { overflow-wrap: anywhere; line-height: 1.5; }
.lightbox-close, .lightbox-nav { min-width: 44px; min-height: 44px; }
.lightbox-nav:disabled { opacity: .45; cursor: default; }

html.hs-underlined-links a { text-decoration: underline !important; text-underline-offset: .16em; text-decoration-thickness: .09em; }
html.hs-reduced-motion, html.hs-reduced-motion *, html.hs-reduced-motion *::before, html.hs-reduced-motion *::after {
  scroll-behavior: auto !important; animation: none !important; transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html, html *, html *::before, html *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Wahlweise erhöhte Kontraste. Bilder behalten ihre Originalfarben. */
html.hs-high-contrast { --bg: #fff; --text: #142b1a; --brand: #1b3c25; --brand-2: #d6ba80; }
html.hs-high-contrast body, html.hs-high-contrast main,
html.hs-high-contrast section:not(.hero-section), html.hs-high-contrast .card,
html.hs-high-contrast .application-card, html.hs-high-contrast .supporter-quote,
html.hs-high-contrast .floorplan-meta, html.hs-high-contrast .modal-content,
html.hs-high-contrast .hs-display-dialog { background: #fff !important; color: #142b1a !important; box-shadow: none; }
html.hs-high-contrast .floating-navbar { background: #fff !important; color: #142b1a; border: 1px solid #26472f; }
html.hs-high-contrast :is(.subtle,.text-muted,.application-copy,.card-title,.section-title,.floorplan-cta,.supporter-author,.supporter-author span,.supporter-quote blockquote p,.supporter-quote .eyebrow) { color: #142b1a !important; }
html.hs-high-contrast .hero-section, html.hs-high-contrast .hero-overlay,
html.hs-high-contrast .footer { background: #142b1a !important; color: #fff !important; }
html.hs-high-contrast .hero-section :is(h1,p,a,li,blockquote), html.hs-high-contrast .footer a { color: #fff; }
html.hs-high-contrast :is(.btn-main,.application-button,.nav-link.nav-apply,.hs-display-reset) { background: #1b3c25 !important; color: #fff !important; border: 2px solid #1b3c25 !important; }
html.hs-high-contrast .hero-section .btn-main { background: #fff !important; color: #142b1a !important; border-color: #fff !important; }
html.hs-high-contrast :is(.hs-event-card,.hs-event-location) { background: #142b1a !important; color: #fff !important; }
html.hs-high-contrast .hs-event-card::before { background: #142b1a !important; }
html.hs-high-contrast .hs-event-card :is(h2,p,.hs-event-day,.hs-event-time) { color: #fff !important; }
html.hs-high-contrast .hs-event-date-badge { color: #142b1a !important; background: #fff !important; }
html.hs-high-contrast .floorplan-preview { background: #fff; }

@media (max-width: 575.98px) {
  .hs-display-launcher { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .hs-display-header, .hs-display-body { padding: 1rem; }
  .lightbox-overlay { padding: 5rem 2.75rem 1rem; }
  .lightbox-prev { left: .25rem; padding: .5rem; }
  .lightbox-next { right: .25rem; padding: .5rem; }
  .lightbox-close { top: .6rem; right: .6rem; }
  .lightbox-counter { top: .7rem; left: .6rem; max-width: calc(100% - 5rem); }
  .lightbox-image { max-height: calc(100dvh - 13rem); }
}
@media print { .hs-display-launcher, .hs-display-dialog { display: none !important; } }
