/* ==================================================================
   UNTERSEITEN.CSS – Ergänzungen für alle Seiten außer der Startseite
   (News-Artikel, Galerien, Termine, Verein, Impressum …).
   Benutzt dieselben Farben/Rundungen wie hukv.css (Variablen aus :root).
   Die Startseite nutzt diese Regeln NICHT – ihre Optik bleibt 1:1 wie im Design.
   ------------------------------------------------------------------
   INHALT
     A. Seitenkopf (Brotkrumen + Überschrift)
     B. Fließtext (.prose) – Überschriften, Listen, Bilder im Text
     C. Raster: News-Karten, Kacheln, Verein-Links
     D. Galerie-Raster + große Bildansicht (Lightbox)
     E. Termine (Unterseite), Video-Box, Zurück-Button
   ================================================================== */

/* ===== A. Seitenkopf ===== */
.page-head { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: 1.6rem; }
.crumbs { font-size: .85rem; color: var(--gray); margin-bottom: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs a:hover { color: var(--red); }
.sub-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 2.6rem 0 1.2rem; }
.sub-title a:hover { color: var(--red); }

/* ===== B. Fließtext ===== */
.prose { max-width: 860px; padding-bottom: 2rem; font-size: 1.04rem; }
.prose > * + * { margin-top: 1rem; }
.prose h2, .prose h3, .prose h4 { font-weight: 500; line-height: 1.3; margin-top: 2rem; }
.prose h2 { font-size: 1.5rem; } .prose h3 { font-size: 1.25rem; } .prose h4 { font-size: 1.08rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .3rem; }
.prose a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--red); }
.prose img { border-radius: var(--r); height: auto; max-width: 100%; box-shadow: var(--shadow); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose blockquote { border-left: 3px solid var(--blue); padding-left: 1rem; color: var(--gray); }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }

/* ===== C. Raster ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; padding-bottom: 3rem; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; padding-bottom: 2rem; }
/* ---------------------------------------------------------------------
   Verein-Seite (/verein/): die Buttons (Klassen nur dort verwendet).

   FARBE ALLER BUTTONS (alle gleich)
     .link-tile                 Fläche + Schrift
     .link-tile:hover           Farbe beim Überfahren mit der Maus
     .link-tile:focus-visible   Rahmen, wenn man mit der Tastatur (Tab) kommt
     Standard: dunkles Website-Blau (--blue-dark) mit weißer Schrift und
     weißen Icons. Weißer Text ist darauf gut lesbar. Wer das hellere
     Blau möchte, schreibt hier:  background: var(--blue);
     Die Farben selbst stehen in static/css/hukv.css unter :root.

   RASTER (alle Buttons gleich breit und gleich hoch)
     Desktop (breiter als 1100px): 4 Spalten, zwei Reihen à 4
     Tablet (bis 1100px, z. B. 1024px): 2 Spalten
     Handy (bis 600px): 1 Spalte, Icon links und Text rechts
   --------------------------------------------------------------------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-bottom: 3rem;
  align-items: stretch;
}
.link-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  min-height: 11.5rem;
  height: 100%;
  padding: 1.35rem 1rem 1.2rem;
  background: var(--blue-dark);
  color: var(--white);
  border-radius: var(--r);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.3;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.link-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: .85rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  flex-shrink: 0;
}
.link-tile-icon svg { width: 1.7rem; height: 1.7rem; display: block; }
.link-tile-text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6em; /* Platz für zwei Zeilen, damit kurze Titel die Höhe nicht verringern */
  overflow-wrap: break-word;
  hyphens: auto;
}
.link-tile:hover {
  background: color-mix(in srgb, var(--blue-dark) 72%, var(--ink));
  box-shadow: var(--shadow-h);
  transform: translateY(-2px);
}
.link-tile:focus { outline: none; }
.link-tile:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  background: color-mix(in srgb, var(--blue-dark) 72%, var(--ink));
  box-shadow: var(--shadow-h);
}
@media (max-width: 1100px) {
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .link-grid { grid-template-columns: 1fr; }
  .link-tile {
    min-height: 5.5rem;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 1.1rem 1.3rem;
    gap: 1rem;
  }
  .link-tile-icon { margin-bottom: 0; }
  .link-tile-text { min-height: 0; justify-content: flex-start; }
}
.year-block + .year-block .sub-title { margin-top: 1.4rem; }

/* ===== D. Galerie ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; padding-bottom: 2rem; }
.gallery-grid .g-item { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: var(--blue-tint); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-grid .g-item:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,22,30,.92); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; color: var(--white); font-size: 2.6rem; width: 60px; height: 60px; border-radius: 50%; line-height: 1; }
.lightbox button:hover { background: rgba(255,255,255,.12); }
.lb-close { top: 1rem; right: 1rem; } .lb-prev { left: 1rem; } .lb-next { right: 1rem; }

/* ===== E. Termine / Video / Zurück ===== */
.termine-detail, .termin-detail { border-bottom: 0; max-width: 860px; }
.termin-detail { grid-template-columns: 84px 1fr; margin-bottom: 1rem; }
.video-box { aspect-ratio: 16 / 9; max-width: 860px; background: var(--ink); color: var(--white); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1.5rem; text-align: center; }
.video-box p { font-size: .85rem; opacity: .8; }
.video-box a { color: var(--white); }
.video-play { font-size: 1.1rem; font-weight: 500; background: var(--red); color: var(--white); border-radius: var(--r-sm); padding: .8rem 1.8rem; }
.video-play:hover { background: var(--red-dark); }
.video-box.playing { padding: 0; overflow: hidden; }
.video-box iframe { width: 100%; height: 100%; border: 0; }
.back-link { padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.fb-link a { text-decoration: none; color: var(--ink); }
