/*
Theme Name: KGS Gutnickstraße
Theme URI: https://www.kgs-gutnickstrasse.de
Author: Flo
Description: Individuelles Theme für die Katholische Grundschule Gutnickstraße, Köln Roggendorf-Thenhoven.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: kgs
*/

/* =========================================================
   KGS Gutnickstraße – Shared Stylesheet
   Change a value in :root once → updates the whole site.
   ========================================================= */

:root {
  /* --- Colors (baby blue + yellow). --blue-700 = main brand color --- */
  --blue-900: #0B3A5C;
  --blue-800: #12547F;
  --blue-700: #5AAEDB;
  --blue-500: #86C5E8;
  --blue-200: #CDE8F6;
  --blue-100: #EAF5FB;

  --yellow-500: #FAC775;
  --yellow-800: #633806;
  --yellow-900: #412402;

  --green-bg: #EAF3DE;   --green-text: #3B6D11;
  --red-bg:   #FCEBEB;   --red-text:   #A32D2D;
  --teal-bg:  #E1F5EE;   --teal-text:  #0F6E56;

  --page-bg:  #F1F5F9;
  --white:    #ffffff;
  --text:     #1c1c1c;
  --text-soft:#5f5e5a;
  --border:   #e2e5ea;

  /* --- Spacing & shape --- */
  --radius:   12px;
  --radius-sm: 6px;
  --gap:      12px;
  --pad:      20px;

  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* ===== Reset / base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Centered column; fills width on phones */
.site {
  max-width: 720px;
  margin: 0 auto;
  background: var(--page-bg);
  min-height: 100vh;
}

/* ===== HEADER + NAVIGATION ===== */
.header {
  background: var(--blue-700);
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__brand { display: flex; align-items: center; gap: 12px; }
.header__logo {
  height: 44px; width: auto;
  display: block;
}
.header__logo img { height: 44px; width: auto; display: block; }
/* Dark navy text (not white) so it stays readable on baby blue */
.header__title { color: var(--blue-900); font-weight: 700; font-size: 15px; line-height: 1.25; }
.header__subtitle { color: var(--blue-800); font-size: 12px; }
.header__burger { color: var(--blue-900); font-size: 26px; background: none; border: 0; cursor: pointer; display: none; }

.nav {
  background: var(--blue-100);
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 8px var(--pad);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.nav > ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; width: 100%; }
.nav li { position: relative; }
.nav a {
  font-size: 14px; color: var(--blue-800);
  padding: 6px 10px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 4px;
}
.nav a:hover { background: var(--blue-200); color: var(--blue-900); }
.nav a.is-active { background: var(--blue-200); color: var(--blue-900); font-weight: 600; }

/* Dropdown submenu */
.nav .has-sub > .submenu {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 20;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px;
  min-width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,.10);
  list-style: none;
}
.nav .has-sub:hover > .submenu { display: block; }
.nav .submenu a { display: block; width: 100%; font-size: 13px; padding: 8px 10px; }
.nav .caret { font-size: 14px; opacity: .7; }

/* Mobile menu (submenu-open class is toggled by script.js) */
@media (max-width: 640px) {
  .header__burger { display: block; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav > ul { flex-direction: column; gap: 2px; }
  .nav .has-sub > .submenu {
    position: static; box-shadow: none; border: 0;
    padding: 0 0 0 16px; min-width: 0; display: none;
  }
  .nav .has-sub.submenu-open > .submenu { display: block; }
  .nav .has-sub:hover > .submenu { display: none; }
  .nav .has-sub.submenu-open:hover > .submenu { display: block; }
}

/* ===== HERO ===== */
.hero { padding: 24px var(--pad) 16px; text-align: center; }
.hero h1 { font-size: 24px; color: var(--blue-900); font-weight: 600; margin-bottom: 6px; }
.hero p  { font-size: 15px; color: var(--blue-700); max-width: 460px; margin: 0 auto; }

/* ===== Shared section + card ===== */
.section { padding: 0 var(--pad); }
.section__title {
  font-size: 18px; font-weight: 600; margin: 20px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section__title .i { font-size: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ===== KRANKMELDUNG banner ===== */
.krank {
  background: var(--yellow-500);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  margin: 0 var(--pad) 16px;
}
.krank__icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--yellow-800);
  display: flex; align-items: center; justify-content: center;
  color: var(--yellow-500); font-size: 24px; flex-shrink: 0;
}
.krank__text { flex: 1; }
.krank__text b { font-size: 16px; color: var(--yellow-900); font-weight: 600; }
.krank__text p { font-size: 13px; color: var(--yellow-800); }
.krank__phone { text-align: right; flex-shrink: 0; }
.krank__phone a { font-size: 16px; font-weight: 600; color: var(--yellow-900); display: block; }

/* ===== Quick action buttons ===== */
.actions { display: flex; gap: 10px; margin-bottom: 8px; }
.action {
  flex: 1; border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.action--primary { background: var(--blue-800); color: #fff; }
.action--primary .sub { color: var(--blue-200); }
.action--ghost { background: #fff; border: 1px solid var(--blue-500); color: var(--blue-800); }
.action--ghost .sub { color: var(--blue-700); }
.action .i { font-size: 20px; }
.action b { font-size: 14px; font-weight: 600; display: block; }
.action .sub { font-size: 12px; }

/* ===== Latest Elternbrief card ===== */
.brief {
  background: var(--blue-100);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; gap: 14px; align-items: center;
}
.brief__icon {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  background: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
}
.brief__body { flex: 1; }
.brief__label { font-size: 11px; color: var(--blue-800); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.brief__title { font-size: 15px; font-weight: 600; color: var(--blue-900); margin: 2px 0; }
.brief__date { font-size: 12px; color: var(--text-soft); }
.brief__arrow { color: var(--blue-700); font-size: 20px; flex-shrink: 0; }
.brief__archive { font-size: 13px; color: var(--blue-800); text-decoration: underline; display: inline-block; margin-top: 10px; }

/* ===== News cards ===== */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.news__date {
  font-size: 11px; display: inline-block;
  padding: 2px 8px; border-radius: var(--radius-sm); margin-bottom: 8px;
}
.news__date--red   { color: var(--red-text);   background: var(--red-bg); }
.news__date--green { color: var(--green-text); background: var(--green-bg); }
.news__date--blue  { color: var(--blue-800);   background: var(--blue-100); }
.news h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.news p  { font-size: 13px; color: var(--text-soft); }

/* ===== Termine list ===== */
.termine__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.badge-auto {
  font-size: 11px; color: var(--teal-text); background: var(--teal-bg);
  padding: 3px 8px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 4px;
}
.termin {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.termin:last-child { border-bottom: 0; }
.termin__date { font-size: 13px; color: var(--blue-700); font-weight: 600; min-width: 100px; }
.termin__label { font-size: 13px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--blue-800);
  padding: 18px var(--pad);
  color: #CDE8F6;
  font-size: 12px;
  margin-top: 20px;
}
.footer a { color: #fff; text-decoration: underline; }
.footer a:hover { color: var(--yellow-500); }

/* ===== Responsive (phones) ===== */
@media (max-width: 520px) {
  .news-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .krank { flex-wrap: wrap; }
  .krank__phone { text-align: left; }
}

/* ===== Generic content pages (Schule, Eltern, ...) ===== */
.content { padding: 8px var(--pad) var(--pad); }
.content h2 { font-size: 20px; color: var(--blue-900); margin: 20px 0 10px; font-weight: 600; }
.content h3 { font-size: 16px; color: var(--blue-800); margin: 16px 0 8px; font-weight: 600; }
.content p  { font-size: 15px; margin-bottom: 12px; }
.content ul { margin: 0 0 12px 20px; }
.content li { font-size: 15px; margin-bottom: 6px; }

/* ===== Breadcrumb + page heading ===== */
.breadcrumb { padding: 12px var(--pad) 0; font-size: 13px; color: var(--text-soft); }
.breadcrumb a { color: var(--blue-700); }
.breadcrumb a:hover { text-decoration: underline; }
.page-head { padding: 6px var(--pad) 0; }
.page-head h1 { font-size: 24px; color: var(--blue-900); font-weight: 700; }
.page-head p  { font-size: 15px; color: var(--text-soft); margin-top: 4px; }

/* ===== Team page ===== */
.team-group { margin-bottom: 16px; }
.team-group__label {
  font-size: 13px; font-weight: 600; color: var(--blue-800);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px;
}
.team-names {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.team-names span {
  background: var(--blue-100); color: var(--blue-900);
  font-size: 13px; padding: 5px 10px; border-radius: var(--radius-sm);
}
.team-lead {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.team-lead .card {
  flex: 1; min-width: 160px;
}
.team-lead__role { font-size: 12px; color: var(--blue-700); font-weight: 600; }
.team-lead__name { font-size: 16px; color: var(--blue-900); font-weight: 600; margin-top: 2px; }

/* ===== Link list (section landing pages) ===== */
.link-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.link-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.link-row:hover { border-color: var(--blue-200); box-shadow: 0 6px 16px rgba(18,84,127,.08); }
.link-row > i:first-child {
  font-size: 22px; color: var(--blue-700);
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--blue-100); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.link-row span { flex: 1; font-size: 13px; color: var(--text-soft); display: flex; flex-direction: column; }
.link-row span b { font-size: 15px; color: var(--blue-900); font-weight: 600; margin-bottom: 1px; }
.link-row .arr { color: var(--blue-500); font-size: 18px; flex-shrink: 0; }

/* ===== Info/contact boxes & buttons on inner pages ===== */
.info-box {
  background: var(--blue-100); border: 1px solid var(--blue-200);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.info-box b { color: var(--blue-900); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-800); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; margin: 4px 0;
}
.btn:hover { background: var(--blue-900); }
.btn--ghost { background: #fff; color: var(--blue-800); border: 1px solid var(--blue-500); }

/* Note box for content that still needs the school's input */
.todo-note {
  background: #FFF7E6; border: 1px dashed #E0A93B;
  color: #7A5008; font-size: 13px;
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0;
}

/* ===== Schul-ABC page ===== */
.abc-search {
  width: 100%; padding: 12px 16px; font-size: 15px;
  border: 1px solid var(--blue-200); border-radius: var(--radius);
  margin-bottom: 8px; font-family: inherit;
}
.abc-search:focus { outline: 2px solid var(--blue-500); border-color: transparent; }
.abc-hint { font-size: 12px; color: var(--text-soft); margin-bottom: 16px; }
.abc-entry {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
}
.abc-entry h3 {
  font-size: 15px; color: var(--blue-900); font-weight: 600;
  margin: 0 0 4px; display: flex; align-items: center; gap: 8px;
}
.abc-entry h3 .letter {
  background: var(--blue-100); color: var(--blue-700);
  width: 26px; height: 26px; border-radius: 6px; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.abc-entry p { font-size: 14px; color: var(--text); margin: 0; line-height: 1.55; }
.abc-entry.is-hidden { display: none; }
.abc-noresult { font-size: 14px; color: var(--text-soft); padding: 12px; text-align: center; display: none; }

/* ===== Hero image (homepage) ===== */
.hero-img {
  position: relative;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 var(--pad) 16px;
  display: flex; align-items: flex-end;
  /* Placeholder look until a real photo is dropped in.
     To use a real photo: set background to url('img/hero.jpg')
     center/cover and keep the overlay below for text contrast. */
  background:
    linear-gradient(160deg, var(--blue-700), var(--blue-800));
}
.hero-img__ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: rgba(255,255,255,.55); font-size: 13px;
}
.hero-img__ph i { font-size: 34px; }
/* Dark gradient at the bottom so white text stays readable on any photo */
.hero-img__overlay {
  position: relative; z-index: 2; width: 100%;
  padding: 20px;
  background: linear-gradient(transparent, rgba(4,44,83,.75));
}
.hero-img__overlay h1 { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.hero-img__overlay p  { color: #EAF5FB; font-size: 14px; }

/* Generic image slot for content pages */
.img-slot {
  position: relative;
  height: 180px; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 14px;
  background: linear-gradient(160deg, var(--blue-100), var(--blue-200));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--blue-700); font-size: 13px;
  border: 1px dashed var(--blue-500);
}
.img-slot i { font-size: 30px; }
.img-slot span { font-weight: 600; }

/* ===== Real logo in header ===== */
.header__logo-img { height: 42px; width: auto; display: block; }
/* When the wordmark logo is used, the text block next to it is redundant on small screens */
@media (max-width: 480px) { .header__logo-img { height: 36px; } }

/* ===== OGS logo + Schmökerstube image ===== */
.partner-logo { max-width: 180px; height: auto; margin: 4px 0 12px; }
.content-img { width: 100%; border-radius: var(--radius); margin: 4px 0 16px; display: block; }

/* ===== Klassen page (mascot cards) ===== */
.klassen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--gap);
  margin-top: 8px;
}
.klasse-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform .12s, box-shadow .2s;
}
.klasse-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(18,84,127,.10); }
.klasse-card__img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  background: var(--blue-100); display: block;
}
.klasse-card__body { padding: 10px 8px 14px; }
.klasse-card__name { font-size: 18px; font-weight: 700; color: var(--blue-900); }
.klasse-card__animal { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.klasse-card__teacher { font-size: 12px; color: var(--blue-700); margin-top: 4px; }

/* Hero with real photo */
.hero-img--photo {
  background: url('assets/img/hero-schule.png') center/cover no-repeat;
}
.hero-img--photo .hero-img__ph { display: none; }
