/* ===========================================================
   Beachzone Stettfurt — Layout & Komponenten
   Alle Farben und Schriften kommen aus ci.css (wird davor
   geladen). Diese Datei enthält nur noch Struktur, Abstände
   und Bauteile — ändert sich die CI, muss hier nichts an.
   =========================================================== */

:root{
  /* Layout-Mechanik, nicht Teil der CI */
  --shadow-sm: 0 1px 2px rgba(22,50,79,0.08);
  --shadow-md: 0 12px 28px -14px rgba(22,50,79,0.35);

  --radius: 14px;
  --container: 1100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Footer immer am unteren Bildschirmrand, auch bei wenig Inhalt: body ist
     eine Flex-Spalte über die volle Bildschirmhöhe, der Footer (letztes
     Element, siehe .site-footer margin-top:auto weiter unten) füllt den
     verbleibenden Platz nach oben auf, statt mitten auf der Seite zu
     schweben. Der Cookie-Hinweis ist position:fixed und bleibt davon unberührt. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img{ max-width:100%; display:block; }
a{ color: inherit; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0 0 0.4em;
}
p{ margin: 0 0 1em; }
.container{ max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.mono{ font-family:var(--font-mono); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-mono);
  font-weight:700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration:none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor:pointer;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{ background: var(--coral); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover{ background: var(--coral-dark); }
.btn-ghost{ background: transparent; border-color: rgba(255,255,255,0.55); color: var(--white); }
.btn-ghost:hover{ background: rgba(255,255,255,0.12); }
.btn-dark{ background: var(--dusk); color: var(--sand); }
.btn-dark:hover{ background: var(--dusk-2); }

/* ---------- Header / Navigation ---------- */
.site-header{
  background: var(--dusk);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--white);
  font-family:var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
}
.brand .ball{
  width: 30px; height:30px; flex-shrink:0;
}
.brand-logo{
  width:auto; max-width:320px; flex-shrink:0; object-fit:contain;
}
.nav-toggle{
  display:none;
  background:none;
  border:none;
  width: 42px; height: 42px;
  border-radius: 8px;
  cursor:pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:"";
  position:absolute;
  left:9px; right:9px;
  height:2px;
  background: var(--sand);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span{ top:20px; }
.nav-toggle span::before{ top:-7px; }
.nav-toggle span::after{ top:7px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after{ transform: translateY(-7px) rotate(-45deg); }

.nav-links{
  list-style:none;
  display:flex;
  gap: 6px;
  margin:0; padding:0;
}
.nav-links a{
  display:block;
  text-decoration:none;
  color: rgba(255,255,255,0.82);
  font-family:var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover{ background: rgba(255,255,255,0.1); color:var(--white); }
.nav-links a.active{ background: var(--sand); color: var(--dusk); font-weight:700; }

.header-social{
  display:flex;
  align-items:center;
  gap:6px;
  margin-left:10px;
}
.header-social a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px; height:32px;
  border-radius:50%;
  color: rgba(255,255,255,0.82);
  transition: background .15s ease, color .15s ease;
}
.header-social a:hover{ background: rgba(255,255,255,0.12); color: var(--white); }
.header-social svg{ width:21px; height:21px; }

@media (max-width: 860px){
  .nav-toggle{ display:block; }
  .nav-links{
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--dusk-2);
    flex-direction:column;
    gap:0;
    /* Padding NUR im offenen Zustand (siehe .open unten) — sonst bleibt bei
       max-height:0 wegen box-sizing:border-box ein sichtbarer Streifen
       (padding-top+bottom) unterhalb des Headers stehen, auch wenn das Menü
       "zu" ist. */
    padding: 0 16px;
    max-height:0;
    overflow:hidden;
    transition: max-height .25s ease, padding .25s ease;
  }
  .nav-links.open{ max-height: 420px; padding: 8px 16px 18px; }
  .nav-links a{ padding: 12px 10px; border-radius: 8px; }
}

/* ---------- Hero (Wellen-Trenner statt Foto) ---------- */
.hero{
  background: linear-gradient(160deg, var(--dusk) 0%, var(--dusk-2) 100%);
  color: var(--white);
  position: relative;
  padding: 72px 0 0;
  overflow:hidden;
}
.hero .container{
  position:relative;
  z-index:2;
  display:grid;
  gap: 28px;
  max-width: 760px;
  padding-bottom: 110px;
}
.hero .eyebrow{
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color: var(--sand);
}
.hero h1{
  font-size: clamp(42px, 8vw, 78px);
  color: var(--sand);
}
.hero h1 em{ font-style:normal; color: var(--coral); }
.hero p.dek{
  font-size: 19px;
  color: rgba(255,255,255,0.85);
  max-width: 52ch;
}
.hero .facts{
  display:flex;
  flex-wrap:wrap;
  gap: 10px 28px;
  font-family:var(--font-mono);
  font-size: 14px;
  color: var(--sand);
}
.hero .cta-row{ display:flex; flex-wrap:wrap; gap:14px; margin-top:6px; }

.hero .sun{
  position:absolute;
  top: -60px; right: -60px;
  width: 320px; height:320px;
  border-radius:50%;
  background: radial-gradient(circle at 35% 35%, var(--coral) 0%, var(--coral) 40%, transparent 72%);
  opacity:0.55;
  z-index:1;
}
.wave-divider{
  display:block;
  width:100%;
  height: auto;
  margin-bottom:-2px;
}

/* ---------- Sections ---------- */
section{ padding: 72px 0; }
section.tight{ padding: 48px 0; }
.section-head{ max-width: 640px; margin: 0 0 40px; }
.section-head .eyebrow{
  font-family:var(--font-mono);
  font-size:13px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color: var(--coral);
  display:block;
  margin-bottom:10px;
}
.section-head h1, .section-head h2{ font-size: clamp(28px, 4vw, 40px); color: var(--dusk); }
.section-head p{ color: var(--ink-soft); font-size:17px; }

.section-alt{ background: var(--paper-2); }
.section-dark{ background: var(--dusk); color: var(--white); }
.section-dark .section-head h1, .section-dark .section-head h2{ color: var(--sand); }
.section-dark .section-head p{ color: rgba(255,255,255,0.75); }

/* ---------- Schedule / Scoreboard blocks ---------- */
.day-block{ margin-bottom: 40px; }
.day-block:last-child{ margin-bottom:0; }
.day-block h3{
  font-size: 24px;
  color: var(--dusk);
  border-bottom: 3px solid var(--sand-deep);
  display:inline-block;
  padding-bottom:6px;
  margin-bottom: 20px;
}
.programm-kategorie{
  font-family:var(--font-mono);
  text-transform:uppercase;
  letter-spacing:.06em;
  font-size:13px;
  font-weight:700;
  color: var(--coral);
  margin:24px 0 4px;
}
.programm-kategorie:first-of-type{ margin-top:0; }
.match{
  display:grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  align-items:start;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.match:last-child{ border-bottom:none; }
.match .time{
  font-family:var(--font-mono);
  font-weight:700;
  font-size:16px;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.match h4{ font-family:var(--font-body); text-transform:none; font-weight:700; font-size:17px; margin:0 0 4px; }
.match p{ margin:0; color: var(--ink-soft); font-size:15px; }

/* ---------- Cards ---------- */
.card-grid{ display:grid; gap:22px; }
.card-grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px){
  .card-grid.cols-3, .card-grid.cols-2{ grid-template-columns: 1fr; }
}
.card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.card h3{ font-size:19px; color:var(--dusk); text-transform:none; font-family:var(--font-body); font-weight:800; }

/* ---------- Info list (Anmeldung/Kontakt) ---------- */
.info-list{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.info-list li{ display:grid; grid-template-columns: 150px 1fr; gap:14px; font-size:15.5px; }
.info-list .k{ font-family:var(--font-mono); font-size:12.5px; text-transform:uppercase; letter-spacing:.05em; color: var(--ink-soft); padding-top:2px; }
@media (max-width:600px){ .info-list li{ grid-template-columns:1fr; gap:4px; } }

.status-badge{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:12.5px; text-transform:uppercase; letter-spacing:.05em;
  padding: 8px 16px; border-radius:999px; font-weight:700;
}
.status-open{ background:var(--ok-bg); color:var(--ok-text); }
.status-closed{ background:var(--error-bg); color:var(--error-text); }
.status-badge .dot{ width:8px; height:8px; border-radius:50%; background:currentColor; }

/* ---------- Gallery ---------- */
.gallery-year{ margin-bottom: 44px; }
.gallery-year h3{ color: var(--dusk); font-size:22px; margin-bottom:16px; }
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.gallery-grid img{
  width:100%; height:150px; object-fit:cover;
  border-radius:10px;
  box-shadow: var(--shadow-sm);
  display:block;
}
.gallery-thumb-btn{
  padding:0; border:none; background:none; cursor:zoom-in;
  border-radius:10px;
  transition: transform .15s ease;
}
.gallery-thumb-btn:hover, .gallery-thumb-btn:focus-visible{ transform: scale(1.03); }
.gallery-thumb-btn:focus-visible{ outline:2px solid var(--coral); outline-offset:2px; }

/* ---------- Lightbox (Bildergalerie) ---------- */
/* display:none als Grundzustand, NICHT nur das hidden-Attribut: ein
   Attribut-Selektor konkurriert mit Autoren-CSS und verliert dagegen
   unabhängig von der Spezifität (Browser-Vorgabe hat immer die niedrigste
   Priorität) — ohne diese Regel bliebe die Lightbox trotz hidden-Attribut
   dauerhaft sichtbar. Sichtbar wird sie nur über die zusätzliche Klasse
   .is-open, die per JS gesetzt wird (siehe bilder.php). */
.lightbox{
  position:fixed; inset:0; z-index:1000;
  background: rgba(11,20,26,0.92);
  align-items:center; justify-content:center;
  padding: 40px;
  display:none;
}
.lightbox.is-open{ display:flex; }
.lightbox-img{ max-width:100%; max-height:100%; border-radius:8px; box-shadow: var(--shadow-md); }
.lightbox-close, .lightbox-nav{
  position:absolute;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border:none;
  border-radius:50%;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  transition: background .15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover{ background: rgba(255,255,255,0.24); }
.lightbox-close{ top:20px; right:20px; width:44px; height:44px; }
.lightbox-nav{ top:50%; transform: translateY(-50%); width:52px; height:52px; font-size:28px; }
.lightbox-prev{ left:16px; }
.lightbox-next{ right:16px; }
@media (max-width:640px){
  .lightbox{ padding:16px; }
  .lightbox-nav{ width:42px; height:42px; }
  .lightbox-close{ width:38px; height:38px; top:10px; right:10px; }
}
.gallery-empty{
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--ink-soft);
  font-size:14.5px;
}
.gallery-empty code{ background: var(--paper-2); padding:2px 6px; border-radius:4px; }

/* ---------- Form ---------- */
/* min-width:0 auf Grid und Grid-Item verhindert, dass ein breites Kind
   (z.B. ein <select> mit langem Options-Text) die Spalte über die Breite
   der Karte hinaus aufzieht ("Grid-Blowout") — width:100% auf den Feldern
   sorgt dafür, dass sie trotzdem die volle verfügbare Breite ausfüllen. */
.form-grid{ display:grid; gap:18px; max-width:560px; min-width:0; }
.field{ display:grid; gap:6px; min-width:0; }
.field input, .field textarea, .field select{ width:100%; min-width:0; }
.field label{ font-family:var(--font-mono); font-size:12.5px; text-transform:uppercase; letter-spacing:.05em; color: var(--ink-soft); }
.field input, .field textarea{
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus{
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(226,96,58,0.15);
}
.field select{
  font: inherit;
  font-weight: 600;
  padding: 12px 44px 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%23E2603A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select:hover{ border-color: var(--sand-deep); }
.field select:focus{
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(226,96,58,0.15);
}
.field select option{ font-weight: 500; color: var(--ink); }
.form-note{ font-size:13.5px; color: var(--ink-soft); }

/* ---------- Info-Tooltip (z.B. Hinweistext neben einem Feld-Label) ---------- */
.info-tooltip{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:15px; height:15px;
  margin-left:4px;
  border-radius:50%;
  background: var(--sand);
  color: var(--dusk);
  font-family:var(--font-body);
  font-size:10px;
  font-weight:700;
  text-transform:none;
  letter-spacing:normal;
  cursor:help;
  vertical-align:middle;
}
.info-tooltip-text{
  /* Zentriert unter dem Icon (statt vorher links am Icon ausgerichtet mit
     fester Breite nach rechts) und per max-width auf die Bildschirmbreite
     begrenzt — sonst konnte die Box (obwohl unsichtbar) über den rechten
     Bildschirmrand hinausragen und liess sich auf Mobilgeräten als
     zusätzlicher, leerer Bereich heraus-zoomen/-scrollen. */
  position:absolute;
  left:50%; bottom: calc(100% + 8px);
  width:260px;
  max-width: calc(100vw - 32px);
  background: var(--dusk);
  color: var(--white);
  font-size:12.5px;
  font-weight:400;
  line-height:1.5;
  padding:10px 12px;
  border-radius:8px;
  box-shadow: var(--shadow-md);
  opacity:0;
  visibility:hidden;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index:20;
}
.info-tooltip:hover .info-tooltip-text,
.info-tooltip:focus .info-tooltip-text,
.info-tooltip:focus-visible .info-tooltip-text{
  opacity:1;
  visibility:visible;
  transform: translate(-50%, 0);
}

/* ---------- Adress-Autocomplete (Anmeldung) ---------- */
.adresse-suche-wrap{ position:relative; }
.adresse-vorschlaege{
  position:absolute;
  left:0; right:0; top:calc(100% + 4px);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
}
.adresse-vorschlag{
  display:block;
  width:100%;
  text-align:left;
  padding:10px 14px;
  border:0;
  border-bottom:1px solid var(--line);
  background:transparent;
  font: inherit;
  font-size:14px;
  color: var(--ink);
  cursor:pointer;
}
.adresse-vorschlag:last-child{ border-bottom:0; }
.adresse-vorschlag:hover, .adresse-vorschlag:focus{ background: var(--paper-2); }

/* ---------- Map / Anfahrt ---------- */
.map-frame{ border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-md); border:1px solid var(--line); }
.map-frame iframe{ display:block; width:100%; height: 380px; border:0; }

/* ---------- Durchführungsort-Vorschau (Anfahrt) ---------- */
.venue-preview{
  display:inline-flex;
  align-items:center;
  gap:14px;
  margin-top:8px;
  padding:12px 18px 12px 12px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  text-decoration:none;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.venue-preview:hover{
  border-color: var(--coral);
  box-shadow: 0 4px 14px rgba(226,96,58,0.12);
  transform: translateY(-1px);
}
.venue-preview-icon{
  display:flex; align-items:center; justify-content:center;
  width:44px; height:44px;
  border-radius: 10px;
  background: var(--sand);
  font-size:22px;
  flex-shrink:0;
}
.venue-preview-icon-img{ background: #fff; padding:4px; }
.venue-preview-icon-img img{ width:100%; height:100%; object-fit:contain; }
.venue-preview-info{ display:flex; flex-direction:column; gap:2px; }
.venue-preview-title{ font-weight:600; }
.venue-preview-domain{ font-size:13px; color: var(--ink-soft); }

/* ---------- Sponsors ---------- */
.sponsors{
  display:flex; flex-wrap:wrap; align-items:center; gap: 40px;
  justify-content:center;
}
.sponsors img{ max-height: var(--sponsor-logo-groesse, 54px); width:auto; opacity:.9; object-fit:contain; transition: opacity .15s ease; }
.sponsors a:hover img{ opacity:1; }

/* ---------- Footer ---------- */
.site-footer{
  background: var(--dusk);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 26px;
  font-size: 14px;
  margin-top: auto;
}
.site-footer .container{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 22px;
}
.site-footer a{ text-decoration:none; color: var(--sand); }
.site-footer .top{
  border-top:none;
  padding-top:0;
  padding-bottom: 22px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px;
}

/* ---------- Utilities ---------- */
.text-center{ text-align:center; }
.mt-0{ margin-top:0; }
.stack{ display:grid; gap:10px; }

/* ---------- Cookie-Hinweis ---------- */
.cookie-notice{
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  max-width: 640px;
  margin: 0 auto;
  flex-wrap:wrap;
  align-items:center;
  gap: 14px;
  background: var(--dusk);
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 20px;
  font-size: 13.5px;
}
/* .is-visible wird per JS gesetzt/entfernt (siehe cookie-notice.js) — bewusst
   NICHT über das hidden-Attribut allein, das hatte sich als zu fragil
   gegenüber anderen display-Deklarationen in derselben Regel erwiesen. */
.cookie-notice.is-visible{ display:flex; }
.cookie-notice p{ margin:0; flex: 1 1 260px; }
.cookie-notice a{ color: var(--sand); }
.cookie-notice-dismiss{
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: var(--coral);
  color: var(--white);
  cursor: pointer;
}
.cookie-notice-dismiss:hover{ background: var(--coral-dark); }
