/* ==========================================================================
   Öffentliche Seiten – Hero, Dokumente, Karten
   Ergänzt style.css, ersetzt es nicht.
   ========================================================================== */

:root {
  --pg-ink: #14181f;
  --pg-body: #39414d;
  --pg-muted: #5c6570;
  --pg-line: #e3e7ee;
  --pg-surface: #ffffff;
  --pg-bg: #f4f6fa;
  --pg-red: #c8102e;
  --pg-red-dark: #9d0b23;
  --pg-radius: 14px;
  --pg-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --pg-shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
}

/* ------------------------------------------------------------------- Hero */

/* Bewusst kein Sportfoto: der Verein hat viele Sparten. Stattdessen
   Vereinsfarben, eine dezente Streifentextur und das Wappen als Wasserzeichen. */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 200px;
  padding: 92px 0 30px;
  background-color: #171b21;
  background-image:
    radial-gradient(760px 300px at 88% -25%, rgba(200, 16, 46, .60), transparent 62%),
    radial-gradient(620px 280px at 0% 125%, rgba(200, 16, 46, .20), transparent 60%),
    linear-gradient(135deg, #1e232b 0%, #14181f 55%, #0c0f14 100%);
  color: #fff;
  overflow: hidden;
}

/* Diagonale Streifen – greift das Slash-Motiv der Seite auf */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg,
      rgba(255, 255, 255, .05) 0 2px,
      transparent 2px 22px);
  pointer-events: none;
}

/* Vereinswappen als Wasserzeichen */
.page-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -46px;
  width: 190px;
  height: 220px;
  transform: translateY(-44%) rotate(-6deg);
  background: url("/static/images/optimized/crest.webp") center / contain no-repeat;
  opacity: .16;
  pointer-events: none;
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}

/* Roter Abschluss unten */
.page-hero__edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pg-red) 0%, var(--pg-red-dark) 55%, #5c0714 100%);
}

.page-hero__title {
  color: #fff;
  font-family: "Oswald", "Lato", sans-serif;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 3rem);
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.page-hero__lead {
  color: rgba(255, 255, 255, .88);
  margin: 0;
  max-width: 60ch;
}

.page-hero__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: .875rem;
  color: rgba(255, 255, 255, .75);
}

.page-hero__crumbs a {
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
}

.page-hero__crumbs a:hover,
.page-hero__crumbs a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.page-hero__crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: rgba(255, 255, 255, .45);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .page-hero {
    min-height: 260px;
    padding: 116px 0 38px;
  }

  .page-hero::after {
    right: 4%;
    width: 240px;
    height: 280px;
    opacity: .2;
  }
}
/* Variante, die den Seiteninhalt direkt mittraegt (statt zweier dunkler
   Bloecke hintereinander) */
.page-hero--section {
  display: block;
  align-items: initial;
  padding-bottom: 56px;
}

.page-hero__body {
  margin-top: 32px;
}

@media (min-width: 768px) {
  .page-hero--section {
    padding-bottom: 68px;
  }

  .page-hero__body {
    margin-top: 40px;
  }
}
/* --------------------------------------------------------------- Sektion */

.page-section {
  padding: 40px 0 64px;
  background: var(--pg-bg);
}

.page-section--plain {
  background: #fff;
}

.page-section__head {
  margin-bottom: 24px;
}

.page-section__head h2 {
  color: var(--pg-ink);
  font-family: "Oswald", "Lato", sans-serif;
  margin: 0 0 4px;
}

.page-section__head p {
  color: var(--pg-muted);
  margin: 0;
  max-width: 65ch;
}

/* --------------------------------------------------- Buttons (oeffentlich) */

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--pg-red);
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.pg-btn:hover,
.pg-btn:focus-visible {
  background: var(--pg-red-dark);
  color: #fff;
  text-decoration: none;
}

.pg-btn--ghost {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

.pg-btn--ghost:hover,
.pg-btn--ghost:focus-visible {
  background: rgba(255, 255, 255, .24);
  color: #fff;
}

.pg-btn--outline {
  background: #fff;
  border-color: var(--pg-line);
  color: var(--pg-ink);
}

.pg-btn--outline:hover,
.pg-btn--outline:focus-visible {
  background: var(--pg-bg);
  border-color: var(--pg-muted);
  color: var(--pg-ink);
}

/* ------------------------------------------------------------- Dokumente */

.doc-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--pg-surface);
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
  color: var(--pg-body);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.doc-card:hover,
.doc-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--pg-red);
  box-shadow: var(--pg-shadow-lg);
  color: var(--pg-body);
  text-decoration: none;
}

.doc-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fdecef;
  color: var(--pg-red-dark);
  font-size: 1.25rem;
}

.doc-card__body {
  min-width: 0;
  flex: 1 1 auto;
}

.doc-card__title {
  display: block;
  color: var(--pg-ink);
  font-family: "Oswald", "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.doc-card__meta {
  display: block;
  color: var(--pg-muted);
  font-size: .8125rem;
  margin-top: 2px;
}

.doc-card__arrow {
  flex: 0 0 auto;
  color: var(--pg-muted);
  font-size: 1.125rem;
}

.doc-card:hover .doc-card__arrow {
  color: var(--pg-red);
}

@media (min-width: 576px) {
  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* -------------------------------------------------------------- Leerstand */

.pg-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--pg-muted);
  background: var(--pg-surface);
  border: 1px dashed var(--pg-line);
  border-radius: var(--pg-radius);
}

.pg-empty i {
  display: block;
  font-size: 2rem;
  color: var(--pg-line);
  margin-bottom: 12px;
}

/* ------------------------------------------------------ News- & Event-Grid */

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--pg-surface);
  border: 1px solid var(--pg-line);
  border-radius: var(--pg-radius);
  box-shadow: var(--pg-shadow);
  overflow: hidden;
  height: 100%;
  transition: transform .16s ease, box-shadow .16s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pg-shadow-lg);
}

.post-card__media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--pg-bg) center / cover no-repeat;
  height: 225px;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1 1 auto;
}

.post-card__date {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--pg-red-dark);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.post-card__title {
  font-family: "Oswald", "Lato", sans-serif;
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 0;
}

.post-card__title a {
  color: var(--pg-ink);
  text-decoration: none;
}

.post-card__title a:hover,
.post-card__title a:focus-visible {
  color: var(--pg-red);
  text-decoration: none;
}

.post-card__more {
  margin-top: auto;
  font-size: .875rem;
  font-weight: 700;
  color: var(--pg-red-dark);
  text-decoration: none;
}

.post-card__more:hover {
  color: var(--pg-red);
}

/* --------------------------------------------------------- Mehr laden */

.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}

.load-more__status {
  margin: 0;
  color: var(--pg-muted);
  font-size: .875rem;
}

.load-more .pg-btn[hidden] {
  display: none;
}

@media (min-width: 576px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .card-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Lange Listen erst rendern, wenn sie sichtbar werden.
   Bewusst nicht für .profile-card-3: dort verhindert der skalierte Container
   (.zoomOut) die Sichtbarkeitserkennung und die Karten bleiben leer. */
.card-grid > * {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

/* Fallback, falls Bootstrap-Utility fehlt */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------ Edit-Leiste */

.owner-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 0 0;
}
