/* Posiles Group – gemeinsames Stylesheet für alle Seiten */
:root {
  --ink: #221a26;
  --paper: #f3f4f1;
  --paper-2: #e8eae5;
  --wine: #6b1e3a;
  --wine-dark: #4d1429;
  --sea: #1f5b63;
  --muted: #5d5864;
  --line: #cfd2cb;
  --radius: 4px;
  --maxw: 1100px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--wine); text-underline-offset: 3px; }
a:hover { color: var(--wine-dark); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }

.wrap { width: min(var(--maxw), 100% - 2.5rem); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .6em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 62ch; }

/* ---------- Kopfzeile ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; font-weight: 600; font-size: .98rem; }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { border-color: var(--wine); color: var(--wine); }

/* ---------- Startseiten-Hero ---------- */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 4rem); }
.hero h1 {
  font-size: clamp(3.4rem, 15vw, 10.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: .9;
  margin: 0 0 .25em -0.04em;
  color: var(--wine);
}
.hero p { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--muted); margin: 0; max-width: 40ch; }

/* ---------- Seitenkopf (Unterseiten) ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 .3em; color: var(--wine); }
.page-head p { color: var(--muted); font-size: 1.15rem; margin: 0; }

/* ---------- Bereiche als Zeilen ---------- */
.areas { border-top: 1px solid var(--ink); }
.area {
  display: grid;
  grid-template-columns: minmax(150px, 280px) 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.area-media { aspect-ratio: 4 / 3; background: var(--paper-2); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.area-media img { width: 100%; height: 100%; object-fit: cover; }
.area-media.logo img { object-fit: contain; padding: 1.25rem; }
.area-media.text { background: var(--wine); color: var(--paper); padding: 1rem; text-align: left; place-items: end start; }
.area-media.text span { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.area h2 { margin-bottom: .25em; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.area p { margin: 0; color: var(--muted); }
.area p + p { margin-top: .4rem; }
.area-body .note { font-size: .95rem; }

.btn {
  display: inline-block;
  background: var(--wine);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: .7rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid var(--wine);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--wine-dark); border-color: var(--wine-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--wine); }
.btn.ghost:hover { background: var(--wine); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }

/* ---------- Termine ---------- */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.event { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.event time { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.event-title { font-weight: 600; }
.event-meta { color: var(--muted); font-size: .98rem; }
.event a { font-weight: 600; white-space: nowrap; }
.empty { color: var(--muted); padding: 1rem 0; }

/* ---------- Formular ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); }
.contact address { font-style: normal; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .98rem; }
input, select, textarea {
  font: inherit;
  padding: .65rem .75rem;
  border: 1px solid #9ea39a;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
textarea { min-height: 7rem; resize: vertical; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.consent input { width: auto; margin-top: .25rem; }
.hp { position: absolute; left: -9999px; }
.msg { padding: .9rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 600; }
.msg.ok { background: #dcebe3; color: #17432d; }
.msg.err { background: #f4dcdc; color: #5c1a1a; }

/* ---------- Galerie / Karte ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--paper-2); }
.map { border: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--paper-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.facts li { border-top: 2px solid var(--wine); padding-top: .6rem; }
.facts strong { display: block; font-family: var(--font-display); font-size: 1.15rem; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--ink); color: #d9d6dd; margin-top: 3rem; padding: 2.5rem 0; font-size: .98rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 2rem 4rem; justify-content: space-between; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .3rem; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .area { grid-template-columns: 1fr; }
  .area-media { aspect-ratio: 16 / 9; }
  .event { grid-template-columns: 1fr; gap: .15rem; }
  .contact { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Slideshow ---------- */
.slideshow { position: relative; background: var(--ink); overflow: hidden; }
.slides { position: relative; aspect-ratio: 21 / 8; max-height: 70vh; min-height: 220px; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem clamp(1rem, 4vw, 3rem) 2.4rem; background: linear-gradient(transparent, rgba(34, 26, 38, .78)); }
.slide figcaption a { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 3vw, 2rem); text-decoration: none; }
.slide figcaption a:hover { text-decoration: underline; text-underline-offset: 5px; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.slide-btn:hover { background: #fff; }
.slide-btn.prev { left: .75rem; }
.slide-btn.next { right: .75rem; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: .8rem; display: flex; justify-content: center; gap: .5rem; }
.slide-dots button { width: .7rem; height: .7rem; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.slide-dots button[aria-current="true"] { background: #fff; }
@media (max-width: 760px) { .slides { aspect-ratio: 4 / 3; } .slide-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }

.areas-section { padding-top: clamp(1.5rem, 4vw, 3rem); }

/* ---------- Menü-Knopf auf Handy und Tablet ---------- */
.nav-toggle { display: none; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font: 600 1rem var(--font-body); cursor: pointer; }
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after { display: block; width: 1.15rem; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }
.nav-open .nav-toggle-icon { background: transparent; }
.nav-open .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 960px) {
  .site-header .wrap { flex-wrap: wrap; gap: .5rem 1rem; padding-block: .55rem; }
  .brand { font-size: 1.08rem; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-header .nav { display: none; }
  .site-header .nav { flex-basis: 100%; flex-direction: column; gap: 0; padding: .25rem 0 .5rem; }
  .js .site-header.nav-open .nav { display: flex; }
  .site-header .nav a { padding: .8rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-header .nav a:last-child { border-bottom: 0; }
  .site-header .nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--wine); padding-left: .75rem; }
  .area { grid-template-columns: minmax(150px, 240px) 1fr; }
  .area > .btn { grid-column: 2; justify-self: start; }
  .area .area-links a { padding: .5rem .9rem; }
  .section-head a { display: inline-block; padding: .6rem 0; }
  .event a { display: inline-block; padding: .6rem 0; }
}

/* ---------- Bedienung auf Touch-Geräten ---------- */
input, select, textarea { font-size: max(1rem, 16px); }   /* unter 16px zoomt das iPhone beim Antippen */
.slide-dots button { position: relative; }
.slide-dots button::after { content: ""; position: absolute; inset: -.6rem; }
.slide-dots { gap: .9rem; }
@media (max-width: 760px) {
  .area { grid-template-columns: 1fr; }
  .area > .btn { grid-column: auto; }
  .event a { display: inline-block; padding: .6rem 0; }
  .btn { min-height: 2.75rem; }
  .btn-row .btn { flex: 1 1 auto; text-align: center; }
  .site-footer .wrap { gap: 1.25rem; flex-direction: column; }
  .site-footer a { display: inline-block; padding: .45rem 0; }
  .area .area-links a { padding: .5rem .9rem; }
  .section-head a { display: inline-block; padding: .6rem 0; }
}

/* ---------- Headerbild auf Unterseiten ---------- */
.page-banner { background: var(--ink); }
.page-banner img { display: block; width: 100%; aspect-ratio: 21 / 8; max-height: 70vh; min-height: 220px; object-fit: cover; }
@media (max-width: 760px) { .page-banner img { aspect-ratio: 4 / 3; } }

/* ---------- Punsch-Abschnitt (Zua Oidn Hex) ---------- */
.punsch { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.punsch-poster img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 2px 14px rgba(34, 26, 38, .18); }
.punsch .event { grid-template-columns: 7.5rem 1fr; padding: .7rem 0; }
@media (max-width: 760px) { .punsch { grid-template-columns: 1fr; } }
.msg ul { margin: 0; padding-left: 1.2rem; font-weight: 400; }

/* ---- Veranstaltungsseiten ---- */
.page-text { margin-top: 1.5rem; }
.page-text h3 { margin-top: 1.4rem; }
.page-text p, .page-text ul { max-width: 68ch; }
.text-list { margin: 0 0 1em; padding-left: 1.2rem; }
.partners { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; }
.partners li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.2rem; display: flex; align-items: center; justify-content: center; min-width: 9rem; height: 6.5rem; }
.partners a { display: flex; align-items: center; justify-content: center; height: 100%; }
.partners img { max-height: 4.6rem; max-width: 11rem; width: auto; height: auto; object-fit: contain; }
.res-form { max-width: 40rem; }
.res-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.res-form .note { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 560px) { .res-form .two { grid-template-columns: 1fr; } }
.subpages { margin-top: 2rem; }
.subpages h3 { font-size: 1rem; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }
.subpages ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.subpages a { font-size: .98rem; }

/* Links zu den Veranstaltungsseiten in der Startseiten-Kachel */
.area-links { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; }
.area-links a { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--wine); border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.area-links a:hover { background: var(--wine); color: #fff; }
.subpages.top { margin: 1.5rem 0 1.75rem; }

/* Zua Oidn Hex: Galerie, Willkommen, Karte nach Klick, Vollbild */
.hex-welcome { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; margin: 0 0 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); background: #fff; border-radius: var(--radius); border-top: 3px solid var(--wine); }
.hex-welcome.no-photos { grid-template-columns: 1fr; }
.hex-welcome h2 { color: var(--wine); }
.hex-welcome-text p:last-child { margin-bottom: 0; }
.hex-team { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hex-team figure { margin: 0; text-align: center; }
.hex-team img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.hex-team figcaption { margin-top: .4rem; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.map-consent { aspect-ratio: 16 / 9; background: var(--paper-2); border-radius: var(--radius); display: grid; place-items: center; text-align: center; padding: 1rem; }
.map-consent-box { display: grid; gap: .6rem; justify-items: center; max-width: 30rem; }
.map-consent-box p { margin: 0; color: var(--muted); font-size: .95rem; }
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(20, 15, 22, .95); }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgba(20, 15, 22, .95); }
dialog.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #d9d6dd; margin: 0; max-width: none; }
@media (max-width: 760px) {
  .hex-welcome { grid-template-columns: 1fr; }
  dialog.lightbox .slide-btn { display: block; top: auto; bottom: 1rem; transform: none; }
}

/* Bildergalerie als Slider mit Vorschaubildern */
.gslider { margin: 0 0 2.5rem; }
.gslider-main { position: relative; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.gslider-stage { position: relative; aspect-ratio: 16 / 9; max-height: 70vh; width: 100%; }
.gslider-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; pointer-events: none; cursor: zoom-in; }
.gslider-slide.is-active { opacity: 1; pointer-events: auto; }
.gslider-slide img { width: 100%; height: 100%; object-fit: contain; }
.gslider-main .slide-btn { z-index: 2; }
.gslider-count { position: absolute; right: .75rem; bottom: .6rem; z-index: 2; padding: .15rem .6rem; border-radius: 999px; background: rgba(34, 26, 38, .7); color: #fff; font-size: .9rem; font-variant-numeric: tabular-nums; }
.gslider-thumbs { display: flex; gap: .5rem; margin-top: .5rem; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth; padding-bottom: .4rem; scrollbar-width: thin; }
.gslider-thumbs button { flex: 0 0 auto; width: 7.5rem; aspect-ratio: 4 / 3; padding: 0; border: 3px solid transparent; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); cursor: pointer; scroll-snap-align: start; opacity: .7; transition: opacity .2s, border-color .2s; }
.gslider-thumbs button:hover { opacity: 1; }
.gslider-thumbs button[aria-current="true"] { border-color: var(--wine); opacity: 1; }
.gslider-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
  .gslider-stage { aspect-ratio: 4 / 3; }
  .gslider-main .slide-btn { display: block; width: 2.75rem; height: 2.75rem; font-size: 1.6rem; }
  .gslider-thumbs button { width: 5.5rem; }
}
@media (prefers-reduced-motion: reduce) { .gslider-slide, .gslider-thumbs { transition: none; scroll-behavior: auto; } }