/* =========================================================================
   Galerie-Lightbox (Rubrik Fotos)
   Grossansicht mit Blaettern, Tastatur- und Wischbedienung.
   Ergaenzt styles.css; bewusst eigene Klassennamen, damit der bestehende
   Presse-Zoom (.zoom-overlay) unberuehrt bleibt.
   ========================================================================= */

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 12, 8, .94);
    padding: 1rem;
}
.lightbox[hidden] { display: none; }

/* Hintergrund nicht mitscrollen, solange die Grossansicht offen ist. */
html.lightbox-offen,
html.lightbox-offen body { overflow: hidden; }

.lightbox-figur {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    max-width: 100%;
}
.lightbox-bild {
    max-width: min(1500px, 92vw);
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}

.lightbox-info {
    max-width: min(900px, 92vw);
    text-align: center;
    color: #f6efe9;
    font-size: .95rem;
    line-height: 1.45;
}
.lightbox-info[hidden] { display: none; }
.lightbox-titel { display: block; font-size: 1.05rem; }
.lightbox-text { display: block; color: #d9cec5; }

.lightbox-zaehler {
    position: absolute;
    bottom: .9rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: #e8ded6;
    font-size: .85rem;
    letter-spacing: .03em;
}

.lightbox-zu {
    position: absolute;
    top: .7rem;
    right: .9rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox-zu:hover,
.lightbox-zu:focus-visible { background: rgba(255, 255, 255, .3); }

.lightbox-pfeil {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3.5rem;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}
.lightbox-pfeil[hidden] { display: none; }
.lightbox-pfeil:hover,
.lightbox-pfeil:focus-visible { background: rgba(255, 255, 255, .32); }
.lightbox-prev { left: .6rem; }
.lightbox-next { right: .6rem; }

/* Auf kleinen Bildschirmen wandern die Pfeile nach unten, damit das Bild
   die volle Breite behaelt. */
@media (max-width: 640px) {
    .lightbox-bild { max-height: 68vh; }
    .lightbox-pfeil {
        top: auto;
        bottom: .7rem;
        transform: none;
        width: 3rem;
        height: 3rem;
        font-size: 1.9rem;
    }
    .lightbox-prev { left: calc(50% - 4.4rem); }
    .lightbox-next { right: calc(50% - 4.4rem); }
    .lightbox-zaehler { bottom: 4.2rem; }
}

/* Gemeinsamer Footer: diese Datei wird im oeffentlichen Layout global geladen.
   Nur beim Login die feste weisse Inline-Farbe auf dem Pastellgrund ersetzen. */
.site-footer a.muted-link[href$="/admin/login"] {
    color: #5b2c83 !important;
}


/* Header-Logo: komplettes Logo sichtbar */
.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
}


/* Mobile Navigation: Klickbarkeit absichern */
@media (max-width: 820px) {
  .site-header {
    z-index: 1000;
  }

  .header-inner {
    position: relative;
  }

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

  .brand-text {
    min-width: 0;
  }

  .main-nav {
    position: relative !important;
    z-index: 1002;
    flex: 0 0 auto;
  }

  .nav-toggle {
    position: relative;
    z-index: 1003;
    pointer-events: auto !important;
    touch-action: manipulation;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
  }

  .nav-list {
    z-index: 1001;
  }

  .nav-list:not(.open) {
    pointer-events: none;
    visibility: hidden;
  }

  .nav-list.open {
    pointer-events: auto;
    visibility: visible;
  }
}

/* Mobile: drei Veranstaltungs-Buttons nebeneinander */
@media (max-width: 640px) {
  .basar-card-actions {
    gap: .35rem;
    padding: 0 .75rem 1rem;
  }

  .basar-card-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: .55rem .3rem;
    font-size: .78rem;
    white-space: nowrap;
    letter-spacing: -.01em;
  }
}


/* NeuroNetz Veranstaltungsdetail: Zwischenueberschriften wie H2 */
body:has(.basar-flyer img[alt^="Flyer NeuroNetz Westhofen"]) .detail-main > p.lead:nth-of-type(4) > strong:first-child,
body:has(.basar-flyer img[alt^="Flyer NeuroNetz Westhofen"]) .detail-main > p.lead:nth-of-type(5) > strong:first-child {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--c-success);
  margin: 0 0 .5em;
}
body:has(.basar-flyer img[alt^="Flyer NeuroNetz Westhofen"]) .detail-main > p.lead:nth-of-type(4) > strong:first-child + br,
body:has(.basar-flyer img[alt^="Flyer NeuroNetz Westhofen"]) .detail-main > p.lead:nth-of-type(5) > strong:first-child + br {
  display: none;
}
