/* =========================================================================
   Stiftung Sunnitischer Schulrat – Stylesheet
   Ausgerichtet am Styleguide (Stand 27.09.2021):
   • Reinweiß, schwarze Open-Sans-Typografie, dicke schwarze Akzentbalken
   • Farben & erlaubte Kombinationen: Smaragdgrün #00BD8F, Aztekengold #FBDA56,
     Schwarz, Weiß, Dunkelgrau #A9AAAA
     – Grünfläche → schwarzer/weißer Text · Goldfläche → schwarzer/grüner Text
     – auf Weiß: schwarzer, grüner oder grauer Text (Grün als TEXT wird für
       WCAG-AA auf #00674E abgedunkelt; das reine #00BD8F nur als Fläche/Akzent)
   Schrift: Open Sans, selbst gehostet (kein externer Aufruf → Datenschutz).
   ========================================================================= */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-var.woff2") format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
}

:root {
  --gruen:       #00BD8F;   /* Smaragdgrün – Flächen & Akzente        */
  --gruen-text:  #00674E;   /* abgedunkelt – Grün als Text (AA)       */
  --gruen-dark:  #024d3b;
  --gold:        #FBDA56;
  --schwarz:     #111111;
  --grau:        #565a5e;   /* Sekundärtext (AA auf Weiß)             */
  --grau-hell:   #a9aaaa;   /* Dunkelgrau aus Styleguide (dekorativ) */
  --linie:       #111111;   /* Akzentbalken: schwarz                  */
  --grau-linie:  #e2e2e2;
  --grau-bg:     #f2f3f5;   /* neutrale Fläche                        */
  --weiss:       #ffffff;
  --fokus:       #00674E;
  --maxbreite:   74rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 1.06rem; line-height: 1.65; color: var(--schwarz);
  background: var(--weiss); -webkit-font-smoothing: antialiased;
}

a:focus-visible, button:focus-visible, input:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 2px;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; background: var(--schwarz);
  color: #fff; padding: .75rem 1.25rem; z-index: 1000; border-radius: 0 0 4px 4px;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--maxbreite); margin-inline: auto; padding-inline: 1.5rem; }

/* ---- Bewegung (nur wenn .anim gesetzt) ---- */
.anim .reveal { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1); }
.anim .reveal.in { opacity: 1; transform: none; }
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.anim .page-hero h1 { animation: heroIn .6s ease both; }
.anim .hero-home .hero-sub { animation: heroIn .6s .12s ease both; }
.anim .hero-home .hero-actions { animation: heroIn .6s .24s ease both; }

/* ---- Kopfzeile / Navigation ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 2px solid var(--schwarz); transition: box-shadow .2s ease; }
.site-header.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; }
.logo-link { display: inline-flex; align-items: center; }
.logo-link img { height: 58px; width: auto; display: block; }

.nav-toggle {
  display: none; align-items: center; gap: .5rem; font: inherit; font-weight: 600;
  background: var(--schwarz); color: #fff; border: 0; padding: .6rem .95rem; border-radius: 4px; cursor: pointer;
}
.nav-toggle .bar { display: inline-block; width: 20px; height: 2px; background: #fff; position: relative; }
.nav-toggle .bar::before, .nav-toggle .bar::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: #fff; }
.nav-toggle .bar::before { top: -6px; } .nav-toggle .bar::after { top: 6px; }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; gap: .15rem; }
.main-nav a { display: block; padding: .55rem .8rem; color: var(--schwarz); text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: var(--gruen-text); text-decoration: underline; text-underline-offset: .3em; }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gruen); }

.has-sub { position: relative; }
.has-sub > button {
  font: inherit; font-weight: 600; cursor: pointer; background: none; border: 0;
  padding: .55rem .8rem; color: var(--schwarz); display: inline-flex; align-items: center; gap: .3rem;
}
.has-sub > button:hover { color: var(--gruen-text); }
.has-sub > button[aria-expanded="true"] + .submenu { display: block; }
.submenu {
  display: none; position: absolute; left: 0; top: 100%; z-index: 50; background: #fff;
  border: 1px solid var(--schwarz); box-shadow: 0 10px 26px rgba(0,0,0,.14); min-width: 16rem; padding: .4rem;
}
.submenu li { width: 100%; }
.submenu a { white-space: nowrap; }

/* ---- Hero / Seitenkopf (weiß, editorial) ---- */
main { display: block; }
.page-hero { background: #fff; color: var(--schwarz); padding-block: 2.6rem 1.6rem; border-bottom: 1px solid var(--grau-linie); }
.page-hero h1 { margin: 0; color: var(--schwarz); }
.page-hero h1::after { content: ""; display: block; width: 84px; height: 6px; margin-top: 1rem; background: var(--schwarz); }
.hero-home { padding-block: 3rem 2rem; }
.hero-home h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
.hero-home .hero-sub { font-size: 1.28rem; max-width: 42rem; margin: 1.3rem 0 1.7rem; color: #333; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.content { padding-block: 2.5rem 3.5rem; }

/* ---- Typografie (Open Sans, schwarz) ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.22; color: var(--schwarz); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.75rem; }
.content > .container > h2, .info-panel > h2 { padding-bottom: .55rem; position: relative; }
.content > .container > h2::after, .info-panel > h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 5px; background: var(--schwarz);
}
h3 { font-size: 1.3rem; margin-top: 1.8rem; }
h4 { font-size: 1.12rem; margin-top: 1.5rem; color: var(--gruen-text); }
p, ul, ol { margin-block: 0 1rem; }
.content ul, .content ol { padding-left: 1.4rem; }
.content li { margin-bottom: .45rem; }

a { color: var(--gruen-text); text-underline-offset: .15em; }
a:hover { color: var(--gruen-dark); }

/* ---- Buttons (Grünfläche + schwarzer Text = erlaubte Kombination) ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; background: var(--gruen); color: #000 !important;
  padding: .8rem 1.4rem; border: 2px solid var(--gruen); border-radius: 4px; text-decoration: none; font-weight: 700;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: #03a97f; border-color: #03a97f; }
.btn-outline { background: #fff; color: var(--schwarz) !important; border: 2px solid var(--schwarz); }
.btn-outline:hover { background: var(--schwarz); color: #fff !important; }
/* Kompatibilität mit früheren Klassen */
.btn.btn-gold, .btn.btn-ghost { background: var(--gruen); color: #000 !important; border-color: var(--gruen); }
.btn.btn-ghost { background: #fff; color: var(--schwarz) !important; border-color: var(--schwarz); }

/* ---- Zahlen ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.1rem; margin-top: 1.8rem; }
.stat { text-align: center; background: #fff; border: 1px solid var(--grau-linie); border-top: 5px solid var(--gruen); padding: 1.5rem 1rem; }
.stat-num { display: block; font-size: 2.6rem; font-weight: 800; color: var(--gruen-text); line-height: 1; }
.stat-label { display: block; margin-top: .5rem; color: var(--grau); font-weight: 600; font-size: .95rem; }
.quelle { font-size: .85rem; color: var(--grau); margin-top: .9rem; }

/* ---- Wachstums-Diagramm ---- */
.chart-card { margin-top: 1.6rem; border: 1px solid var(--grau-linie); border-top: 5px solid var(--gruen); padding: 1.6rem; background: #fff; }
.chart-card figcaption { color: #333; margin-bottom: 1.1rem; font-size: 1.05rem; }
.growth-chart { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--grau-linie); stroke-width: 1; }
.c-ylab { fill: var(--grau); font-size: 12px; text-anchor: end; font-family: inherit; }
.c-xlab { fill: var(--grau); font-size: 13px; font-weight: 600; text-anchor: middle; font-family: inherit; }
.c-area { fill: url(#cArea); }
.c-line { fill: none; stroke: var(--gruen); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.c-dot { fill: #fff; stroke: var(--gruen-text); stroke-width: 3; }
.anim .chart-line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.anim .reveal.in .chart-line { animation: draw 1.6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.anim .reveal .c-area, .anim .reveal .c-dot { opacity: 0; }
.anim .reveal.in .c-area { animation: cFade 1s .35s ease forwards; }
.anim .reveal.in .c-dot { animation: cFade .5s 1.3s ease forwards; }
@keyframes cFade { to { opacity: 1; } }

/* ---- Karten / Info ---- */
.lead { font-size: 1.22rem; color: #222; max-width: 46rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.4rem; margin-top: 1.7rem; }
.card {
  position: relative; border: 1px solid var(--grau-linie); border-top: 5px solid var(--gruen);
  padding: 1.6rem; background: #fff; display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.card h3 { margin-top: .35rem; }
.card .card-link { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.card .card-link::after { content: "\2192"; transition: transform .15s ease; }
.card:hover .card-link::after { transform: translateX(4px); }
/* Icon-Kachel: Goldfläche + schwarzes Icon (erlaubte Kombination) */
.card-icon {
  width: 54px; height: 54px; background: var(--gold); display: flex; align-items: center; justify-content: center;
  margin-bottom: .5rem;
}
.card-icon svg { width: 28px; height: 28px; stroke: #000; fill: none; stroke-width: 1.8; }

/* Info-Panel: neutrale graue Fläche */
.info-panel { background: var(--grau-bg); border: 1px solid var(--grau-linie); padding: 2.1rem 2.2rem 2.4rem; margin-top: 3rem; }
.info-panel > h2 { margin-top: 0; }

/* Kräftige Smaragdgrün-Fläche + schwarzer Text (erlaubte Kombination) */
.cta-panel {
  background: var(--gruen); color: #000; padding: 2.2rem 2.4rem; margin-top: 3rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.3rem;
}
.cta-panel h2 { margin: 0; color: #000; }
.cta-panel p { margin: .4rem 0 0; color: #062e23; max-width: 40rem; }
.cta-panel .btn { background: #000; border-color: #000; color: #fff !important; }
.cta-panel .btn:hover { background: #fff; color: #000 !important; }

.downloads { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .7rem; }
.downloads a {
  display: inline-flex; align-items: center; gap: .45rem; border: 2px solid var(--schwarz);
  padding: .5rem 1rem; text-decoration: none; font-weight: 600; background: #fff; color: var(--schwarz);
}
.downloads a:hover { background: var(--schwarz); color: #fff; }
.downloads a::before { content: "\2193"; font-weight: 700; }

.person { border-left: 5px solid var(--gruen); padding: .3rem 0 .3rem 1.1rem; margin-bottom: 1.6rem; }
.person h3 { margin: 0 0 .25rem; font-size: 1.18rem; }
.person p { margin: 0 0 .2rem; color: var(--grau); }

.news-date { display: inline-block; color: #000; background: var(--gold); font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .25rem .7rem; margin: 0 0 .6rem; }
.news-item { border-bottom: 1px solid var(--grau-linie); padding-block: 1.6rem; }
.news-item:first-of-type { padding-top: 0; }
.news-item h2, .news-item h3 { margin: 0 0 .5rem; font-size: 1.4rem; }
.news-item h2 a, .news-item h3 a { text-decoration: none; }
.news-item h2 a:hover, .news-item h3 a:hover { text-decoration: underline; }
.news-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.4rem; margin-top: 1.7rem; list-style: none; padding: 0; }
.news-cards .news-item { border: 1px solid var(--grau-linie); border-top: 5px solid var(--gruen); padding: 1.5rem; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.news-cards .news-item:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.10); }
.news-cards .news-item h3 { font-size: 1.16rem; }

.infobox { background: var(--grau-bg); border: 1px solid var(--grau-linie); padding: 1.35rem 1.6rem; margin-block: 1.6rem; }
.infobox h2, .infobox h3 { margin-top: 0; }

.doc-note { background: var(--gold); border: 0; border-left: 6px solid #000; padding: 1.1rem 1.4rem; margin-bottom: 2rem; color: #000; }
.doc-note p { margin: 0; }
.doc-note a { color: #062e23; }
.doc-list { padding-left: 1.4rem; }
.doc-list li { margin-bottom: .4rem; }
.content h3 + .doc-list, .content h3 + ul { margin-top: .6rem; }

table.contact { border-collapse: collapse; }
table.contact th, table.contact td { text-align: left; padding: .45rem .9rem .45rem 0; vertical-align: top; }

blockquote { margin: 1.4rem 0; padding: .8rem 1.3rem; border-left: 5px solid var(--gruen); background: var(--grau-bg); color: #222; }

/* ---- Fußzeile (Schwarz + weißer Text = erlaubte Kombination) ---- */
.site-footer { background: #000; color: #fff; margin-top: 3.5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gruen); }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; padding-block: 2.75rem; }
.site-footer h2 { color: #fff; font-size: 1.12rem; margin-top: 0; }
.site-footer h2::after { content: ""; display: block; width: 44px; height: 4px; background: var(--gruen); margin-top: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.25); padding-block: 1rem; font-size: .9rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; border-top: 1px solid var(--grau-linie); margin-top: .75rem; }
  .header-inner { flex-wrap: wrap; }
  .submenu { position: static; box-shadow: none; border: 0; padding-left: 1rem; min-width: 0; }
  .main-nav a, .has-sub > button { width: 100%; padding-block: .85rem; }
}
