:root{
  --bg:#0f1411;
  --panel:#141c17;
  --text:#f2f2ea;
  --muted:#c8c8bd;
  --accent:#c6a15b;
  --line:rgba(255,255,255,.08);
}

*{box-sizing:border-box}
html, body{height:100%}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:linear-gradient(180deg, #0b0f0c, var(--bg));
}

a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

/* =========================
   Accessibility: sichtbarer Fokus (Tastatur)
   ========================= */
/* Hinweis: Wir nutzen :focus-visible, damit Klicks mit der Maus nicht "blinken". */
:where(a, button, input, textarea):focus-visible{
  outline:2px solid rgba(198,161,91,.9);
  outline-offset:3px;
  border-radius:12px;
}

.wrap{max-width:1100px; margin:0 auto; padding:0 16px}

/* FIXED HEADER */
.header{
  position:fixed;
  top:0; left:0;
  width:100%;
  z-index:1000;
}

/* Topbar */
.topbar{
  background:#0f1411;
  border-bottom:1px solid var(--line);
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  flex-wrap:wrap;
}

.brand{
  font-weight:800;
  letter-spacing:.5px;
}

/* NAV */
.nav{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:center;
}

.nav a{
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text);
  transition: background .18s ease, transform .18s ease;
}

.nav a.is-active,
.nav a:hover{
  background:rgba(255,255,255,.08);
}

/* =========================
   Desktop-Navigation: "eigene Ansicht" auf PC
   ========================= */
@media (min-width: 861px){
  /* Auf Desktop möchten wir keinen Umbruch in der Topbar, damit alles "wie aus einem Guss" wirkt. */
  .topbar__inner{flex-wrap:nowrap}

  /* Links wirken auf großen Screens mit etwas mehr Luft besser lesbar. */
  .nav{gap:10px}

  /* Aktiver Link bekommt zusätzlich eine feine Kontur, damit man es sofort sieht. */
  .nav a.is-active{
    border:1px solid rgba(198,161,91,.35);
  }
}

/* Hamburger button */
.burger{
  display:none;
  align-items:center;
  justify-content:center;
  width:44px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  transition: transform .12s ease, background .18s ease;
}
.burger:hover{background:rgba(255,255,255,.06)}
.burger:active{transform: translateY(1px);}

.burgerLines{
  width:18px;
  height:12px;
  position:relative;
}
.burgerLines span{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:var(--text);
  border-radius:2px;
  opacity:.9;
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.burgerLines span:nth-child(1){top:0}
.burgerLines span:nth-child(2){top:5px}
.burgerLines span:nth-child(3){top:10px}

/* burger open state */
.burger.is-open .burgerLines span:nth-child(1){top:5px; transform:rotate(45deg)}
.burger.is-open .burgerLines span:nth-child(2){opacity:0}
.burger.is-open .burgerLines span:nth-child(3){top:5px; transform:rotate(-45deg)}

/* NEWS TICKER */
.newsTicker{
  background:var(--accent);
  color:#000;
  overflow:hidden;
  white-space:nowrap;
}
.newsTicker__inner{
  display:inline-block;
  padding:8px 0;
  animation: ticker 22s linear infinite;
}
@keyframes ticker{
  0% { transform:translateX(100%); }
  100% { transform:translateX(-100%); }
}

/* MAIN OFFSET */
.mainContent{
  padding-top:140px;
  padding-bottom:80px;
}

/* HERO */
.hero{
  position:relative;
  min-height:320px;
  border-bottom:1px solid var(--line);
}
.hero__bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  opacity:.5;
}
.hero__content{
  position:relative;
  padding:60px 0 40px;
}
.hero h1{
  margin:0 0 10px;
  font-size: clamp(28px, 3vw, 44px);
}
.muted{color:var(--muted)}

.hero__cta{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(198,161,91,.2);
  border:1px solid rgba(198,161,91,.4);
  color:var(--text);
  text-decoration:none;
  transition: transform .12s ease, background .18s ease;
}
.btn:hover{background:rgba(198,161,91,.28)}
.btn:active{transform: translateY(1px)}

/* GRID */
.grid{
  display:grid;
  gap:16px;
  padding:20px 0 40px;
  grid-template-columns: 1fr 1fr;
}

.card{
  background:rgba(20,28,23,.95);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
}
.card--wide{grid-column:1 / -1}
.card h2{margin:0 0 10px; font-size:18px}

/* NEWS */
.newsItem{padding:10px 0; border-top:1px solid var(--line)}
.newsItem:first-child{border-top:none}
.newsDate{color:var(--muted); font-size:12px}
.newsTitle{font-weight:700; margin-top:2px}
.newsText{color:var(--muted); margin-top:4px}

/* MAP */
.mapFrame{
  width:100%;
  height:360px;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,.03);
}
.mapFrame iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/* FORM */
.formRow{display:grid; gap:10px; margin-top:10px}
label{font-size:14px; color:var(--muted)}
input, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
textarea{min-height:140px; resize:vertical}
input:focus, textarea:focus{border-color: rgba(198,161,91,.6);}

.formActions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.formNote{color:var(--muted); font-size:13px}

.alert{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.03);
}
.alert--ok{border-color: rgba(120, 255, 170, .25);}
.alert--bad{border-color: rgba(255, 120, 120, .25);}

/* FOOTER FIXED */
.footer{
  position:fixed;
  bottom:0; left:0;
  width:100%;
  background:#0f1411;
  border-top:1px solid var(--line);
  padding:14px 0;
  text-align:center;
  color:var(--muted);
}

/* MOBILE NAV */
@media (max-width: 860px){
  .burger{display:flex}

  /* Mobile: Brand + Burger bleiben in einer Zeile, das Menü klappt als Panel darunter aus. */
  .topbar__inner{
    position:relative; /* wichtig für das absolute Menü-Panel */
    flex-wrap:nowrap;  /* verhindert, dass Brand/Burger umbrechen */
  }

  .brand{
    max-width: calc(100% - 60px); /* Platz für den Burger */
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .nav{
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:6px;

    /* Mobile Panel: liegt über dem Content, statt die Header-Höhe zu verändern */
    position:absolute;
    left:0;
    right:0;
    top: calc(100% + 10px);

    max-height:0;
    opacity:0;
    overflow:hidden;

    margin-top:0; /* Panel hat bereits Abstand über top */
    padding:0 10px;
    border-radius:16px;
    border:1px solid transparent;
    background:rgba(20,28,23,.96);

    /* leichter Schatten, damit es sich klar vom Hintergrund absetzt */
    box-shadow: 0 14px 30px rgba(0,0,0,.35);

    transition: max-height .28s ease, opacity .22s ease, padding .22s ease, border-color .22s ease;
  }

  .nav.is-open{
    max-height:420px;
    opacity:1;
    padding:10px;
    border-color:var(--line);
  }
}

@media (max-width: 760px){
  .grid{grid-template-columns:1fr}
  .mainContent{padding-top:150px}
}

/* =========================
   Handy-Feinschliff: mehr Platz links/rechts im Header
   ========================= */
/* Änderung: Auf sehr kleinen Displays erhöhen wir die seitliche Padding im Header,
   damit Brand/Burger/Ticker nicht "am Rand kleben". */
@media (max-width: 480px){
  .topbar .wrap,
  .newsTicker .wrap{
    padding:0 20px; /* vorher effektiv 16px – jetzt optisch angenehmer */
  }
}

/* =========================
   CALENDAR GALLERY (auto-fit 360px)
   ========================= */
.galleryGrid{
  display:grid;
  gap:10px;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  margin-top:10px;
}

.galleryCard{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  overflow:hidden;
  background:rgba(255,255,255,.04);
}

.galleryImg{
  width:100%;
  height:220px;
  display:block;
  object-fit:contain;
  background:rgba(0,0,0,.18);
}

/* =========================
   LIGHTBOX
   ========================= */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.78);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:2000;
  padding:18px;
}
.lightbox.is-open{display:flex}

.lightbox__panel{
  width:min(1100px, 100%);
  max-height: calc(100vh - 36px);
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(15,20,17,.92);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.lightbox__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.lightbox__title{
  font-size:14px;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.lightbox__btn{
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.lightbox__btn:active{transform: translateY(1px)}

.lightbox__content{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  overflow:auto;
}

.lightbox__img{
  max-width:100%;
  max-height: calc(100vh - 140px);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  display:block;
}

[data-lightbox]{
  cursor: zoom-in;
}