@charset "UTF-8";
/* =========================================================
   Planetarium & Sternwarte Köln – Stylesheet
   ========================================================= */

:root {
  --bg: #070b1a;
  --bg-2: #0d1430;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --text: #e8ecf8;
  --muted: #a3acc8;
  --accent: #f5c46b;      /* Sternen-Gold */
  --accent-2: #7aa7ff;    /* Nachthimmel-Blau */
  --danger: #ff7a7a;
  --radius: 14px;
  --max: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sternenhimmel-Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 65%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 15%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 55%, #ffe9c4 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 90%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 10%, #fff 50%, transparent 51%),
    radial-gradient(ellipse at 80% -10%, rgba(122, 167, 255, 0.18), transparent 60%),
    radial-gradient(ellipse at 0% 110%, rgba(245, 196, 107, 0.10), transparent 55%),
    var(--bg);
  background-size: 260px 260px, 310px 310px, 420px 420px, 370px 370px, 290px 290px, 510px 510px, 330px 330px, 450px 450px, 100% 100%, 100% 100%, 100% 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #ffd88f; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #000; padding: 8px 14px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 26, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; line-height: 1.15; }
.brand:hover { color: var(--text); }
.brand-logo {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #fff6dc 0%, var(--accent) 30%, #b86f1f 75%, #3a2008 100%);
  box-shadow: 0 0 18px rgba(245, 196, 107, 0.45);
}
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); width: 44px; height: 44px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--accent); background: rgba(245, 196, 107, 0.10); }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(7, 11, 26, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 18px; }
  .main-nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; box-shadow: 0 0 80px rgba(122, 167, 255, 0.25); border: 1px solid var(--border); }

.page-hero { padding: clamp(44px, 7vw, 80px) 0 clamp(20px, 3vw, 32px); }
.page-hero .lead { margin-bottom: 0; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 320px; margin: 0 auto; order: -1; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: .2s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover { background: #ffd88f; color: #1a1205; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Sections & Cards ---------- */
.section { padding: clamp(36px, 6vw, 72px) 0; }
.section-title { margin-bottom: 28px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.card h3 { color: var(--text); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(245, 196, 107, 0.12); color: var(--accent); margin-bottom: 14px; }
.icon svg { width: 22px; height: 22px; }

/* Nächste Veranstaltung */
.next-event {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, rgba(245, 196, 107, 0.12), rgba(122, 167, 255, 0.08));
  border: 1px solid rgba(245, 196, 107, 0.35);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.next-event .label { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }
.next-event .date-badge {
  width: 88px; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: var(--bg-2);
}
.next-event .date-badge b { display: block; background: var(--accent); color: #1a1205; font-size: .8rem; padding: 4px 0; text-transform: uppercase; }
.next-event .date-badge span { display: block; font-size: 2rem; font-weight: 700; padding: 6px 0; }
@media (max-width: 560px) { .next-event { grid-template-columns: 1fr; } }

/* ---------- Media + Text ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.feature + .feature { margin-top: clamp(40px, 7vw, 80px); }
.feature.reverse .feature-media { order: 2; }
.feature-media img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; object-fit: cover; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
}

.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.facts li { padding-left: 28px; position: relative; color: var(--muted); }
.facts li::before { content: "✦"; position: absolute; left: 4px; color: var(--accent); }
.facts strong { color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.stat { text-align: center; padding: 22px 12px; }
.stat b { display: block; font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Team */
.team-figure img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.team-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.team-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: team; }
.team-list li {
  counter-increment: team;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px 6px 8px; font-size: .95rem;
}
.team-list li::before {
  content: counter(team);
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px;
  border-radius: 50%; background: rgba(245, 196, 107, 0.15); color: var(--accent); font-size: .78rem; font-weight: 700;
}

/* ---------- Hinweise ---------- */
.notice {
  border-left: 4px solid var(--accent);
  background: rgba(245, 196, 107, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
}
.notice.important { border-left-color: var(--danger); background: rgba(255, 122, 122, 0.08); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Veranstaltungstabelle (Platzhalter + PHP-Ausgabe) ---------- */
.events-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.events-wrapper table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .97rem; }
.events-wrapper th, .events-wrapper td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.events-wrapper th { color: var(--accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; background: var(--surface); }
.events-wrapper tr:hover td { background: var(--surface); }
.events-wrapper img { display: inline-block; vertical-align: middle; }

.php-placeholder {
  border: 2px dashed rgba(122, 167, 255, 0.5);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--accent-2);
  background: rgba(122, 167, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
}

/* ---------- Kontakt-Liste ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { margin: 0; flex-shrink: 0; width: 38px; height: 38px; }
.contact-list small { display: block; color: var(--muted); }

/* ---------- Karte (Klick-zum-Laden, DSGVO) ---------- */
.map-box {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16 / 10; background: var(--bg-2);
}
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; gap: 14px; color: var(--muted); }
.map-consent p { max-width: 34em; margin: 0 auto; font-size: .92rem; }
@media (max-width: 560px) { .map-box { aspect-ratio: 4 / 5; } }

/* ---------- Rechtstexte ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose address { font-style: normal; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: rgba(5, 8, 20, 0.85); padding: 48px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer address { font-style: normal; color: var(--muted); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Hilfsklassen ---------- */
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 24px; }
.mt-4 { margin-top: 48px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Virtuelle Tour ---------- */
.breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: .5; }

.tour-progress { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; max-width: 320px; }
.tour-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.tour-step { font-size: .85rem; margin: 8px 0 10px; }

.tour-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.tour-layout.no-text { grid-template-columns: 1fr; max-width: 820px; }
.tour-media { display: grid; gap: 16px; }
.tour-figure { margin: 0; }
.tour-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); }
.tour-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.tour-text p { color: var(--text); }
.tour-text .events-wrapper table { min-width: 0; }
@media (max-width: 860px) { .tour-layout { grid-template-columns: 1fr; } }

.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.station-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: .2s;
}
.station-card:hover { border-color: rgba(245, 196, 107, 0.5); transform: translateY(-2px); color: var(--text); }
.station-card img, .station-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-2); }
.station-noimg { display: grid; place-items: center; color: var(--accent); font-size: 1.6rem; }
.station-card span { padding: 12px 14px; font-weight: 600; font-size: .95rem; }

.tour-pager {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center;
  border-top: 1px solid var(--border); padding-top: 24px;
}
.pager-link {
  display: block; text-decoration: none; padding: 14px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.pager-link:hover { border-color: rgba(245, 196, 107, 0.5); color: var(--text); }
.pager-link small { display: block; color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.pager-link b { font-weight: 600; }
.pager-link.next { text-align: right; }
@media (max-width: 640px) {
  .tour-pager { grid-template-columns: 1fr 1fr; }
  .tour-pager > .btn, .tour-pager > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

.tour-entry { display: block; text-decoration: none; color: var(--text); transition: .2s; }
.tour-entry:hover { border-color: rgba(245, 196, 107, 0.5); color: var(--text); transform: translateY(-2px); }
.tour-entry img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 18px; background: var(--bg-2); }

.tour-tree { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.tour-tree a { text-decoration: none; }
.tour-tree a:hover { text-decoration: underline; }
.tour-tree ul { list-style: none; margin: 6px 0 4px; padding-left: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.tour-tree ul a { display: inline-block; font-size: .85rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.tour-tree ul a:hover { color: var(--text); text-decoration: none; }

.event-descriptions h2, .event-descriptions h3 { margin-top: 1.4em; }

/* ---------- Veranstaltungs-Detailseite (verdetail.php) ---------- */
.event-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.chip-danger { background: rgba(255, 122, 122, 0.14); border-color: rgba(255, 122, 122, 0.45); color: #ffb3b3; }
.chip-info { background: rgba(122, 167, 255, 0.12); border-color: rgba(122, 167, 255, 0.45); color: #c4d6ff; }
.event-detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.event-aside { display: grid; gap: 20px; position: sticky; top: 90px; }
.event-description { max-width: none; }
.event-description img { border-radius: 10px; margin: 1em 0; }
@media (max-width: 860px) { .event-detail { grid-template-columns: 1fr; } .event-aside { position: static; } }

/* ---------- Rechtstexte (Datenschutz) ---------- */
.legal { max-width: 860px; overflow-wrap: anywhere; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.8em; color: var(--accent); }
.legal h4 { font-size: 1rem; margin-top: 1.4em; }
.legal ul { padding-left: 1.3em; display: grid; gap: 8px; margin: 0 0 1em; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }

/* ---------- Veranstaltungstabelle aus akt.php ---------- */
.akt-info { margin: 0 0 20px; padding: 16px 20px; border-left: 4px solid var(--accent); background: rgba(245, 196, 107, 0.08); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text); }
.akt-info:empty { display: none; }
.akt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.events-wrapper .akt-table, .akt-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; font-size: .97rem; }
.akt-table thead th { background: #0e1530; color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.akt-table td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--border); text-align: left; }
.akt-table th.akt-month { text-align: left; padding: 22px 16px 10px; font-size: 1.05rem; letter-spacing: .12em; color: var(--text); background: linear-gradient(90deg, rgba(122, 167, 255, 0.16), transparent 70%); border-bottom: 1px solid var(--border); }
.akt-table tr.akt-event:hover td { background: var(--surface); }
.akt-dayname { font-weight: 700; font-size: .85rem; letter-spacing: .08em; color: var(--accent); }
.akt-date { white-space: nowrap; font-weight: 600; }
.akt-date time { font-variant-numeric: tabular-nums; }
.akt-ical { display: inline-block; vertical-align: middle; margin-left: 6px; opacity: .85; }
.akt-ical:hover { opacity: 1; }
.akt-ical img { display: inline-block; width: 20px; height: 20px; }
.akt-time { white-space: nowrap; color: var(--muted); line-height: 1.7; }
.akt-time sup { font-size: .7em; }
.akt-closed { color: var(--danger); font-weight: 600; }
.akt-topic b a { color: var(--text); text-decoration: none; font-size: 1.05rem; }
.akt-topic b a:hover { color: var(--accent); text-decoration: underline; }
.akt-age { color: var(--muted); }
.akt-age-adult { color: #ffb3b3; }
.akt-meta { display: none; }
.akt-note { text-align: center; font-weight: 600; color: var(--accent-2); background: rgba(122, 167, 255, 0.06); }
.akt-btn { display: inline-block; margin: 4px 0 2px; padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #1a1205; font-weight: 700; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.akt-btn:hover { background: #ffd88f; color: #1a1205; }
.akt-badge { display: inline-block; margin: 4px 0 2px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid transparent; }
.akt-soldout { background: rgba(255, 122, 122, 0.14); border-color: rgba(255, 122, 122, 0.45); color: #ffb3b3; }
.akt-cancel { background: rgba(255, 122, 122, 0.22); border-color: var(--danger); color: #fff; }
.akt-ok { background: rgba(110, 231, 160, 0.12); border-color: rgba(110, 231, 160, 0.45); color: #a6f0c4; }
.akt-hint { font-size: .82rem; color: #ffc98a; white-space: nowrap; }
.akt-small { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.akt-first .akt-btn { box-shadow: 0 0 0 0 rgba(245, 196, 107, .7); animation: akt-pulse 2s infinite; }
@keyframes akt-pulse { 70% { box-shadow: 0 0 0 10px rgba(245, 196, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 196, 107, 0); } }
@media (prefers-reduced-motion: reduce) { .akt-first .akt-btn { animation: none; } }

/* Handy: jede Veranstaltung als Karte */
@media (max-width: 720px) {
  .akt-wrap { overflow: visible; }
  .akt-table, .akt-table tbody, .akt-table tr, .akt-table td, .akt-table th { display: block; width: 100%; }
  .akt-table thead { display: none; }
  .akt-table th.akt-month { padding: 26px 4px 10px; background: none; border: 0; font-size: .95rem; color: var(--accent); }
  .akt-table tr.akt-event {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date day" "topic topic" "time time";
    gap: 6px 12px; margin: 0 0 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  }
  .akt-table tr.akt-event:hover td { background: none; }
  .akt-table tr.akt-event td { padding: 0; border: 0; }
  .akt-table td.akt-day { grid-area: day; text-align: right; }
  .akt-table td.akt-date { grid-area: date; }
  .akt-table td.akt-topic { grid-area: topic; padding-top: 4px; }
  .akt-table td.akt-time { grid-area: time; white-space: normal; padding-top: 8px; border-top: 1px dashed var(--border); }
  .akt-table tr.akt-second { margin-top: -18px; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 1px dashed var(--border); grid-template-areas: "time time"; }
  .akt-table tr.akt-second td.akt-time { border-top: 0; padding-top: 0; }
  .akt-table td.akt-time::before, .akt-second td.akt-time::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
  .akt-table td.akt-time[data-label="Einlass"]::before { content: none; }
  .akt-table tr.akt-notice-row td { margin: 0 0 12px; border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); }
  .akt-time br { display: none; }
  .akt-time > * { margin-right: 6px; }
}

/* ---------- Veranstaltungs-Detailseite (verdetail.php) ---------- */
.ev-when { margin-bottom: 0; }
.ev-age { color: var(--muted); font-size: .92rem; margin-top: 1em; }
.event-description [itemprop="description"], .event-description > div { color: var(--text); }
.event-description img { max-width: 100%; height: auto; border-radius: 10px; margin: 1em 0; }
.ev-aside-title { font-size: 1.2rem; }
.ev-block { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.ev-block:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ev-label { margin: 0 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 600; }
.ev-cal { margin: 0; }
.ev-cal img { display: inline-block; vertical-align: middle; }
.ev-booking p { margin: 0 0 10px; }
.ev-btn { white-space: normal; text-align: center; padding: 10px 16px; font-size: .95rem; }
.ev-btn-sm { padding: 8px 14px; font-size: .88rem; }
.ev-links { color: var(--muted); }
.ev-past { color: #ffb3b3; }
.ev-past a { color: var(--accent); }

/* ---------- Nächste Veranstaltung auf der Startseite (nver2.php) ---------- */
.nver { display: grid; gap: 14px; }
.nver-label { margin: 0; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.nver .next-event { align-items: center; }
.nver .date-badge b { text-transform: uppercase; }
.nver-title { margin: 0 0 6px; font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
.nver-title a { color: var(--text); text-decoration: none; }
.nver-title a:hover { color: var(--accent); text-decoration: underline; }
.nver-when { margin: 0; color: var(--muted); line-height: 2; }
.nver-btn { margin-left: 8px; vertical-align: middle; }
@media (max-width: 560px) {
  .nver .next-event { grid-template-columns: auto 1fr; gap: 16px; }
  .nver .date-badge { width: 64px; }
  .nver .date-badge span { font-size: 1.5rem; }
  .nver-btn { margin: 6px 0 0; display: inline-block; }
}

/* ---------- "der Tour Guide" (Schnellnavigation in der Tour) ---------- */
.tour-guide-bar { position: sticky; top: 76px; z-index: 50; height: 0; display: flex; justify-content: flex-end; align-items: flex-start; }
.tour-guide { position: relative; margin-top: 12px; }
.tour-guide summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: #4682b4; color: #fff; font-weight: 600; font-size: .92rem; border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.tour-guide summary::-webkit-details-marker { display: none; }
.tour-guide summary:hover, .tour-guide[open] summary { background: #5aa7e5; }
.tour-guide-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  background: #0e1530; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.tour-guide-panel .ev-label { margin-top: 14px; }
.tour-guide-panel .ev-label:first-child { margin-top: 0; }
.tour-guide-panel .tour-tree { font-size: .95rem; }
.tour-guide-panel a[aria-current="page"] { color: var(--text); font-weight: 700; background: rgba(245, 196, 107, 0.18); border-color: var(--accent); border-radius: 6px; padding: 0 6px; }
@media (max-width: 720px) { .tour-guide-bar + .page-hero, .tour-guide-bar + .hero { padding-top: 72px; } }

/* Startseite: Projektor-Foto */
.hero-visual img.hero-projector { border-radius: 50%; aspect-ratio: 1; width: 100%; height: auto; object-fit: cover; object-position: 62% 58%; box-shadow: 0 0 90px rgba(122, 167, 255, 0.30); }
@media (max-width: 820px) { .hero-visual { max-width: 360px; } }

/* Veranstaltungsbeschreibungen (bes.php) & Archiv (akthist.php) */
.bes-list { display: grid; gap: 18px; }
.bes-item { max-width: none; scroll-margin-top: 90px; }
.bes-item:target { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(245, 196, 107, .35); }
.bes-title { margin: 0 0 4px; font-size: 1.3rem; }
.bes-title a { color: var(--text); text-decoration: none; }
.bes-title a:hover { color: var(--accent); text-decoration: underline; }
.bes-item .ev-when { color: var(--accent); font-size: .95rem; margin: 0 0 12px; }
.bes-text { color: var(--text); }
.bes-back { margin: 14px 0 0; font-size: .92rem; }
.akt-hist-notice { margin-bottom: 20px; }
.akt-table tr[id], .akt-topic a[id] { scroll-margin-top: 90px; }
#termine { scroll-margin-top: 90px; }

/* lange deutsche Wörter (z. B. "Veranstaltungsbeschreibungen") auf schmalen Bildschirmen umbrechen */
h1, h2, h3 { overflow-wrap: break-word; }
.nowrap { white-space: nowrap; }

/* ---------- Reservierung (/reservationpk.php) ---------- */
.res-card { max-width: 860px; margin: 0 auto; }
.res-card .notice { margin-bottom: 18px; }
.res-h { font-size: 1.3rem; }
.res-summary { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: 0 0 18px; line-height: 1.8; }
.res-warn { color: #ffc98a; }
.res-form { margin: 0; }
.res-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.res-table td { padding: 8px 10px 8px 0; vertical-align: middle; }
.res-table td:first-child { width: 190px; color: var(--muted); }
.res-form input[type="text"], .res-form input[type="email"], .res-form select {
  font: inherit; color: var(--text); background: #0b1126; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.res-form input[type="text"], .res-form input[type="email"] { width: 100%; max-width: 520px; }
.res-form select { min-width: 90px; }
.res-form input:focus, .res-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.res-captcha img { border-radius: 8px; background: #fff; max-width: 100%; }
.res-captcha a { font-size: .85rem; }
.res-check label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .93rem; color: var(--muted); }
.res-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.res-card input[type="submit"].btn, .res-card button.btn { margin-top: 8px; font-size: 1rem; }
.res-card .btn-ghost { margin-top: 8px; }
@media (max-width: 640px) {
  .res-table, .res-table tbody, .res-table tr, .res-table td { display: block; width: 100%; }
  .res-table td { padding: 4px 0; }
  .res-table td:first-child { width: auto; padding-top: 12px; }
  .res-table tr.res-captcha td:first-child { padding-top: 16px; }
}
/* jQuery-UI-Hinweisdialog im dunklen Design */
.ui-dialog.ui-widget.ui-widget-content { background: #0e1530; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font); }
.ui-dialog .ui-dialog-titlebar { background: var(--accent); color: #1a1205; border: 0; border-radius: 10px; }
.ui-dialog .ui-dialog-content { color: var(--text); }
.ui-dialog .ui-dialog-buttonpane { background: transparent; border-top: 1px solid var(--border); }
.ui-dialog .ui-dialog-buttonpane button { background: var(--accent); color: #1a1205; border: 0; border-radius: 999px; padding: 6px 18px; font-weight: 700; }
.res-summary { overflow-wrap: anywhere; }

/* Footer: Bild Sternwarte & Planetarium unten links (Oval mit Goldrand) */
.footer-brand { display: flex; gap: 22px; align-items: flex-start; }
.footer-pic { flex-shrink: 0; display: block; transition: transform .2s; }
.footer-pic:hover { transform: translateY(-2px); }
.footer-pic img { display: block; width: 110px; height: 193px; object-fit: cover; object-position: 50% 50%; border-radius: 50% / 34%; border: 2px solid rgba(245, 196, 107, 0.55); box-shadow: none; }
.footer-pic:hover img { border-color: var(--accent); }
@media (max-width: 760px) { .footer-pic img { width: 96px; height: 168px; } }
.akt-soon { background: rgba(122, 167, 255, 0.14); border-color: rgba(122, 167, 255, 0.5); color: #c4d6ff; }

/* Startseite: Schulgebäude als zarte Linienzeichnung im Hintergrund – nur ab 991 px Breite */
@media (min-width: 991px) {
  .hero-home { position: relative; isolation: isolate; }
  .hero-home::before {
    content: ""; position: absolute; z-index: -1; left: 4%; top: 0; bottom: 0; aspect-ratio: 334 / 451;
    background: url("../img/schule-linien.png") center / contain no-repeat;
    opacity: .08;   /* Stärke: .08 = dezent, .14 = deutlicher */
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 98%);
            mask-image: linear-gradient(to bottom, #000 60%, transparent 98%);
    pointer-events: none;
  }
}

/* Unterseiten: Einleitungstext darf die volle Inhaltsbreite nutzen */
.page-hero .lead { max-width: 60em; }

/* ---------- Inhaltsseiten aus der Tabelle "pages" (page.php) ---------- */
.pg-content { max-width: none; }
.pg-content > :first-child { margin-top: 0; }
.pg-content > :last-child { margin-bottom: 0; }
.pg-content h2 { font-size: 1.35rem; margin: 1.6em 0 .6em; }
.pg-content h3 { font-size: 1.15rem; margin: 1.4em 0 .5em; color: var(--accent); }
.pg-content h4 { font-size: 1rem; margin: 1.2em 0 .4em; }
.pg-content ul, .pg-content ol { padding-left: 1.3em; margin: 0 0 1em; display: grid; gap: 6px; }
.pg-content ul ul, .pg-content ol ol, .pg-content ul ol, .pg-content ol ul { margin: 6px 0 0; }
.pg-content a { overflow-wrap: anywhere; }
.pg-img { margin: 1.2em 0; }
.pg-img img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.pg-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 1.2em 0; }
.pg-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.pg-zoom { display: block; cursor: zoom-in; }
.pg-zoom:hover img { border-color: rgba(245, 196, 107, 0.6); }
.pg-cellimg { max-width: 160px; height: auto; border-radius: 8px; display: inline-block; vertical-align: middle; }

/* Tabellen im Text */
.pg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2em 0; border: 1px solid var(--border); border-radius: 12px; }
.pg-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.pg-table th, .pg-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.pg-table th { color: var(--accent); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; background: var(--surface); }
.pg-table tbody tr:last-child td, .pg-table tbody tr:last-child th { border-bottom: 0; }
.pg-table tbody tr:hover td { background: var(--surface); }
@media (max-width: 640px) {
  .pg-table-wrap:not(.pg-table-cards) .pg-table { min-width: 520px; }           /* ohne Kopfzeile: seitlich wischen */
  .pg-table-cards { border: 0; overflow: visible; }
  .pg-table-cards .pg-table thead { display: none; }
  .pg-table-cards .pg-table, .pg-table-cards .pg-table tbody, .pg-table-cards .pg-table tr, .pg-table-cards .pg-table td, .pg-table-cards .pg-table tbody th { display: block; width: 100%; }
  .pg-table-cards .pg-table tr { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 10px 14px; margin: 0 0 10px; }
  .pg-table-cards .pg-table td, .pg-table-cards .pg-table tbody th { border: 0; padding: 4px 0; }
  .pg-table-cards .pg-table td[data-label]::before { content: attr(data-label) ": "; color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
  .pg-table-cards .pg-table tbody tr:hover td { background: none; }
}

/* Kacheln der Unterseiten */
.pg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.pg-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s; }
.pg-card:hover { border-color: rgba(245, 196, 107, .5); transform: translateY(-2px); color: var(--text); }
.pg-card img, .pg-card .pg-noimg { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.pg-card .pg-noimg { display: grid; place-items: center; color: var(--accent); font-size: 2rem; }
.pg-card-body { display: flex; flex-direction: column; padding: 16px 18px 18px; flex: 1; }
.pg-card-title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.pg-count { display: block; margin-top: 2px; font-size: .78rem; color: var(--accent); font-weight: 600; }
.pg-card-text { display: block; margin: 8px 0 12px; color: var(--muted); font-size: .92rem; }
.pg-more { margin-top: auto; color: var(--accent); font-size: .88rem; font-weight: 600; }

/* Bild vergroessern */
.pg-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(3, 6, 18, .92); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pg-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pg-lightbox button { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.08); color: #fff; font-size: 1.4rem; cursor: pointer; }
.pg-preview-bar { padding-top: 20px; }
.pg-inactive { display: inline-block; align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(255, 122, 122, 0.16); border: 1px solid rgba(255, 122, 122, 0.5); color: #ffb3b3; }
.pg-static-lead .lead { margin-top: 0; }
.pg-static-lead h2 { margin-top: 0; }
.pg-static-lead h2 + .lead { margin-top: .5rem; }
.pg-static-b > .container { padding-left: 0; padding-right: 0; }
