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

html {
  scroll-behavior: smooth;
}

:root {
  --main-nav-height: 52px;
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.82;
  background: #ffffff;
  color: #1a1a1a;
}

/* ── PAGE ─────────────────────────────────────────────────────────────────── */

.page {
  margin-left: 0;
  min-height: 100vh;
}

/* ── HERO ────────────────────────────────────────────────────────────────── */

.hero {
  height: calc(100vh - var(--main-nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  background: #f6f7f9;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: url('../fotos/2024-09-21/022-large.jpg');
  background-size: cover;
  background-position: center;
  opacity: .6;
  z-index: 0;
}

.hero > :not(.hero-backdrop) {
  position: relative;
  z-index: 1;
}

.hero-logo {
  display: block;
  width: auto;
  height: 60vh;
  max-width: 90%;
  flex-shrink: 1;
  min-height: 0;
  opacity: 1;
  animation: logo-enter .8s cubic-bezier(.2,0,.2,1) both;
}

@keyframes logo-enter {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-section-title {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #000;
  text-align: center;
  text-shadow: 0 0 12px #fff, 0 0 24px #fff, 0 0 40px rgba(255,255,255,.8);
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(0,0,0,.2);
  text-decoration: none;
  animation: fadeup 2.5s ease-in-out infinite;
  transition: color .2s;
}

.hero-scroll:hover { color: rgba(0,0,0,.5); }

.hero-scroll svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  display: block;
}

@keyframes fadeup {
  0%, 100% { opacity: .35; transform: translateX(-50%) translateY(0); }
  50%       { opacity: .8;  transform: translateX(-50%) translateY(5px); }
}

/* ── MAIN NAV ─────────────────────────────────────────────────────────────── */

.main-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 80;
  margin-top: calc(-1 * var(--main-nav-height));
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-top: 1px solid #deebe7;
  border-bottom: 1px solid #deebe7;
}

.main-nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.main-nav-item {
  color: #2e5b4f;
  text-decoration: none;
  border: 0 !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .7rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background .16s ease, color .16s ease;
}

.main-nav-item:hover {
  background: #edf6f3;
  color: #004643;
}

/* ── SECTIONS ────────────────────────────────────────────────────────────── */

.sections {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 30px 90px;
}

section {
  margin-top: 42px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-top: 0;
  scroll-margin-top: 30px;
}

.section-header {
  background: transparent;
  padding: 22px 0 12px;
  border-bottom: 0;
}

.section-header h1 {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #1f6a53;
  text-align: center;
}

.section-content {
  padding: 0 0 6px;
  text-align: left;
}

/* Keep prose blocks centered as a column, while card/gallery grids can stay wide */
.section-content > :not(.event-list):not(.gallery):not(.gallery-event-header) {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────── */

.section-content p {
  margin: 0 0 1em;
  color: #2a2a2a;
}

.section-content h2 {
  font-size: .98rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7a8a89;
  border-bottom: 0;
  padding-bottom: .4em;
  margin: 2em 0 .8em;
}

.section-content a {
  color: #1b6d53;
  text-decoration: none;
  border-bottom: 1px solid rgba(14,79,130,.25);
  transition: border-color .15s, color .15s;
}

.section-content a:hover { color: #004643; border-color: #004643; }

.section-content hr {
  border: none;
  border-top: 1px solid #eeebe4;
  margin: 2em 0;
}

/* date labels from _DD.MM.YYYY_ */
.section-content em {
  font-style: normal;
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #b0b8b7;
  display: block;
  margin-bottom: .1em;
}

.section-content strong {
  font-weight: 400;
  color: #004643;
}

/* ── ANLÄSSE CARDS ─────────────────────────────────────────────────────────── */

.event-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.event-card {
  border: 1px solid #deebe7;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  scroll-margin-top: 20px;
  height: 100%;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.event-link {
  color: inherit;
  text-decoration: none;
  border: 0 !important;
  display: grid;
  grid-template-rows: auto 190px;
  height: 100%;
}

.event-media {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #edf6f3;
  overflow: hidden;
}

/* multi-image: main left (2/3) + side stack right (1/3) */
.event-media--multi {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2px;
}

.event-media-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.event-image--main {
  height: 100%;
}

.event-image--side {
  flex: 1;
  min-height: 0;
}

.event-image--placeholder {
  background: radial-gradient(circle at 30% 30%, #d7efe7, #bde0d3 60%, #9bcbb8 100%);
}

.event-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.event-date {
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #5f7d75;
  margin-bottom: 2px;
}

.event-title {
  font-size: 1.36rem;
  line-height: 1.3;
  color: #004643;
  margin: 0 0 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.event-teaser {
  position: relative;
  margin: 0;
  color: #3f5750;
  font-size: .86rem;
  line-height: 1.45;
  max-width: 34ch;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 68%, transparent 100%);
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 70, 67, .14);
  border-color: #c7dfd6;
}

.event-card:hover .event-image--main,
.event-card:hover .event-media:not(.event-media--multi) .event-image {
  transform: scale(1.04);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */

footer {
  color: rgba(0,0,0,.2);
  font-size: .68rem;
  letter-spacing: .08em;
  padding: 32px 24px 24px;
  text-align: center;
}

/* ── GALLERY (fotos-*.html) ──────────────────────────────────────────────── */

.gallery-page body { background: #f2f0eb; }

.gallery-page .page { margin-left: 0; }

.gallery-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 48px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8e5df;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.back-link {
  color: rgba(0,0,0,.4);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.back-link:hover { color: #1a1a1a; background: rgba(0,0,0,.05); }

.gallery-page .sections {
  max-width: 860px;
  padding: 24px 16px 80px;
  margin: 0 auto;
}

.gallery-page section { margin-top: 0; }

.gallery-event-header {
  margin-bottom: 20px;
}

.gallery-event-date {
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #5f7d75;
  margin-bottom: 2px;
}

.gallery-event-title {
  font-size: 2.1rem;
  color: #004643;
  line-height: 1.3;
  margin: 0 0 10px;
  text-align: center;
}

.gallery-event-description p {
  margin-bottom: .85em;
}

input[name="lb"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.gallery {
  columns: 3;
  column-gap: 8px;
  padding: 4px 0;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 8px;
  display: block;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 3px;
  transition: opacity .15s;
}

.gallery-item:hover img { opacity: .8; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

input[name="lb"]:checked + .lightbox { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 3px;
  margin: 0;
  cursor: default;
  pointer-events: none;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  color: rgba(249,188,96,.7);
  cursor: pointer;
  line-height: 1;
  z-index: 201;
  user-select: none;
  transition: color .15s;
}

.lb-close { top: 20px; right: 24px; font-size: 1.6rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2.8rem; padding: 0 16px; }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }

/* ── MOBILE ──────────────────────────────────────────────────────────────── */

@media (max-width: 680px) {
  :root {
    --main-nav-height: 48px;
  }

  .hero { height: calc(100svh - var(--main-nav-height)); }
  .hero-logo { height: 56svh; }

  .main-nav {
    padding: 9px 10px;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 4px;
  }

  .main-nav-item {
    white-space: nowrap;
    padding: 7px 9px;
    font-size: .64rem;
  }

  .sections { padding: 0 12px 60px; }
  section { margin-top: 34px; }
  .section-content { padding: 0; }

  .event-card {
    padding: 0;
  }

  .event-link {
    grid-template-rows: auto 190px;
  }

  .event-media {
    min-height: 0;
  }

  .gallery { columns: 2; }
}

@media (max-width: 1100px) {
  .event-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .event-list {
    grid-template-columns: 1fr;
  }
}
