/* Schnupperunterricht – Gestaltung angelehnt an www.fmg-mg.de
   Schriften lokal eingebunden (keine Verbindung zu Google). */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); }

:root {
    --akzent: #0094dd;
    --akzent-hell: #6ec1e4;
    --text: #323232;
    --leise: #666666;
    --linie: #e2e2e2;
    --grund: #f7f7f7;
    --weiss: #ffffff;
    --dunkel: #1a1a1a;
    --rot: #c0392b;
    --gruen: #1e8449;
    --schrift: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
    --titel: "Montserrat", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 17px/1.55 var(--schrift);
    color: var(--text);
    background: var(--grund);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; width: 100%; padding-bottom: 3rem; }
.breite { max-width: 900px; margin: 0 auto; padding: 0 16px; }
body.verwaltung .breite { max-width: 1120px; }
a { color: var(--akzent); }
h1, h2, h3 { font-family: var(--titel); font-weight: 500; color: #000; }
h1 { font-size: 1.85rem; line-height: 1.2; margin: 2rem 0 .7rem; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 .7rem; display: flex; align-items: center; gap: .55rem; }
h3.tag {
    font-size: .95rem; font-weight: 600; margin: 1.6rem 0 .6rem; color: var(--akzent);
    text-transform: uppercase; letter-spacing: .04em;
}
.klein { font-size: .9rem; color: var(--leise); }
.einleitung { font-size: 1.08rem; max-width: 65ch; }

/* Kopf und Fuß wie auf der Schulwebsite */
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.kopf::before { content: ""; display: block; height: 4px; background: var(--akzent); }
.kopf .breite { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap; }
.kopf .schule { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: #000; font-weight: 700; font-size: .95rem; }
.kopf .schule img { height: 44px; width: auto; display: block; }
.kopf .bereich { font-size: .9rem; font-weight: 600; color: var(--leise); }
.fuss { background: var(--dunkel); color: #e2e2e2; font-size: .9rem; font-weight: 400; }
.fuss .breite { display: flex; justify-content: space-between; gap: .6rem 1.4rem; flex-wrap: wrap; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.fuss a { color: #e2e2e2; margin-left: 1.2rem; }
.fuss a:first-child { margin-left: 0; }
.fuss a:hover { color: var(--akzent-hell); }

.schritt {
    display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: var(--akzent); color: #fff; font-size: .95rem; font-family: var(--titel);
}

/* Angebotskarten */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: .8rem; }
.karte {
    position: relative; display: flex; gap: .75rem; padding: 1rem 1.05rem; font-weight: 400;
    background: var(--weiss); border: 1px solid var(--linie); border-top: 4px solid var(--linie); cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.karte:hover { border-top-color: var(--akzent); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); }
.karte input { width: 1.3rem; height: 1.3rem; margin-top: .15rem; accent-color: var(--akzent); flex-shrink: 0; }
.karte:has(input:checked) { border-color: var(--akzent); border-top-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.karte:has(input:focus-visible) { outline: 3px solid var(--akzent-hell); outline-offset: 2px; }
.karte .inhalt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.karte .zeit { font-weight: 700; font-size: .92rem; color: var(--akzent); }
.karte .titel { font-family: var(--titel); font-weight: 600; font-size: 1.02rem; line-height: 1.3; color: #000; margin: .1rem 0 .15rem; }
.karte .detail, .karte .beschreibung { font-size: .93rem; color: var(--leise); }
.karte .beschreibung { margin-top: .25rem; }
.karte .plaetze { margin-top: .45rem; font-size: .86rem; font-weight: 700; color: var(--gruen); }
.karte .konflikt { display: none; margin-top: .45rem; font-size: .84rem; color: var(--leise); }
.karte.voll, .karte.konflikt-aktiv { background: #efefef; border-color: #e6e6e6; border-top-color: #d6d6d6; cursor: not-allowed; box-shadow: none; }
.karte.voll .inhalt, .karte.konflikt-aktiv .inhalt { opacity: .55; }
.karte.voll .zeit, .karte.konflikt-aktiv .zeit { color: var(--leise); }
.karte.voll .plaetze { color: var(--rot); }
.karte.konflikt-aktiv .plaetze { display: none; }
.karte.konflikt-aktiv .konflikt { display: block; }

/* Formulare */
.felder { display: grid; gap: 1rem; max-width: 560px; }
.felder.schmal { max-width: 360px; }
.felder.raster { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: none; }
.felder .breit { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .97rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=datetime-local], input[type=number], input[type=file], input:not([type]), textarea {
    font: inherit; font-weight: 400; padding: .65rem .75rem; border: 1px solid #c8c8c8; border-radius: 0; background: var(--weiss); width: 100%; color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }
label.haken, .zustimmung { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
label.haken input, .zustimmung input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--akzent); flex-shrink: 0; }
.zustimmung { margin: 1.3rem 0; max-width: 65ch; }
.unsichtbar { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button, .knopf {
    font: 700 .92rem/1.2 var(--schrift); letter-spacing: .05em; text-transform: uppercase;
    padding: .85rem 1.5rem; border-radius: 0; cursor: pointer;
    background: var(--akzent); color: #fff; border: 2px solid var(--akzent); text-decoration: none; display: inline-block;
    transition: background .15s, border-color .15s;
}
button:hover, .knopf:hover { background: #007fc0; border-color: #007fc0; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.leise { background: transparent; color: var(--akzent); padding: .5rem .95rem; }
button.leise:hover { background: var(--akzent); color: #fff; }
button.klein { font-size: .78rem; padding: .35rem .7rem; }
button.gefahr, button.leise.gefahr { border-color: var(--rot); color: var(--rot); background: transparent; }
button.leise.gefahr:hover { background: var(--rot); color: #fff; }
button.gefahr:not(.leise) { background: var(--rot); color: #fff; }
.absenden { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.auswahl { color: var(--leise); font-size: .97rem; }
.telefon { margin-top: 1.5rem; max-width: 65ch; }

/* Meldungen */
.meldung { padding: 1rem 1.15rem; margin: 1.1rem 0; border-left: 5px solid; background: var(--weiss); }
.meldung.fehler { border-color: var(--rot); }
.meldung.erfolg { border-color: var(--gruen); }
.meldung.hinweis { border-color: var(--akzent); }
.meldung ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* Abmeldeseite */
.liste { display: grid; gap: .7rem; }
.eintrag {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: var(--weiss); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); padding: 1rem 1.1rem;
}
.eintrag .zeit { font-size: .92rem; color: var(--akzent); font-weight: 700; }
.eintrag .titel { font-family: var(--titel); font-weight: 600; font-size: 1.02rem; color: #000; }
.eintrag .detail { font-size: .95rem; }
form.alle { margin-top: 1.1rem; }

/* Textseiten (Datenschutz) */
.textseite { background: var(--weiss); border: 1px solid var(--linie); padding: .5rem 1.6rem 1.6rem; margin-top: 1.5rem; }
.textseite h1 { margin-top: 1.2rem; }
.textseite h2 { font-size: 1.05rem; margin: 1.7rem 0 .4rem; }
.textseite p, .textseite li { max-width: 72ch; overflow-wrap: anywhere; }
.textseite address { font-style: normal; }

/* Verwaltung */
.menue { display: flex; gap: .4rem 1.3rem; flex-wrap: wrap; margin: 1.1rem 0; font-size: .97rem; font-weight: 600; }
.box { background: var(--weiss); border: 1px solid var(--linie); padding: .3rem 1.3rem 1.3rem; margin: 1.3rem 0; }
.gefahr-box { border-top: 4px solid var(--rot); }
.tabelle-scroll { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); font-size: .95rem; }
.tabelle th, .tabelle td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--akzent); }
.tabelle tr.versteckt td { color: var(--leise); }
.aktionen { display: flex; gap: .5rem .9rem; flex-wrap: wrap; align-items: center; }
.aktionen form { margin: 0; }
.rot { color: var(--rot); }
.gruen { color: var(--gruen); }
.mail-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.mail-raster textarea { font-family: inherit; line-height: 1.5; }
.platzhalter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.platzhalter button { text-transform: none; letter-spacing: 0; font-family: ui-monospace, Consolas, monospace; }
.vorschau-rahmen { width: 100%; height: 640px; border: 1px solid var(--linie); background: #f4f5f6; }
@media (max-width: 860px) { .mail-raster { grid-template-columns: 1fr; } .vorschau-rahmen { height: 520px; } }
pre.code { background: var(--weiss); border: 1px solid var(--linie); padding: 1rem; overflow-x: auto; }
.nur-drucken { display: none; }

/* Eingebettet in die Schulwebsite (iframe): ohne eigenen Kopf und Fuß */
.eingebettet body { background: transparent; min-height: 0; display: block; }
.eingebettet .kopf, .eingebettet .fuss { display: none; }
.eingebettet main { padding-bottom: 1rem; }
.eingebettet main.breite { max-width: none; padding: 0 2px; }
.eingebettet h1 { margin-top: .5rem; }
.eingebettet h1.seitentitel { display: none; } /* die WordPress-Seite hat schon eine Überschrift */

@media (max-width: 520px) {
    body { font-size: 16px; }
    h1 { font-size: 1.45rem; }
    .karten { grid-template-columns: 1fr; }
    .kopf .schule img { height: 36px; }
    .textseite { padding: .3rem 1rem 1.2rem; }
}
@media print {
    .kopf, .fuss, .menue, .nicht-drucken, .meldung { display: none !important; }
    .nur-drucken { display: table-cell; }
    body { background: #fff; display: block; }
    .tabelle th { color: #000; background: none; border-bottom: 2px solid #000; }
    .tabelle th, .tabelle td { border-bottom: 1px solid #999; }
}
