/* realschule-hittfeld.de – Nachbau des Layouts der alten Schul-Homepage (Stand 2016).
   Eigenes CSS, keine Dateien der ursprünglichen Seite. Schrift: Raleway (SIL OFL, fonts/OFL.txt). */

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/raleway-latin-600.woff2") format("woff2");
}

:root {
  --bg: #4c5649;
  --panel: #4a5448;
  --green: #6fa86a;
  --green-dark: #4f7f4b;
  --green-text: #2f5a2c;
  --box: #f6f6f6;
  --text: #000;
  --muted: #555;
  --shadow: 0 3px 4px rgba(0, 0, 0, .45);
  --body-font: Tahoma, Verdana, Segoe, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  padding: 24px 16px 40px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.6;
}

.page { max-width: 1000px; margin: 0 auto; }

a { color: var(--green-text); }
a:hover { color: var(--green-dark); }

/* ---------- Kopfbereich („Eyecatcher“) ---------- */
.eyecatcher {
  background: var(--green);
  padding: 10px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
  min-height: 300px;
}

.welcome {
  margin: 0;
  padding: 28px 24px;
  align-self: end;
  font-family: "Raleway", var(--body-font);
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 50px);
  line-height: 1.12;
  color: #fff;
}

.welcome a { color: inherit; text-decoration: none; }

/* Unterseiten: niedrigerer Kopf */
.compact .stage { min-height: 170px; }
.compact .welcome { font-size: clamp(26px, 3.6vw, 36px); padding: 20px 24px; }
.compact .greeting { font-size: clamp(22px, 2.8vw, 30px); padding: 20px 24px; }

.greeting {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
  background: #2f4630;
  border-left: 10px solid var(--green);
  color: #fff;
  font-family: "Raleway", var(--body-font);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  text-align: center;
}

/* ---------- Navigation ---------- */
.nav {
  margin: 20px 0 26px;
  background: var(--green);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li { border-right: 1px solid var(--green-dark); }

.nav a {
  display: block;
  padding: 7px 9px;
  font-weight: bold;
  font-size: 15px;
  color: #000;
  text-decoration: none;
}

.nav a:hover { background: #82b77d; }
.nav a[aria-current="page"] { background: #82b77d; }

/* Untermenüs: nur mit Maus/Trackpad als Aufklappmenü, auf Touchgeräten ausgeblendet
   (dort führen die Seiten selbst über „Auf dieser Seite“ zu den Abschnitten). */
.nav .has-sub { position: relative; }
.nav .has-sub > ul { display: none; }

@media (hover: hover) and (min-width: 721px) {
  .nav .has-sub > ul {
    position: absolute;
    top: 100%;
    left: -1px;
    z-index: 10;
    display: none;
    flex-direction: column;
    min-width: 230px;
    background: var(--green);
    border: 1px solid var(--green-dark);
    border-radius: 0 0 4px 4px;
    box-shadow: var(--shadow);
  }
  .nav .has-sub:hover > ul,
  .nav .has-sub:focus-within > ul { display: flex; }
  .nav .has-sub > ul li { border-right: 0; border-top: 1px solid var(--green-dark); }
  .nav .has-sub > ul a { font-weight: normal; }
}

/* ---------- Inhaltsboxen ---------- */
.box {
  background: var(--box);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 22px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
}

.columns > p {
  margin: 0;
  font-weight: bold;
}

.columns > p + p {
  border-left: 1px solid #ddd;
  padding-left: 36px;
}

.box h1,
.box h2 {
  margin: 0 0 10px;
  font-family: var(--body-font);
  font-weight: bold;
  color: var(--green-text);
  line-height: 1.3;
}

.box h1 { font-size: 26px; }
.box h2 { font-size: 21px; margin-top: 26px; }
.box h2:first-child { margin-top: 0; }
.box h3 { font-size: 17px; margin: 18px 0 4px; }

.archive-note {
  margin: 0 0 18px;
  padding: 8px 12px;
  background: #e7efe6;
  border-left: 4px solid var(--green);
  color: var(--muted);
  font-size: 14px;
}

.strong p,
.strong li { font-weight: bold; }

.list {
  padding-left: 22px;
  list-style: none;
}

.list li { position: relative; }

.list li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: .55em;
  width: 9px;
  height: 9px;
  background: var(--green);
  border: 1px solid var(--green-dark);
}

.list p { margin: 4px 0; }

.prose p,
.prose li { font-size: 16px; }

.muted { color: var(--muted); font-size: 14px; }

/* „Auf dieser Seite“ */
.toc {
  margin: 0 0 20px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #dde6dc;
  border-radius: 4px;
  font-size: 15px;
}
.toc strong { display: block; margin-bottom: 4px; }
.toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Abschnitte mit Sprungmarke: nicht unter dem Fensterrand kleben */
[id] { scroll-margin-top: 16px; }

/* Chronik */
.chronik { list-style: none; padding: 0; margin: 0; }
.chronik li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #e3e3e3;
}
.chronik li:last-child { border-bottom: 0; }
.chronik b { color: var(--green-text); }

.note {
  margin: 14px 0;
  padding: 8px 12px;
  background: #fff8e1;
  border-left: 4px solid #d9b44a;
  font-size: 15px;
}

.box h2 + h3 { margin-top: 8px; }

/* Tabelle der Buslinien */
.lines { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
.lines th, .lines td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
.lines th { background: #e7efe6; color: var(--green-text); }
.lines td:first-child { width: 70px; font-weight: bold; color: var(--green-text); }

/* ---------- Fußleiste ---------- */
.common {
  margin-top: 26px;
  background: var(--green);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.common ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 8px 18px;
  list-style: none;
}

.common a {
  display: block;
  padding: 4px 0;
  font-weight: bold;
  font-size: 19px;
  color: #fff;
  text-decoration: none;
}

.common a:hover { text-decoration: underline; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 720px) {
  body { padding: 12px 16px 28px; }
  .stage { grid-template-columns: 1fr; min-height: 0; }
  .welcome { padding: 22px 18px 14px; }
  .greeting { border-left: 0; border-top: 10px solid var(--green); padding: 26px 18px; }
  .columns { grid-template-columns: 1fr; }
  .columns > p + p { border-left: 0; padding-left: 0; padding-top: 14px; margin-top: 14px; border-top: 1px solid #ddd; }
  .nav a { padding: 6px 9px; font-size: 14px; }
  .compact .stage { min-height: 0; }
  .chronik li { grid-template-columns: 1fr; gap: 2px; }
  .common ul { grid-template-columns: 1fr 1fr; }
  .common a { font-size: 16px; }
}
