/* KTU insight – gemeinsames Layout (Branch #339111) */

:root {
  --ktu-brand: #339111;
  --ktu-brand-rgb: 51, 145, 17;
  --footer-gap-before: 20px;
  --bg-page: #0c0f0d;
  --bg-card: #141a16;
  --bg-elevated: #1a221c;
  --text: #e8ece9;
  --text-muted: #8d9a91;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --radius: 10px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 2rem;
  max-width: 1400px;
  margin-inline: auto;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(var(--ktu-brand-rgb), 0.18), transparent 55%),
    var(--bg-page);
  color: var(--text);
  border-top: 4px solid var(--ktu-brand);
  line-height: 1.45;
}

/* Hauptbereich: wächst bei kurzen Seiten (Footer unten), Abstand vor dem Footer */
.site-content {
  flex: 1 0 auto;
  padding-bottom: var(--footer-gap-before);
}

/* Screenreader: Seitentitel ohne sichtbaren Header-Text */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header (nur Logo) */
.site-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(var(--ktu-brand-rgb), 0.28);
}

.site-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}

.site-brand:hover {
  opacity: 0.92;
}

.site-logo {
  display: block;
  height: clamp(56px, 12vw, 76px);
  width: auto;
  max-width: min(340px, 92vw);
  object-fit: contain;
}

/* Footer (gleicher Separator-Stil wie unter dem Logo) */
.site-footer {
  flex-shrink: 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(var(--ktu-brand-rgb), 0.28);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.75rem;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  font-size: 0.82rem;
}

.site-footer-links a {
  color: #b8c4bb;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--ktu-brand-rgb), 0.35);
  transition:
    color 0.15s,
    border-color 0.15s;
}

.site-footer-links a:hover {
  color: #fff;
  border-bottom-color: var(--ktu-brand);
}

.site-footer-sep {
  color: var(--text-muted);
  user-select: none;
}

@media (max-width: 640px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Hauptnavigation */
nav[aria-label="Hauptnavigation"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.nav-link {
  color: #dce5df;
  text-decoration: none;
  padding: 0.42rem 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.nav-link:hover {
  border-color: rgba(var(--ktu-brand-rgb), 0.55);
  background: rgba(var(--ktu-brand-rgb), 0.1);
  color: #fff;
}

.nav-link.is-active {
  background: rgba(var(--ktu-brand-rgb), 0.24);
  border-color: var(--ktu-brand);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(var(--ktu-brand-rgb), 0.35);
}

/* Subnavigation Zeitraffer */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.subnav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.subnav-link:hover {
  border-color: rgba(var(--ktu-brand-rgb), 0.45);
  color: var(--text);
}

.subnav-link.is-active {
  color: #fff;
  border-color: var(--ktu-brand);
  background: rgba(var(--ktu-brand-rgb), 0.18);
}

.meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* Live: Bilderaster */
.grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

figure {
  margin: 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(var(--ktu-brand-rgb), 0.12);
  box-shadow: var(--shadow-card);
}

figcaption {
  padding: 0.30rem 0.30rem;
  font-size: 0.88rem;
  color: #a8b5ad;
  border-top: 1px solid rgba(var(--ktu-brand-rgb), 0.08);
}

.thumb {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin-inline: auto;
  vertical-align: middle;
  cursor: zoom-in;
}

/* Modal Live */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}

.modal.is-open {
  display: flex;
}

.modal img {
  display: block;
  max-width: min(95vw, 1920px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
  outline: 1px solid rgba(var(--ktu-brand-rgb), 0.25);
}

.modal-hint {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: #7a8c82;
  pointer-events: none;
}

/* Zeitraffer-Karten */
figure.video-card {
  border: 1px solid rgba(var(--ktu-brand-rgb), 0.14);
}

.preview-wrap {
  position: relative;
}

.preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

.play-btn {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 0.72rem 1.15rem;
  border: 1px solid rgba(var(--ktu-brand-rgb), 0.65);
  background: linear-gradient(
    165deg,
    rgba(var(--ktu-brand-rgb), 0.42) 0%,
    rgba(12, 18, 14, 0.94) 100%
  );
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s;
}

.play-btn:hover {
  border-color: #45b018;
  background: linear-gradient(
    165deg,
    rgba(var(--ktu-brand-rgb), 0.55) 0%,
    rgba(14, 22, 16, 0.96) 100%
  );
  transform: translateX(-50%) translateY(-1px);
}

.play-btn:active {
  transform: translateX(-50%) translateY(0);
}

.status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.45rem 0.85rem 0.75rem;
  min-height: 1.2rem;
}

.video-period {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  text-align: center;
  letter-spacing: 0.02em;
  padding: 0.30rem 0.30rem;
}

video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

/* Übersicht Zeitraffer */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid rgba(var(--ktu-brand-rgb), 0.15);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-card);
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.card .meta {
  margin-bottom: 0.85rem;
}

.card .nav-link {
  display: inline-block;
}
