/* Gemeinsame Bausteine fuer alle Termin-Seiten (news-*.html).
   Wird nach dem Inline-<style> der Seite geladen und ergaenzt ihn. */

/* ---------- Vergangene Termine (gesetzt von termine.js) ---------- */
.past-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 18px;
  padding: 11px 16px;
  border: 1px solid #ecd6b8;
  border-left: 4px solid #b96b2c;
  border-radius: 8px;
  background: #fdf5ea;
  color: #5e3b12;
  font-size: 0.92rem;
  line-height: 1.45;
}
.past-notice a {
  color: #864817;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.event-past .date-card {
  background: linear-gradient(135deg, #5b6b80, #46556a);
}

/* ---------- Hero mit Bild (Variante .article-hero--media) ---------- */
.article-hero--media {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px 48px;
}
.article-hero--media h1 {
  font-size: clamp(2rem, 3.5vw, 3.05rem);
}

.hero-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #e9eef5;
  box-shadow: 0 22px 48px rgba(20, 32, 51, 0.16), 0 0 0 1px rgba(20, 32, 51, 0.06);
  cursor: zoom-in;
  transition: box-shadow 260ms ease, transform 260ms ease;
}
.hero-media img {
  width: 100%;
  height: auto;
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-media .zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  border-radius: 999px;
  background: rgba(20, 54, 93, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
  transition: background 200ms ease, transform 200ms ease;
}
.hero-media .zoom-hint svg { width: 15px; height: 15px; }
@media (hover: hover) {
  .hero-media:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 60px rgba(20, 32, 51, 0.2), 0 0 0 1px rgba(20, 32, 51, 0.06);
  }
  .hero-media:hover img { transform: scale(1.025); }
  .hero-media:hover .zoom-hint { background: #14365d; transform: scale(1.04); }
}
.hero-media:focus-visible {
  outline: 3px solid rgba(50, 101, 160, 0.55);
  outline-offset: 4px;
}

/* Rechte Hero-Spalte: Bild, darunter zwei Logo-Kacheln (Veranstalter / Durchfuehrung),
   zusammen genau so breit wie das Bild. */
.hero-side {
  display: grid;
  gap: 14px;
}
.partner-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.partner-tile {
  display: grid;
  grid-template-rows: auto 46px;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 14px;
  border: 1px solid #d8e1eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 32, 51, 0.055);
}
.partner-tile span {
  align-self: start;
  color: #5b6b80;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.partner-tile img {
  width: auto;
  height: 36px;
}
/* Gastgeber (Innung) bewusst etwas groesser als BASIKNET. Quelle nur 320x84 px - nicht groesser zeigen. */
.partner-tile--host img { height: 44px; }

/* Termin als Leiste unter Text und Bild */
.date-card--bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 0;
  padding: 18px 26px;
}
.date-card--bar > div {
  padding-right: 34px;
  margin-right: 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}
.date-card--bar > div:last-of-type { border-right: 0; }
.date-card.date-card--bar span { margin-bottom: 3px; }
.date-card.date-card--bar strong {
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.date-card-badge {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  color: #14365d;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.event-past .date-card-badge { display: none; }

/* ---------- Vorteile als Kacheln ---------- */
article ul.benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.benefits li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 2px 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  background: #f7f9fc;
}
.benefit-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(50, 101, 160, 0.1);
  color: #14365d;
}
.benefit-icon svg { width: 21px; height: 21px; }
.benefits strong { font-size: 0.97rem; line-height: 1.3; }
.benefits li > span:last-child { color: #5b6b80; font-size: 0.9rem; line-height: 1.45; }

@media (max-width: 880px) {
  .article-hero--media { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .date-card--bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    padding: 18px 20px;
  }
  .date-card--bar > div {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
  }
  .date-card--bar > div:nth-of-type(3) { grid-column: 1 / -1; }
  .date-card.date-card--bar strong { font-size: 1.08rem; }
  .date-card-badge { justify-self: start; margin-left: 0; }
  .partner-tiles { gap: 10px; }
  .partner-tile {
    grid-template-rows: 1fr 38px;
    padding: 12px 12px 12px;
  }
  .partner-tile span { font-size: 0.6rem; }
  .partner-tile img { height: 28px; }
  .partner-tile--host img { height: 36px; }
  article ul.benefits { grid-template-columns: 1fr; }
}

/* ---------- Lightbox (lightbox.js) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 32, 0.84);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 420ms ease;
}
.lightbox.is-open .lightbox-backdrop { opacity: 1; }
.lightbox-img {
  position: fixed;
  max-width: none;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  transform-origin: 0 0;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 160ms ease;
  cursor: zoom-out;
}
.lightbox-caption {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  text-align: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8) rotate(-45deg);
  transition: opacity 220ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), background 160ms ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lightbox.is-open .lightbox-caption { opacity: 1; transition-delay: 180ms; }
.lightbox.is-open .lightbox-close { opacity: 1; transform: none; transition-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  .hero-media, .hero-media img, .lightbox-img { transition: opacity 160ms ease; }
  .hero-media:hover, .hero-media:hover img { transform: none; }
  .lightbox-close { transform: none; }
}
