/* =====================================================================
   informatikZentrale – basis.css
   Struktur und Verhalten: Raster, Inhaltstypografie, Codeblöcke, Boxen,
   Karten-Gerüst, Materialsammlung, Mobil-Verhalten. Farben und der Charakter
   (Kopf, Navigation, Karten-Look) kommen aus style.css, das auch diese
   Variablen setzt:
     --grund --grund-2 --grund-3 --text --text-leise --linie --akzent --akzent-hell
     --link --markierung --radius --schrift --schrift-titel --mono
     --inhalt-breite --leiste-breite
   ===================================================================== */

/* ---------- Schriften (alle SIL Open Font License, liegen lokal unter theme/fonts) ---------- */
@font-face { font-family: "Space Grotesk"; font-weight: 400; src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Space Grotesk"; font-weight: 500; src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Space Grotesk"; font-weight: 700; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; src: url("fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Special Elite"; font-weight: 400; src: url("/fonts/special-elite-v18-latin-regular.woff2") format("woff2"), url("/fonts/special-elite-v18-latin-regular.woff") format("woff"); font-display: swap; }

/* ---------- Grundgerüst ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--schrift); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--grund); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.iz-klein { font-size: .85rem; color: var(--text-leise); }
.iz-z { color: var(--akzent); }

.iz-rahmen { display: flex; align-items: flex-start; max-width: calc(var(--leiste-breite) + var(--inhalt-breite) + 6rem); margin: 0 auto; padding: 0 1.5rem; gap: 3rem; }
.iz-inhalt { flex: 1 1 auto; min-width: 0; max-width: var(--inhalt-breite); padding: 1.5rem 0 4rem; }
.iz-seitenleiste { flex: 0 0 var(--leiste-breite); position: sticky; top: var(--kopf-hoehe, 4rem); max-height: calc(100vh - var(--kopf-hoehe, 4rem)); overflow-y: auto; padding: 1.5rem 0 2rem; font-size: .92rem; }
.iz-seitenleiste:not(:has(ul, p)) { display: none; }
.iz-menueknopf { display: none; }

/* ---------- Navigation (Struktur) ---------- */
.iz-nav, .iz-nav ul, .iz-hauptnav { list-style: none; margin: 0; padding: 0; }
.iz-nav ul { margin-left: .9rem; border-left: 1px solid var(--linie); padding-left: .5rem; }
.iz-nav li { margin: .1rem 0; }
.iz-nav a { display: block; position: relative; padding: .28rem .5rem .28rem 1.3rem; border-radius: var(--radius); color: var(--text); line-height: 1.35; }
.iz-nav a:hover { background: var(--grund-2); text-decoration: none; }
.iz-nav li.hat-kinder > a::before { content: ""; position: absolute; left: .45rem; top: .78em; width: .4em; height: .4em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .55; transition: transform .15s; }
.iz-nav li.hat-kinder.offen > a::before, .iz-nav li.hat-kinder.aktiv > a::before { transform: rotate(45deg); top: .62em; opacity: .9; }
.iz-nav li.offen > a { color: var(--akzent); }
.iz-nav li.aktiv > a { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.iz-nav-extra { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.iz-nav-extra > li > a { color: var(--text-leise); }
.iz-bereichsnav-titel { margin: 0 0 .6rem; font-weight: 700; }
.iz-bereichsnav-titel a { color: var(--text); }

/* ---------- Seitenkopf, Brotkrumen, Meta ---------- */
.iz-brotkrumen { font-size: .85rem; color: var(--text-leise); margin-bottom: 1rem; }
.iz-brotkrumen span[aria-hidden] { margin: 0 .35rem; }
h1 { font-family: var(--schrift-titel); font-size: 2.1rem; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
.iz-untertitel { margin: 0 0 .8rem; color: var(--text-leise); font-size: 1.1rem; }
.iz-seitenkopf { margin-bottom: 1.5rem; }
.iz-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }
.iz-chip, .iz-tag { display: inline-flex; align-items: center; gap: .3em; padding: .12em .55em; font-size: .72rem; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; border: 1px solid var(--linie); color: var(--text-leise); white-space: nowrap; }
.iz-chip-datum { text-transform: none; letter-spacing: 0; font-family: var(--schrift); }
a.iz-tag:hover { text-decoration: none; filter: brightness(1.25); }
/* Themen-Hashtags (#Java …): Mono-Schrift, kein Rahmen – Farbe je Gruppe in style-*.css (.iz-thema-gebiet usw.) */
.iz-thema { font-family: var(--mono); font-size: .78rem; color: var(--text-leise); white-space: nowrap; }
.iz-thema:hover { text-decoration: none; filter: brightness(1.3); }
.iz-thema-anzahl { opacity: .55; font-size: .85em; margin-left: .15em; }
.iz-kopfmarke { font-size: 1rem; vertical-align: middle; margin-left: .3em; }
.iz-kopfmarke .iz-thema { font-size: 1rem; }
.iz-meta-hero { margin: -1.2rem 0 1.5rem; }
.iz-themengruppe-titel .iz-themen-frage { font-family: var(--mono); font-weight: 400; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-leise); margin-left: .6rem; }
.iz-themenliste { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin: .5rem 0 1.5rem; }
.iz-themenliste .iz-thema { font-size: .95rem; }
/* Ausklapp-Panel "Themen" unter der Kopfnavigation (Reiter "Themen"; Aussehen je Variante in style-*.css) */
[hidden] { display: none !important; }      /* damit "hidden" auch gegen display:grid/flex gewinnt */
.iz-kopfnav { position: relative; }
.iz-themenpanel { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 1.5rem; padding: 1rem 1.5rem 1.2rem; background: var(--grund-2); border: 1px solid var(--linie); border-top: 0; border-radius: 0 0 var(--radius-gross, var(--radius)) var(--radius-gross, var(--radius)); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.iz-themenpanel .iz-themengruppe-titel { margin: 0 0 .3rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-leise); }
.iz-themenpanel .iz-themen-frage { display: none; }
.iz-themenpanel .iz-themenliste { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; margin: 0; }
.iz-themenpanel .iz-themenliste .iz-thema { font-size: .85rem; }
.iz-themenpanel-fuss { grid-column: 1 / -1; margin: 0; padding-top: .6rem; border-top: 1px solid var(--linie); font-size: .85rem; }
@media (max-width: 900px) {
    .iz-themenpanel { position: static; grid-template-columns: 1fr; box-shadow: none; border: 0; border-top: 1px solid var(--linie); border-radius: 0; padding: .8rem 0 0; background: transparent; }
}

/* ---------- Hero (Start- und Bereichsseiten mit Bild) ---------- */
.iz-hero { position: relative; margin: 0 0 2rem; border-radius: var(--radius-gross, var(--radius)); overflow: hidden; background-size: cover; background-position: center; min-height: 18rem; display: flex; align-items: flex-end; }
.iz-hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); }
.iz-hero-text { position: relative; padding: 2rem; max-width: 40rem; color: var(--hero-text, #fff); }
.iz-hero-text h1 { margin: 0 0 .5rem; color: inherit; }
.iz-hero-vorzeile { margin: 0 0 .4rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.iz-hero-untertitel { margin: 0; font-size: 1.05rem; opacity: .92; }
.iz-start .iz-hero { min-height: 24rem; }

/* ---------- Karten (Gerüst) ---------- */
/* align-items: stretch -> alle Karten einer Zeile gleich hoch; die Fußzeile (.iz-karte-meta) sitzt dank margin-top:auto immer unten */
.iz-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; margin: 1rem 0 2rem; align-items: stretch; }
.iz-karten-bereiche { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.iz-karte { display: flex; flex-direction: column; color: var(--text); border-radius: var(--radius); overflow: hidden; background: var(--grund-2); border: 1px solid var(--linie); transition: transform .12s, border-color .12s, box-shadow .12s; }
.iz-karte:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--akzent); }
.iz-karte-bild { display: block; aspect-ratio: 16 / 9; background-size: cover; background-position: center; }
.iz-karte-text { display: flex; flex-direction: column; gap: .4rem; padding: .9rem 1rem 1rem; flex: 1; }
.iz-karte-titel { font-family: var(--schrift-titel); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.iz-karte-beschreibung { font-size: .88rem; color: var(--text-leise); line-height: 1.45; }
.iz-karte-meta { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: auto; padding-top: .5rem; }
.iz-karte-pfeil { margin-left: auto; color: var(--akzent); font-weight: 700; }

/* ---------- Inhaltstypografie ---------- */
.iz-text h2 { font-family: var(--schrift-titel); font-size: 1.45rem; margin: 2rem 0 .6rem; padding-bottom: .25rem; border-bottom: 1px solid var(--linie); }
.iz-text h3 { font-family: var(--schrift-titel); font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.iz-text h4 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.iz-text p, .iz-text ul, .iz-text ol { margin: 0 0 1rem; }
.iz-text li { margin: .2rem 0; }
.iz-text blockquote { margin: 1rem 0; padding: .5rem 1rem; border-left: 4px solid var(--akzent); background: var(--grund-2); }
.iz-text hr { border: 0; border-top: 1px solid var(--linie); margin: 1.5rem 0; }
.iz-text table { border-collapse: collapse; margin: 1rem 0; max-width: 100%; display: block; overflow-x: auto; }
.iz-text th, .iz-text td { border: 1px solid var(--linie); padding: .35rem .6rem; text-align: left; vertical-align: top; }
.iz-text th { background: var(--grund-2); }
.iz-text .caps { font-variant: small-caps; letter-spacing: .02em; }
.iz-text img { border-radius: 3px; }
mark { background: var(--markierung); color: inherit; padding: 0 .1em; }

/* Code */
.iz-text code { font-family: var(--mono); font-size: .88em; background: var(--grund-2); border: 1px solid var(--linie); border-radius: 4px; padding: .05em .3em; }
.iz-text pre { margin: 1rem 0; padding: .9rem 1rem; background: var(--grund-3); border: 1px solid var(--linie); border-radius: var(--radius); overflow-x: auto; line-height: 1.45; font-size: .88rem; }
.iz-text pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.hljs { background: transparent !important; padding: 0 !important; }

/* Boxen (Video, Folien, Übungen, Szenario, Test) */
.iz-box { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--grund-2); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: var(--radius); }
.iz-box > h2 { margin: 0 0 .6rem; border: 0; padding: 0; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--akzent); }
.iz-box > h2::before { margin-right: .4rem; }
.iz-video > h2::before { content: "▶"; }
.iz-pdf > h2::before { content: "▤"; }
.iz-uebungen > h2::before { content: "✎"; }
.iz-greenfoot > h2::before { content: "⬇"; }
.iz-test > h2::before { content: "✔"; }
.iz-videorahmen { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.iz-videorahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 4px; }
/* YouTube-Platzhalter (Zwei-Klick): füllt den Videorahmen, Hintergrund = _bilder/video-platzhalter.webp oder ein Verlauf */
.iz-video-platzhalter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1rem; border-radius: 4px; border: 1px solid var(--linie); background: var(--grund-3, var(--grund-2)) center / cover no-repeat; text-align: center; }
.iz-video-platzhalter::before { content: ""; position: absolute; inset: 0; border-radius: 4px; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.15)); pointer-events: none; }
.iz-video-laden { position: relative; display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.4rem; font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--grund); background: var(--akzent); border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 0 0 4px rgba(0,0,0,.25); }
.iz-video-laden:hover { filter: brightness(1.1); }
.iz-video-play { font-size: .9em; }
.iz-video-hinweis { position: absolute; left: 1rem; right: 1rem; bottom: .7rem; margin: 0; font-size: .78rem; color: #e6efe8; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.iz-video-hinweis a { color: inherit; text-decoration: underline; }
.iz-video-hinweis label { cursor: pointer; }
.iz-video-hinweis input { vertical-align: middle; margin: 0 .2rem 0 0; }
/* Schmale Bildschirme: der 16:9-Kasten wäre zu flach für Knopf + Hinweis -> Kasten darf höher werden, Hinweis unter dem Knopf */
@media (max-width: 600px) {
    .iz-videorahmen:has(.iz-video-platzhalter) { aspect-ratio: auto; }
    .iz-video-platzhalter { position: relative; inset: auto; min-height: 15rem; }
    .iz-video-hinweis { position: static; margin-top: .3rem; }
}
.iz-pdfrahmen { width: 100%; height: 34rem; border: 1px solid var(--linie); border-radius: 4px; background: #fff; }
.iz-uebungen h3 { margin-top: 1rem; }
.iz-button { display: inline-block; padding: .45rem 1rem; border-radius: var(--radius); background: var(--akzent); color: var(--grund) !important; font-weight: 600; }
.iz-button:hover { text-decoration: none; filter: brightness(1.1); }

/* Suche, Treffer */
.iz-treffer li { margin: .9rem 0; }
.iz-treffer li > a { font-weight: 600; }
.iz-treffer-bereich { font-family: var(--mono); font-size: .72rem; color: var(--text-leise); margin: 0 .5rem 0 .4rem; }
.iz-treffer .iz-tag { margin-right: .25rem; vertical-align: middle; }
/* Sofort-Suche (Liste unter dem Suchfeld im Kopf) */
.iz-kopfsuche { position: relative; }
.iz-livesuche { position: absolute; top: calc(100% + .4rem); right: 0; width: 22rem; max-width: calc(100vw - 2rem); z-index: 50; background: var(--grund-2); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.35); overflow: hidden; }
.iz-livesuche a { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .8rem; border-bottom: 1px solid var(--linie); color: var(--text); font-size: .9rem; }
.iz-livesuche a:hover, .iz-livesuche a:focus { background: var(--akzent-hell, rgba(127,127,127,.15)); text-decoration: none; outline: none; }
.iz-livesuche-bereich { font-family: var(--mono); font-size: .7rem; color: var(--text-leise); }
.iz-livesuche-mehr, .iz-livesuche-leer { font-size: .85rem; color: var(--text-leise); }
.iz-livesuche a.iz-livesuche-mehr { border-bottom: 0; }
.iz-livesuche-leer { margin: 0; padding: .6rem .8rem; }
@media (max-width: 900px) { .iz-livesuche { position: static; width: auto; max-width: none; margin-top: .4rem; } }
.iz-suchformular { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.iz-suchformular input { flex: 1; padding: .5rem .7rem; font: inherit; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--grund-2); color: var(--text); }
.iz-suchformular button { padding: .5rem 1rem; border: 0; border-radius: var(--radius); background: var(--akzent); color: var(--grund); cursor: pointer; font: inherit; }

/* Aktuelles */
.iz-aktuelles { margin: 0 0 2.5rem; }
.iz-aktuelles-kopf { border: 0 !important; margin-top: 0 !important; }
.iz-beitrag { padding: 1rem 1.2rem; margin: 0 0 1rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--grund-2); }
.iz-beitrag h2 { margin: 0 0 .2rem !important; border: 0 !important; padding: 0 !important; font-size: 1.2rem !important; }
.iz-beitrag h2 a { color: var(--text); }
.iz-beitrag-datum { margin: 0 0 .6rem !important; }
.iz-beitrag-text > :last-child { margin-bottom: 0; }
.iz-anhaenge { list-style: none; padding: .6rem 0 0; margin: .6rem 0 0 !important; border-top: 1px dashed var(--linie); }
.iz-anhaenge li::before { content: "📎 "; }

/* Materialsammlung */
.iz-material details { margin: .15rem 0 .15rem .2rem; padding-left: .6rem; border-left: 1px solid var(--linie); }
.iz-material summary { cursor: pointer; font-weight: 600; padding: .2rem .3rem; border-radius: 4px; list-style: none; }
.iz-material summary::before { content: "▸ "; color: var(--text-leise); }
.iz-material details[open] > summary::before { content: "▾ "; }
.iz-material summary:hover { background: var(--grund-2); }
.iz-material ul { list-style: none; padding-left: 1.2rem; margin: 0 !important; }
.iz-material li { margin: .05rem 0; font-size: .92rem; }
.iz-material li.iz-versteckt, .iz-material details.iz-versteckt { display: none; }
.iz-material-hinweis { margin: .5rem 0 1.2rem; padding: .55rem .8rem; max-width: 40rem; font-size: .88rem; color: var(--text); background: var(--akzent-hell, rgba(127,127,127,.12)); border-left: 3px solid var(--akzent); border-radius: 0 var(--radius) var(--radius) 0; }
.iz-material-hinweis strong { color: var(--akzent); }
.iz-material-suche input { width: 100%; max-width: 30rem; padding: .5rem .7rem; font: inherit; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--grund-2); color: var(--text); }
.iz-datei::before { content: attr(data-endung); display: inline-block; min-width: 2.6em; margin-right: .45em; padding: 0 .3em; font-family: var(--mono); font-size: .68em; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-align: center; color: var(--text-leise); border: 1px solid var(--linie); border-radius: 3px; vertical-align: .15em; }

/* ---------- Fuß ---------- */
.iz-fuss { border-top: 1px solid var(--linie); margin-top: 2rem; padding: 1.5rem 1.5rem 2rem; font-size: .85rem; color: var(--text-leise); }
.iz-fuss-innen { max-width: calc(var(--leiste-breite) + var(--inhalt-breite) + 6rem); margin: 0 auto; display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: center; }
.iz-fussnav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.iz-fuss a { color: var(--text-leise); }
.iz-copyright { width: 100%; }
.iz-logo-klein { font-size: 1.1rem; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
    body { font-size: 16px; }
    .iz-rahmen { display: block; padding: 0 1rem; }
    .iz-menueknopf { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 2.4rem; height: 2.4rem; padding: .5rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--grund-2); cursor: pointer; }
    .iz-menueknopf span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
    .iz-seitenleiste { display: none; position: static; max-height: none; padding: 1rem 0; border-bottom: 1px solid var(--linie); }
    .iz-seitenleiste.offen { display: block; }
    .iz-inhalt { max-width: none; padding-top: 1rem; }
    h1 { font-size: 1.6rem; }
    .iz-pdfrahmen { height: 24rem; }
    .iz-hero { min-height: 14rem; }
    .iz-hero-text { padding: 1.2rem; }
}
@media print {
    .iz-kopf, .iz-seitenleiste, .iz-fuss, .iz-brotkrumen { display: none; }
    .iz-rahmen { display: block; }
    .iz-box { break-inside: avoid; }
}
