/* ============================================================
   Grundschule am Jakobsberg — Shared styles
   ============================================================ */

:root {
  --bg: oklch(0.972 0.012 85);
  --bg-soft: oklch(0.945 0.018 80);
  --bg-card: oklch(0.99 0.008 85);
  --fg: oklch(0.22 0.018 240);
  --fg-soft: oklch(0.45 0.018 240);
  --fg-muted: oklch(0.62 0.015 240);
  --line: oklch(0.88 0.012 80);
  --line-strong: oklch(0.78 0.014 80);
  --primary: oklch(0.42 0.06 200);
  --primary-soft: oklch(0.92 0.02 200);
  --accent: oklch(0.65 0.14 235);
  --accent-soft: oklch(0.94 0.04 235);
  --gold: oklch(0.78 0.10 85);
  --leaf: oklch(0.55 0.08 145);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

.icn { width: 16px; height: 16px; stroke-width: 2; }

/* ---------- BUTTONS ---------- */
.btn {
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: color-mix(in oklab, var(--primary) 80%, black); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-strong); }
.btn.ghost.on-dark { color: white; border-color: rgba(255,255,255,0.4); }
.btn.ghost.on-dark:hover { background: rgba(255,255,255,0.1); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- TOP STRIP ---------- */
.topstrip { background: var(--fg); color: var(--bg); font-size: 13px; }
.topstrip .inner {
  display: flex; justify-content: space-between; align-items: center;
  height: 36px; gap: 24px;
}
.topstrip .left { display: flex; gap: 22px; opacity: 0.85; }
.topstrip .right { display: flex; gap: 22px; align-items: center; }
.topstrip a:hover { color: var(--gold); }

/* ---------- HEADER & NAV ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}
.site .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  padding: 4px;
  position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.brand .mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand .word { line-height: 1.1; }
.brand .word .name {
  font-family: 'Newsreader', serif;
  font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em;
}
.brand .word .sub {
  font-size: 12px; color: var(--fg-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}

nav.main { display: flex; gap: 1px; align-items: center; flex-wrap: nowrap; }
nav.main > .item { position: relative; }nav.main > .item > a, nav.main > .item > button {
  padding: 9px 11px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  color: var(--fg-soft);
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
nav.main > .item > a:hover, nav.main > .item > button:hover { background: var(--bg-soft); color: var(--fg); }
nav.main > .item > a.active, nav.main > .item.active > a, nav.main > .item.active > button { color: var(--fg); background: var(--primary-soft); }
nav.main > .item > button .caret { width: 10px; height: 10px; }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 18px 40px -20px rgba(20,30,40,0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  z-index: 60;
}
nav.main > .item:hover > .dropdown,
nav.main > .item:focus-within > .dropdown,
nav.main > .item.open > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14.5px;
  border-radius: 8px;
  color: var(--fg-soft);
}
.dropdown a:hover { background: var(--bg-soft); color: var(--fg); }
.dropdown a.active { background: var(--primary-soft); color: var(--fg); }

/* ---------- HAMBURGER + MOBILE NAV ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  background: transparent; border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 10px;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  touch-action: manipulation;
}
.nav-toggle:hover { background: var(--bg-soft); }
.nav-toggle:active { background: var(--bg-soft); }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
  pointer-events: none;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20,30,40,0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s;
  z-index: 100;
  overflow-y: auto;
}
.mobile-nav[aria-hidden="false"] { opacity: 1; visibility: visible; }
.mobile-nav-inner {
  background: var(--bg);
  padding: 84px 24px 40px;
  min-height: 100%;
  max-width: 480px;
  margin-left: auto;
  border-left: 1px solid var(--line);
  transform: translateX(40px);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.mobile-nav[aria-hidden="false"] .mobile-nav-inner { transform: translateX(0); }
.mobile-nav .m-link, .mobile-nav .m-group-label {
  display: block;
  font-family: 'Newsreader', serif;
  font-size: 22px;
  font-weight: 500;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
}
.mobile-nav .m-link.active { color: var(--primary); }
.mobile-nav .m-group { border-bottom: 1px solid var(--line); }
.mobile-nav .m-group .m-group-label {
  border-bottom: 0;
  padding-bottom: 4px;
}
.mobile-nav .m-group.active .m-group-label { color: var(--primary); }
.mobile-nav .m-sub {
  display: block;
  font-size: 15px;
  padding: 10px 4px 10px 20px;
  color: var(--fg-soft);
  border-top: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.mobile-nav .m-group > .m-sub:first-of-type { border-top: 1px solid color-mix(in oklab, var(--line) 60%, transparent); margin-top: 4px; }
.mobile-nav .m-group > .m-sub:last-child { padding-bottom: 14px; }
.mobile-nav .m-sub.active { color: var(--primary); font-weight: 600; }
body.nav-open { overflow: hidden; }

/* ---------- PAGE HEADER ---------- */
.page-head {
  padding: 64px 0 56px;
  background:
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb .sep { opacity: 0.5; }
.page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}
.page-head .eyebrow::before {
  content: ""; width: 28px; height: 1.5px; background: var(--accent);
}
.page-head h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  max-width: 20ch;
  margin-bottom: 18px;
}
.page-head .lead {
  font-size: 19px;
  color: var(--fg-soft);
  max-width: 60ch;
}

/* ---------- PAGE LAYOUT ---------- */
.page {
  padding: 64px 0 96px;
}
.page-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}
.page-grid.no-side { grid-template-columns: 1fr; max-width: 920px; margin: 0 auto; }

aside.side {
  position: sticky;
  top: 110px;
}
aside.side .label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 14px;
}
aside.side ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 2px;
  border-left: 1px solid var(--line);
}
aside.side ul a {
  display: block;
  padding: 10px 16px;
  font-size: 15px;
  color: var(--fg-soft);
  margin-left: -1px;
  border-left: 1px solid transparent;
}
aside.side ul a:hover { color: var(--fg); }
aside.side ul a.active {
  color: var(--fg);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* ---------- PROSE (article body) ---------- */
.prose {
  max-width: 68ch;
  color: var(--fg);
  font-size: 17px;
  line-height: 1.65;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: 'Newsreader', serif;
  font-size: 32px; line-height: 1.15;
  margin-top: 2.2em; margin-bottom: 0.6em;
  font-weight: 500;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: 'Newsreader', serif;
  font-size: 22px; line-height: 1.25;
  margin-top: 1.8em; margin-bottom: 0.4em;
  font-weight: 500;
}
.prose .lead-p {
  font-size: 20px;
  color: var(--fg-soft);
  line-height: 1.5;
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 400;
}
.prose a { color: var(--primary); border-bottom: 1px solid var(--primary-soft); }
.prose a:hover { color: color-mix(in oklab, var(--primary) 70%, black); border-color: var(--primary); }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul li, .prose ol li { margin-top: 0.3em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 24px;
  border-left: 3px solid var(--accent);
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 21px;
  color: var(--fg-soft);
  line-height: 1.4;
}
.prose figure { margin: 1.8em 0; }
.prose figure img { border-radius: 14px; }
.prose figure figcaption {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 8px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 1.6em 0;
}
.prose table th, .prose table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose table th {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  border-bottom-color: var(--line-strong);
}
.prose table tr:hover td { background: var(--bg-soft); }

/* Cards / call-outs reusable */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 1.6em 0;
}
.callout .k {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.callout h3 {
  font-family: 'Newsreader', serif;
  font-size: 22px; font-weight: 500;
  margin: 0 0 6px;
}
.callout p { margin: 4px 0 0; color: var(--fg-soft); font-size: 15px; }
.callout p a { color: var(--primary); }

/* Bigger info cards */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 30px;
  margin: 1.6em 0;
}
.info-card h3 {
  font-family: 'Newsreader', serif;
  font-size: 24px; font-weight: 500;
  margin-bottom: 14px;
}
.info-card .grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 22px;
}
.info-card .grid .k {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.info-card .grid .v {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.info-card .grid > :nth-child(1), .info-card .grid > :nth-child(2) { border-top: 0; padding-top: 0; }

/* ---------- TEAM PAGE GRID ---------- */
.team-section { margin: 2.4em 0; }
.classes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 1.5em 0;
}
.class-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.class-card .num {
  font-family: 'Newsreader', serif;
  font-size: 28px;
  color: var(--primary);
  font-weight: 500;
  line-height: 1;
  width: 44px; flex-shrink: 0;
}
.class-card .who h4 {
  font-family: 'Newsreader', serif;
  font-size: 18px; font-weight: 500;
}
.class-card .who p {
  font-size: 13px; color: var(--fg-soft);
  margin: 2px 0 0;
}
.class-card .who a {
  font-size: 12px;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
  display: inline-block;
}

/* Sprechzeiten compact table */
.sprechzeiten {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 2em;
}
.sprechzeiten th, .sprechzeiten td {
  padding: 10px 14px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.sprechzeiten th {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  border-bottom-color: var(--line-strong);
}
.sprechzeiten td:first-child {
  font-family: 'Newsreader', serif;
  font-size: 16px;
  color: var(--primary);
  font-weight: 500;
  width: 64px;
}
.sprechzeiten td .name { font-weight: 500; }
.sprechzeiten td .day { color: var(--fg-soft); font-size: 13px; }

/* ---------- TIMETABLE (Unterrichtszeiten) ---------- */
.timetable {
  display: grid;
  grid-template-columns: 140px 1fr 180px;
  gap: 0;
  border-top: 1px solid var(--line);
  margin: 1.5em 0;
}
.timetable > div {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.timetable .tt-period {
  font-family: 'Newsreader', serif;
  font-size: 18px;
  color: var(--primary);
  font-weight: 500;
}
.timetable .tt-name {
  font-size: 15px;
}
.timetable .tt-name small {
  display: block;
  font-size: 12px;
  color: var(--fg-soft);
  margin-top: 2px;
}
.timetable .tt-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  color: var(--fg-soft);
  justify-content: flex-end;
}
.timetable .break {
  background: var(--bg-soft);
}
.timetable .break .tt-period {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}
.timetable .break .tt-name {
  color: var(--fg-soft);
  font-style: italic;
}

/* End-time cards per Jahrgang */
.end-times {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 1.6em 0;
}
.end-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 20px;
}
.end-card .y {
  font-family: 'Newsreader', serif;
  font-size: 28px;
  color: var(--primary);
  font-weight: 500;
  line-height: 1;
}
.end-card .lbl {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin: 6px 0 14px;
}
.end-card .time {
  font-size: 14px;
  color: var(--fg);
}
.end-card .time strong { font-weight: 600; }

/* ---------- FOOTER ---------- */
footer.site {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 64px 0 36px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.foot h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin: 0 0 18px;
}
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot ul a { font-size: 15px; color: var(--fg-soft); }
.foot ul a:hover { color: var(--fg); }
.foot .blurb { font-size: 14px; color: var(--fg-soft); max-width: 36ch; margin-top: 14px; }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--fg-muted);
}
.foot-bottom .links { display: flex; gap: 22px; }

/* ---------- Empty/Stub note ---------- */
.stub {
  background: var(--bg-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: var(--fg-soft);
}
.stub h3 {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  nav.main { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 980px) {
  .page-grid { grid-template-columns: 1fr; gap: 32px; }
  aside.side { position: static; }
  aside.side ul {
    display: flex; flex-wrap: wrap; gap: 6px;
    border-left: 0;
    padding: 0;
  }
  aside.side ul a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    margin: 0;
  }
  aside.side ul a.active {
    border-color: var(--primary);
    background: var(--primary-soft);
  }
  .classes-grid { grid-template-columns: 1fr; }
  .timetable { grid-template-columns: 100px 1fr; }
  .timetable .tt-time { grid-column: 2; padding-top: 0; padding-bottom: 16px; justify-content: flex-start; }
  .timetable .tt-period { padding-bottom: 4px; }
  .end-times { grid-template-columns: repeat(2, 1fr); }
  nav.main { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .container-narrow { padding: 0 20px; }
  .page-head { padding: 40px 0 36px; }
  .page-head h1 { font-size: 36px; }
  .page-head .lead { font-size: 17px; }
  .page { padding: 40px 0 64px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 26px; }
  .prose h3 { font-size: 19px; }
  .info-card { padding: 22px; }
  .info-card .grid { grid-template-columns: 1fr; gap: 0; }
  .info-card .grid .k { padding-bottom: 0; border-top: 1px solid var(--line); }
  .info-card .grid .v { padding-top: 0; border-top: 0; padding-bottom: 8px; }
  .info-card .grid > :nth-child(2) { border-top: 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .end-times { grid-template-columns: 1fr 1fr; }
  .timetable .tt-name { padding-top: 6px; padding-bottom: 4px; }
  .site .inner { height: 72px; }
  .brand .mark { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
  .brand .word .name { font-size: 17px; }
  .brand .word .sub { font-size: 11px; }
  .topstrip .left { display: none; }
  .topstrip .inner { height: 32px; justify-content: flex-end; }
  .mobile-nav-inner { padding: 72px 20px 32px; }
}

/* CMS-Slug- und Pubdate-Felder: nur im Edit-Modus sichtbar (siehe cms/editor.css) */
.cms-slug, .cms-pubdate { display: none; }
