/* =========================================================
   Dorffest Huerbel – styles.css
   Fix:
   - Header + Nav bleiben stehen
   - nur .page-scroll-area scrollt
   - sichtbare Scrollbar im Content-Container
   ========================================================= */

/* =========================
   1) Basis / Reset
   ========================= */

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

:root {
  --chrome: 0px;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

html {
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #ffffff;
  color: #2b2b2b;
}

/* =========================
   2) Header
   ========================= */

.site-header {
  position: relative;
  background: #cfe9f6;
  padding: 40px 20px;
  border-bottom: 4px solid #8cc7e6;
}

.header-center {
  text-align: center;
}

.header-center h1 {
  margin: 0 0 10px;
  font-size: 3rem;
}

.header-center h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
}

.header-logo {
  position: absolute;
  top: 20px;
  right: 20px;
}

.header-logo img {
  display: block;
  width: auto;
  height: 90px;
}

/* Mobile: verhindert, dass das Wappen in den Titel ragt */
@media (max-width: 700px) {
  .site-header {
    padding: 28px 16px;
  }

  .header-logo {
    top: 10px;
    right: 10px;
  }

  .header-logo img {
    height: 58px;
  }

  .header-center {
    padding-right: 76px;
  }

  .header-center h1 {
    font-size: 2.2rem;
  }

  .header-center h2 {
    font-size: 1.1rem;
  }
}

/* =========================
   3) Navigation (Aktenreiter)
   ========================= */

.main-nav {
  background: #ffffff;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 14px;
}

.main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 16px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav ul::-webkit-scrollbar {
  display: none;
}

.main-nav li {
  flex: 0 0 auto;
}

.main-nav a {
  display: block;
  padding: 10px 14px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 600;
  color: #2b2b2b;
  background: #f3f4f6;
  border: 1px solid #e1e3e6;
  border-top: none;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.main-nav a.active {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding-bottom: 26px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

@media (max-width: 420px) {
  .main-nav a {
    font-size: 14px;
  }
}

/* =========================
   4) Globaler Content-Bereich
   Nur dieser Bereich scrollt
   ========================= */

.page-scroll-area {
  height: calc(100vh - var(--chrome));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;

  scrollbar-width: auto;
  scrollbar-color: #b8bec6 #f3f4f6;
}

.page-scroll-area::-webkit-scrollbar {
  width: 12px;
}

.page-scroll-area::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.page-scroll-area::-webkit-scrollbar-thumb {
  background: #b8bec6;
  border-radius: 999px;
  border: 2px solid #f3f4f6;
}

.page-scroll-area::-webkit-scrollbar-thumb:hover {
  background: #9ea6af;
}

/* =========================
   5) Story / Vereine
   ========================= */

.story {
  scroll-snap-type: y proximity;
  scroll-padding-top: 0;
}

.story-section {
  display: block;
  padding: 0;
  scroll-snap-align: start;
}

.story-section:nth-child(even) {
  background: #f7f8fa;
}

.story-inner {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.story-eyebrow {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #555;
}

.story-title {
  margin: 0 0 10px;
  font-size: 2rem;
}

.story-text {
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.story-hint {
  margin-top: 18px;
  font-weight: 600;
  color: #666;
}

.story-bullets {
  margin: 0;
  padding-left: 18px;
}

.story-section[id^="verein-"] {
  min-height: calc(64vh - 44px);
  padding-top: 48px;
  padding-bottom: 48px;
  margin-top: 2px;
  margin-bottom: 2px;
}

.story-section[id^="verein-"] .story-inner {
  margin-top: 10px;
}

/* =========================
   6) Buttons / Links
   ========================= */

.story-link,
.button-link {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7dbe0;
  background: #ffffff;
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 700;
}

/* =========================
   7) Cluster View (Vereine)
   ========================= */

.cluster-stage {
  position: relative;
  width: 100%;
  height: 420px;
  margin: 18px auto 12px;
  border-radius: 18px;
  border: 1px solid #e6e6e6;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f7f8fa 70%);
  overflow: hidden;
}

.cluster-node {
  position: absolute;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d7dbe0;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
  will-change: transform;
  animation: clusterFloat var(--dur, 6s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes clusterFloat {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) scale(var(--s, 1));
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--dx, 4px), var(--dy, -4px)) scale(var(--s, 1));
  }
  100% {
    transform: translate(-50%, -50%) translate(0, 0) scale(var(--s, 1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cluster-node {
    animation: none;
  }
}

/* =========================
   8) Allgemeiner Seiteninhalt / Cards
   ========================= */

.page-content,
.credits-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.credits-page {
  padding-bottom: 70px;
}

.card {
  margin: 0 0 18px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin: 0 0 12px;
}

.muted {
  color: #666;
}

.muted.small {
  font-size: 0.55rem;
}

.text-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================
   9) Kontaktformular
   ========================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: 14px;
}

.contact-item .label,
.form-row .label,
.form-row label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
  color: #555;
}

.contact-item .value {
  color: #2b2b2b;
}

.contact-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e1e3e6;
  background: #ffffff;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.input-suffix {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.input-suffix .suffix {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e1e3e6;
  background: #f7f8fa;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
}

/* Segmented Radio (Ja/Nein) */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.segmented label {
  display: grid;
  place-items: center;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid #e1e3e6;
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.segmented input:checked + label {
  border-color: #8cc7e6;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
}

.segmented input:focus-visible + label {
  outline: 2px solid #8cc7e6;
  outline-offset: 2px;
}

/* Datenschutz-Checkbox */
.privacy-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 10px;
  padding: 14px 16px;
  margin-top: 18px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fafbfc;
  font-size: 0.85rem;
  line-height: 1.5;
}

.privacy-consent button {
  grid-column: 1 / 3;
  justify-self: start;
}

.privacy-consent input[type="checkbox"] {
  grid-column: 1;
  margin-top: 4px;
  accent-color: #1f2937;
  cursor: pointer;
}

.privacy-consent label {
  grid-column: 2;
  cursor: pointer;
}

.privacy-consent a {
  font-weight: 500;
  text-decoration: underline;
}

.privacy-consent a:hover {
  text-decoration: none;
}

/* Success-Seiten */
.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.success-actions .button-link {
  flex: 1 1 220px;
  text-align: center;
}

/* =========================
   10) Sponsoren
   ========================= */

.sponsor-intro,
.sponsor-section,
.sponsor-outro {
  margin: 0;
  padding: 0;
}

.sponsor-intro {
  margin: 0 0 14px;
}

.sponsor-card {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 22px 20px;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid #e6e6e6;
}

.sponsor-intro .sponsor-card {
  border-top: 0;
}

.sponsor-actions,
.sponsor-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sponsor-hero {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid #e6e6e6;
  border-radius: 18px;
  background: #f7f8fa;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sponsor-hero-media {
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
}

.sponsor-hero-media img,
.sponsor-hero-img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.sponsor-jumplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 6px;
}

.sponsor-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.sponsor-item,
.sponsor-card--rich,
.sponsor-package,
.package {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e6e6e6;
  border-radius: 18px;
}

.sponsor-item {
  padding: 18px;
}

.sponsor-card--rich {
  padding: 22px;
  margin: 0 0 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sponsor-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.sponsor-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 72px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e6e6e6;
  background: #fff;
}

.sponsor-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 84px;
  max-height: 60px;
  object-fit: contain;
}

.sponsor-meta {
  display: grid;
  gap: 6px;
}

.sponsor-title,
.sponsor-name {
  margin: 0 0 6px;
}

.sponsor-name {
  font-size: 1.2rem;
}

.sponsor-desc {
  margin: 0;
  color: #666;
}

.sponsor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.sponsor-badge--gold {
  border-color: rgba(218, 165, 32, 0.55);
  box-shadow: 0 8px 18px rgba(218, 165, 32, 0.18);
}

.sponsor-badge--silber {
  border-color: rgba(160, 160, 160, 0.55);
  box-shadow: 0 8px 18px rgba(160, 160, 160, 0.18);
}

.sponsor-badge--bronze {
  border-color: rgba(205, 127, 50, 0.55);
  box-shadow: 0 8px 18px rgba(205, 127, 50, 0.18);
}

.sponsor-block {
  margin: 0 0 18px;
}

.sponsor-block-head {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 10px 6px 0;
}

.sponsor-bullets,
.package-bullets {
  margin-top: 8px;
  padding-left: 18px;
}

.package-grid,
.sponsor-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.package,
.sponsor-package {
  padding: 16px 18px;
}

.package-title,
.sponsor-package h4 {
  margin: 10px 0;
  font-weight: 900;
  font-size: 1.1rem;
}

/* =========================
   11) Startseite: Slideshow
   ========================= */

.hero-slider h3 {
  margin: 0 0 12px;
}

.slideshow,
.slideshow-wrapper,
#slideshow,
#mainSlideshow {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e6e6e6;
  background: #f7f8fa;
}

.slideshow-img,
img.slideshow-img#mainSlideshowImg,
#mainSlideshowImg.slideshow-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 18px;
  background: #f7f8fa;
}

.slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.slideshow-btn.prev {
  left: 12px;
}

.slideshow-btn.next {
  right: 12px;
}

.slideshow-dots {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.slideshow-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.slideshow-dots button.is-active {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.35);
}

/* =========================
   12) Footer
   ========================= */

.site-footer {
  margin: 18px 0 24px;
  text-align: center;
  font-size: 0.95rem;
  color: #555;
}

.site-footer a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  text-decoration: none;
}

/* =========================
   13) Responsive
   ========================= */

@media (max-width: 900px) {
  .package-grid,
  .sponsor-packages {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .sponsor-head {
    grid-template-columns: 1fr;
  }

  .sponsor-logo {
    width: 100%;
    height: 74px;
  }

  .sponsor-logo img {
    max-height: 56px;
  }

  .sponsor-hero-media img,
  .sponsor-hero-img {
    height: 170px;
  }
}

@media (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .cluster-stage {
    height: 280px;
  }

  .story-title {
    font-size: 1.7rem;
  }

  .slideshow,
  .slideshow-wrapper,
  #slideshow,
  #mainSlideshow {
    height: 220px;
  }

  .privacy-consent {
    font-size: 0.9rem;
  }
}

@media (max-width: 520px) {
  .sponsor-head {
    grid-template-columns: 62px 1fr;
  }

  .sponsor-logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }
}