/* ==========================================================================
   Grundschule Würmersheim – Stylesheet
   ========================================================================== */

/* Self-hosted fonts (no third-party requests, no cookies) */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fredoka-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-sans-variable.woff2") format("woff2");
}

:root {
  --green-900: #1f4d27;
  --green-800: #245a2d;
  --green-700: #2f7a3d;
  --green-600: #398a46;
  --green-500: #4ea058;
  --green-100: #e7f4e8;
  --green-50: #f3f9f2;

  --orange-600: #ff6600;
  --orange-500: #ff8433;
  --orange-100: #fff1e2;

  --ink-900: #22291e;
  --ink-700: #46503f;
  --ink-500: #6c7663;

  --paper: #fbfaf5;
  --paper-alt: #f2f0e6;
  --white: #ffffff;

  --shadow-sm: 0 4px 14px rgba(31, 77, 39, 0.08);
  --shadow-md: 0 12px 32px rgba(31, 77, 39, 0.14);
  --shadow-lg: 0 24px 60px rgba(31, 77, 39, 0.18);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --max-width: 1180px;
  --header-height: 84px;

  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-700);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--orange-600);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; }
li { list-style: none; }

table {
  border-collapse: collapse;
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--orange-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green-900);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--orange-600);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #e65c00;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--green-100);
  color: var(--green-800);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--green-700);
  color: var(--white);
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(251, 250, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 77, 39, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--green-900);
  line-height: 1.15;
}

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--green-100);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  margin-inline: auto;
  background: var(--green-800);
  border-radius: 3px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  row-gap: 2px;
}

.primary-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: var(--green-100);
  color: var(--green-800);
}

.primary-nav a[aria-current="page"] {
  background: var(--green-700);
  color: var(--white);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-height));
    background: var(--paper);
    padding: 16px 20px 24px;
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .primary-nav ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .primary-nav a {
    padding: 12px 14px;
    font-size: 0.98rem;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .primary-nav ul {
    grid-template-columns: 1fr;
  }

  .primary-nav a {
    text-align: left;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 43, 24, 0.35) 0%, rgba(16, 38, 20, 0.78) 100%);
}

.hero-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 120px 24px 64px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.3em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.hero-lead {
  font-size: 1.15rem;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* Small page hero (subpages) */
.page-hero {
  min-height: 40vh;
  align-items: center;
}

.page-hero .hero-inner {
  padding: 150px 24px 56px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
  color: var(--white);
}

/* ==========================================================================
   Sections & layout helpers
   ========================================================================== */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--paper-alt);
}

.section-green {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.9);
}

.section-green h2 {
  color: var(--white);
}

.section-head {
  max-width: 700px;
  margin-bottom: 40px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--orange-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.lead {
  font-size: 1.1rem;
  color: var(--ink-700);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31, 77, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card .icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
  margin-bottom: 16px;
}

.card .icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Info / fact strip */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -64px;
  position: relative;
  z-index: 5;
}

@media (max-width: 900px) {
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
  .fact-strip { margin-top: -48px; }
}

.fact-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.fact-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--green-800);
}

.fact-card span {
  font-size: 0.88rem;
  color: var(--ink-500);
}

/* ---- Two column layout ---- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

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

.split img,
.split .media-frame {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.media-frame {
  overflow: hidden;
}

.media-frame img {
  border-radius: 0;
  box-shadow: none;
}

/* ---- Lists with check / dot markers ---- */
.tick-list li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  align-items: flex-start;
}

.tick-list li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--green-100);
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232f7a3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 10 8 14 16 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

/* ---- Timeline (Ferien) ---- */
.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--orange-600);
}

@media (max-width: 640px) {
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.timeline-item .date {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-800);
}

.timeline-item .date small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink-500);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Table (Team) ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

.data-table {
  min-width: 560px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--paper-alt);
}

.data-table th {
  background: var(--green-900);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background: var(--paper-alt);
}

/* ---- Person / staff card ---- */
.person-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.person-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---- Card with photo ---- */
.card-photo img {
  width: calc(100% + 56px);
  margin: -28px -28px 18px;
  max-width: none;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ---- Small photo gallery grid ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.photo-grid figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--ink-500);
  text-align: center;
}

@media (max-width: 620px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- Callout / banner ---- */
.callout {
  display: flex;
  gap: 24px;
  align-items: center;
  background: linear-gradient(120deg, var(--green-700), var(--green-900));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.callout img {
  width: 120px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 8px;
}

@media (max-width: 700px) {
  .callout {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Contact block ---- */
.contact-list {
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-list .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-list .icon svg {
  width: 20px;
  height: 20px;
}

/* ---- Map ---- */
/* ---- Alert / note box ---- */
.note-box {
  background: var(--orange-100);
  border: 1px solid rgba(255, 102, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  color: var(--ink-700);
}

.note-box strong {
  color: var(--orange-600);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.82);
  padding-top: 56px;
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
}

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

@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-col h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col p, .footer-col a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--orange-500);
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-logo {
  width: 64px;
  margin-bottom: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 24px;
}

.footer-bottom .container {
  max-width: var(--max-width);
  padding: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-bottom a:hover {
  color: var(--orange-500);
}

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-500); }
