/* =========================================================
   Schützenfest Eicklingen – style.css (optimiert & kommentiert)
   Änderungen:
   - Hybrid-Header (60vh + max-/min-height) für konsistente Höhe
   - Konsolidierte Bild-Styles (keine Dubletten)
   - Sicheres Bildverhalten (max-width:100%, object-fit dort sinnvoll)
   - Responsivere Container & kleinere Aufräumarbeiten
   - Gut kommentiert für spätere Wartung
   - NEU: Hero-Bild-Position pro Unterseite via Body-Klasse
   ========================================================= */

/* 0) RESET & BASIS -------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Markenfarben & Tokens */
  --brand: #1c6f47;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  --radius: 15px;
  --gap: 1rem;

  /* Header-Höhen (Hybrid-Variante) */
  --hero-max: 560px; /* maximale Header-Höhe auf großen Screens */
  --hero-min: 300px; /* minimale Header-Höhe auf kleinen Screens */
  --hero-pos: 50% 50%; /* Standard-Ausschnitt: Mitte */
}

/* Hero-Positionen pro Unterseite */
.page-index {
  --hero-pos: 50% 20%;
} /* Startseite → höherer Ausschnitt */
.page-aktuelles {
  --hero-pos: 50% 43%;
} /* Aktuelles → tieferer Ausschnitt */
.page-festprogramm {
  --hero-pos: 50% 40%;
}
.page-galerie {
  --hero-pos: 50% 60%;
}
.page-geschichte {
  --hero-pos: 50% 80%;
}
.page-anmeldung {
  --hero-pos: 50% 30%;
}
.page-strecke {
  --hero-pos: 50% 30%;
}

/* 1) HEADER & LOGO ------------------------------------------------------- */
.logo300 {
  display: none;
}

.site-header {
  width: 100%;
  height: auto;
}

.container {
  /* Außenabstände des Kopfbereichs */
  margin-left: 70px;
  margin-right: 70px;
  padding-left: 80px;
  padding-right: 80px;
}

.logo-wrapper {
  max-width: 100%;
  padding-top: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.image-wappen {
  width: 140px;
}

.logo-span-wrapper {
  display: flex;
  justify-content: center;
}
.logo-span {
  width: 75%;
  height: 1px;
  position: absolute;
  background-color: var(--brand);
}
.span-header {
  width: 100%;
  height: 30px;
  position: absolute;
  background-color: var(--brand);
  box-shadow: var(--shadow);
}

/* =========================
   Datum-Box (links unten, responsive, Glas-Look)
   ========================= */

/* Responsive Variablen (kannst du je nach Seite/Design feinjustieren) */
:root {
  --date-left: clamp(12px, 5vw, 24px);
  --date-bottom: clamp(10px, 3vw, 24px);
  --date-w: clamp(220px, 60vw, 520px);
  --date-h: clamp(48px, 10vw, 96px);
}

/* Hintergrund-Panel (Glas) */
.datum-video-background {
  position: absolute;
  left: var(--date-left);
  bottom: var(--date-bottom);
  width: var(--date-w);
  height: var(--date-h);
  border-radius: 12px;

  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);

  z-index: 1;
}

/* Text-Layer exakt deckungsgleich – Text mittig */
.datum-video {
  position: absolute;
  left: var(--date-left);
  bottom: var(--date-bottom);
  width: var(--date-w);
  height: var(--date-h);

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  text-align: center;

  z-index: 2;

  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 4.2vw, 2.4rem);
  line-height: 1;
  color: #1c6f47; /* auf hellem Foto → dunkelgrün; bei hellem Text nutze .dark Preset unten */
}

/* Absatz-Defaultmargin neutralisieren */
.datum-video p {
  margin: 0;
}

/* Sehr schmale Geräte: Box fast volle Breite */
@media (max-width: 420px) {
  :root {
    --date-left: 12px;
    --date-w: calc(100vw - 24px);
  }
}

/* optionale Presets für Bild-Helligkeit */
.datum-video-background.dark {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
}
.datum-video.dark {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* 2) HYBRID-HEADERBILD (Video-Wrapper) ----------------------------------- */
.video-wrapper {
  width: 100%;
  height: 60vh; /* relativ zur Bildschirmhöhe */
  max-height: var(--hero-max); /* nie höher als X */
  min-height: var(--hero-min); /* nie kleiner als Y */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 0; /* -10 entfernt */
}

.video-wrapper > img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* füllt den sichtbaren Rahmen */
  object-position: var(--hero-pos); /* Ausschnitt pro Seite steuerbar */
  display: block;
}

/* 3) FOOTER --------------------------------------------------------------- */
.site-footer {
  width: 100%;
  height: 130px;
  background-color: var(--brand);
}

/* 4) BUTTONS -------------------------------------------------------------- */
.button {
  padding: 0.5em 1em;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  background-color: var(--brand);
  border: none;
  cursor: pointer;
}

/* 5) HAUPTINHALT & CONTAINER --------------------------------------------- */
.container-main {
  background-color: #fff;
  background-image: url(bilder/site-bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: min-content;
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.front-container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin: 0 auto;
  max-width: 1350px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
  justify-content: center;
}

.feld1 {
  height: 436px;
  width: 380px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 1.5rem 0;
  display: flex;
}

/* 6) KARTEN / TEASER ------------------------------------------------------ */
.hr-card-body {
  border-width: 0.15rem;
  width: 1.5rem;
  border-color: var(--brand);
  margin: 0.5rem 0;
}

.card-body {
  height: 90%;
  background-color: #fff;
  padding: 1.25rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  height: 20%;
  background-color: #fff;
  padding: 0.5rem;
}

/* Kartenteaser mit Hintergrundbild */
.card-header1,
.card-header2,
.card-header3,
.card-header4,
.card-header5,
.card-header6,
.card-header7,
.card-header8,
.card-header9 {
  height: 100%;
  background-size: cover;
  background-position: center;
}

.card-header6 {
  background-image: url(bilder/frauenbatallion.jpeg);
}
.card-header5 {
  background-image: url(bilder/brainstorm.jpeg);
}
.card-header1 {
  background-image: url(bilder/dasbesteimnorden.jpeg);
}
.card-header2 {
  background-image: url(bilder/einberufung.jpg);
}
.card-header3 {
  background-image: url(bilder/uebungsdienst.jpg);
}
.card-header4 {
  background-image: url(bilder/zechenband.jpeg);
}
.card-header7 {
  background-image: url(bilder/wagenbau.jpg);
}
.card-header8 {
  background-image: url(bilder/Festprogramm.jpg);
}
.card-header9 {
  background-image: url(bilder/werbe.jpeg);
  height: 110%;
}

/* 7) NAVIGATION / FOKUS --------------------------------------------------- */
a,
button,
label {
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
label:focus-visible {
  outline: 2px solid var(--brand);
}

/* 8) AKTUELLES-SEITE ------------------------------------------------------ */
.container-aktuelles {
  width: 100%;
  max-width: 1140px;
  padding: 0 15px;
  margin: 0 auto;
}

.aktuelles-content-wrapper {
  margin-bottom: 1.25rem;
}
.aktuelles.content {
  display: flex;
  justify-content: center;
}

.aktuelles-card-header {
  background-color: var(--brand);
  padding: 0 1.25rem;
  font-size: 22px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.artikel-card {
  margin-bottom: 20px;
  overflow: hidden;
}

.artikel-card-body {
  background-color: #fff;
  padding: 1.25rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.15rem;
}
.artikel-card-body p {
  margin-bottom: 1.5rem;
}

/* Foto-Blöcke */
.artikel-foto1 {
  width: 100%;
  display: flex;
  overflow: hidden;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.artikel-foto2 {
  width: 100%;
  display: block;
}

.article-photo {
  margin: 1rem 0;
}
.article-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.article-photo figcaption {
  font-size: 0.9rem;
  color: #777;
  margin-top: 0.4rem;
}

.artikel-card-body img {
  max-width: 100%;
  height: auto;
}

.article-side-by-side {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.article-side-by-side .article-text {
  flex: 2 1 300px;
}
.article-side-by-side .article-photos {
  flex: 1 1 250px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.article-side-by-side .article-photo img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}
@media (max-width: 800px) {
  .article-side-by-side {
    flex-direction: column;
  }
  .article-side-by-side .article-photos {
    flex-direction: column;
  }
}

.article-photo.align-left {
  float: left;
  margin: 0 0.75rem 0.5rem 0;
  max-width: 45%;
}
.article-photo.align-right {
  float: right;
  margin: 0 0 0.5rem 0.75rem;
  max-width: 45%;
}
@media (max-width: 700px) {
  .article-photo.align-left,
  .article-photo.align-right {
    float: none;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 9) INDEX-BILD ------------------------------------------------------------ */
/* Standard: Index-Bild */
.index-image-container {
  max-width: 100%;
  max-height: 400px; /* Rahmenhöhe fix */
  overflow: hidden; /* Bild darf nicht rausragen */
  margin: 2.5rem auto;
  display: flex;
  justify-content: center;
  border-radius: 15px; /* abgerundet */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.index-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--index-pos, 50% 50%); /* Standard: zentriert */
  border-radius: 15px;
  display: block;
}

/* Seitenabhängige Steuerung */
.page-index {
  --index-pos: 50% 10%;
} /* Mitte */
.page-index-top {
  --index-pos: 50% 20%;
} /* weiter nach oben */
.page-index-low {
  --index-pos: 50% 80%;
} /* weiter nach unten */
/* 10) GALLERY ------------------------------------------------------------- */
.container-gallery {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 8px;
  background-color: rgb(37, 39, 38);
  background-image: url(bilder/site-bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 30px;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* 11) NEUE KARTEN ---------------------------------------------------------- */
.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: auto;
}
.card {
  height: 500px;
  width: 400px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: 250ms ease-in-out;
  background-color: var(--brand);
  border-radius: var(--radius);
  box-shadow: 2px 2px 10px black;
}
.card img {
  height: 100%;
  width: auto;
  object-fit: cover;
}
.card_content {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 20px;
  width: calc(100%);
  font-size: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-image: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, 0.473) 25%
  );
  transform: translateY(calc(100% - 110px));
  transition: 250ms ease-in-out;
}
.card:hover .card_content {
  transform: translateY(0);
}
.card:hover {
  transform: scale(1.1);
}
.card h3 {
  color: #fff;
  font-size: 32px;
  font-weight: 600;
}
.card h4 {
  color: #fff;
  font-style: italic;
}
.content_head {
  position: relative;
}
.content_head::after {
  content: "";
  height: 4px;
  width: 50%;
  background: var(--brand);
  position: absolute;
  bottom: -15px;
}
.content_body p {
  color: #fff;
}

/* 12) SOCIAL & IMPRESSUM -------------------------------------------------- */
.social-logo-wrapper {
  display: flex;
  justify-content: center;
}
.social-logo-facebook {
  width: 65px;
  height: 65px;
}
.social-logo {
  width: 50px;
  height: 50px;
  margin-top: 8px;
}
.impressum-wrapper {
  display: flex;
  justify-content: center;
}
.impressum {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 13) SONSTIGES ------------------------------------------------------------ */
.main-theme {
  object-fit: cover;
}
.strecke-card-body {
  background-color: #fff;
  padding: 0.35rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.15rem;
}
.strecke-umzug {
  width: 1100px;
  height: 1000px;
}
.bild-position {
  top: 20%;
}
.zwischenbild-wrapper {
  width: 100%;
  height: 40vh;
  margin: auto;
}
.zwischenbild {
  width: 500px;
  height: 500px;
}
/* =========================
   Mobile-Menü: optische Trennung
   ========================= */
@media (max-width: 900px) {
  /* Panel-Grundfläche leicht absetzen */
  nav ul {
    background: #fff;
    /* feine vertikale Streifen für Struktur (sehr dezent) */
    background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.035),
      rgba(0, 0, 0, 0.035)
    );
    background-size: 100% 1px; /* für bessere Wirkung in Safari */
  }

  /* Jedes Top-Level-Item als eigene "Zeile" */
  nav ul > li {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
    margin: 10px 0;
    overflow: hidden; /* damit :hover-hintergrund nicht übersteht */
  }

  /* Links und Labels im Item klar paddings & divider unten */
  nav a,
  nav label[for$="_checkbox"] {
    display: block;
    padding: 12px 14px;
    position: relative;
  }

  /* dezenter Trenner zwischen Zeilen (außer letzte) */
  nav ul > li:not(:last-child) {
    margin-bottom: 12px;
  }

  /* Hover/Active-Hintergrund (ganz dezent) */
  nav a:hover,
  nav label[for$="_checkbox"]:hover {
    background: rgba(28, 111, 71, 0.06);
  }

  /* Aktive Seite markieren (wenn du aria-current auf <a> setzt) */
  nav a[aria-current="page"] {
    background: rgba(28, 111, 71, 0.1);
    box-shadow: 0 0 0 1px rgba(28, 111, 71, 0.18) inset;
    font-weight: 600;
  }

  /* Untermenü (dropdown) als eigene, leicht grau hinterlegte Box */
  .expandable_li .dropdown {
    background: #f7faf8; /* ganz leichtes grau-grün */
    border-top: 1px dashed rgba(0, 0, 0, 0.12);
    padding: 6px 8px;
    margin: 0 8px 10px; /* etwas innen versetzt */
    border-radius: 8px;
    /* die Höhe-Animation hast du schon: max-height via :checked */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  }

  /* Items im Untermenü mit Trennlinien */
  .expandable_li .dropdown li + li {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
  .expandable_li .dropdown a {
    padding: 10px 8px;
    border-radius: 6px;
  }
  .expandable_li .dropdown a:hover {
    background: rgba(28, 111, 71, 0.08);
  }

  /* Pfeil am Label bleibt – wir geben dem Label eine Unterkante */
  .expandable_li > label {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  /* Tastatur-Fokus klar sichtbar */
  nav a:focus-visible,
  .toggle_button:focus-visible,
  nav label:focus-visible {
    outline: 2px solid #1c6f47;
    outline-offset: 3px;
    border-radius: 8px;
  }
}
