/* ==========================================================
   SBS Bildungsprojekte – modernes, leichtes Design
   Keine externen Schriften / Dienste (DSGVO-freundlich)
   ========================================================== */

:root {
    --navy-900: #0a1d35;
    --navy-800: #0f2a4a;
    --navy-700: #16375f;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --amber-500: #f59e0b;
    --ink: #1b2535;
    --muted: #5b6678;
    --line: #e3e8ef;
    --bg: #f6f8fb;
    --white: #ffffff;
    --danger: #c0392b;
    --success: #14804a;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 42, 74, .06), 0 2px 8px rgba(15, 42, 74, .06);
    --shadow-md: 0 10px 30px rgba(15, 42, 74, .12);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-600); text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy-800); margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--navy-800); color: #fff;
    padding: .7rem 1rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-800); }
.brand-mark { color: var(--navy-800); display: inline-flex; }
.brand-text { font-size: 1.05rem; line-height: 1.1; font-weight: 500; }
.brand-text strong { font-weight: 800; letter-spacing: .04em; color: var(--navy-800); }
.brand-text small { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }

.main-nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a:not(.btn) {
    display: block; padding: .55rem .9rem; border-radius: 999px; text-decoration: none;
    color: var(--ink); font-weight: 500; font-size: .98rem; transition: background .2s, color .2s;
}
.main-nav a:not(.btn):hover { background: var(--bg); color: var(--teal-600); }
.main-nav a.is-active { color: var(--teal-600); background: rgba(20, 184, 166, .1); }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; border-radius: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-800); margin: 5px 0; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .9rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
    background: var(--teal-500); color: var(--navy-900) !important; font: inherit; font-weight: 700;
    text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
    box-shadow: 0 6px 18px rgba(20, 184, 166, .35);
}
.btn:hover { background: #2dd4bf; transform: translateY(-1px); }
.btn-small { padding: .55rem 1.1rem; font-size: .95rem; box-shadow: none; }
.btn-ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .55); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { background: transparent; color: var(--navy-800) !important; border-color: var(--line); box-shadow: none; }
.btn-outline:hover { background: var(--bg); border-color: var(--navy-700); }
.btn-danger { background: var(--danger); color: #fff !important; box-shadow: none; }
.btn-danger:hover { background: #a33025; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(20, 184, 166, .35), transparent 60%),
        radial-gradient(700px 400px at -5% 110%, rgba(245, 158, 11, .22), transparent 60%),
        linear-gradient(135deg, var(--navy-900), var(--navy-700));
    padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 9vw, 8rem);
}
.hero::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 70px;
    background: var(--white); clip-path: ellipse(75% 100% at 50% 100%);
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { font-size: 1.2rem; max-width: 56ch; color: rgba(255, 255, 255, .85); }
.eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--teal-500); margin-bottom: 1rem;
}
.hero .eyebrow { background: rgba(20, 184, 166, .15); padding: .4rem .9rem; border-radius: 999px; color: #5eead4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.8rem; padding: 0; list-style: none; }
.hero-badges li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: rgba(255, 255, 255, .88); }
.hero-badges svg { color: var(--teal-500); flex: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 62ch; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .icon {
    width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
    background: rgba(20, 184, 166, .12); color: var(--teal-600); margin-bottom: 1.1rem;
}
.card-feature { position: relative; border-top: 4px solid var(--teal-500); }
.tick-list { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.tick-list li { position: relative; padding-left: 1.9rem; margin-bottom: .55rem; }
.tick-list li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 1.15rem; height: 1.15rem; border-radius: 50%;
    background: var(--teal-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230a1d35' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
}
.tag {
    display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px;
    background: rgba(245, 158, 11, .15); color: #92600a; margin-bottom: .9rem;
}

/* Schritte */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 3.4rem; }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; top: 0; left: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; color: var(--navy-900); background: var(--teal-500);
}
.steps h3 { margin-bottom: .3em; }
.steps p { color: var(--muted); font-size: .98rem; }

/* Call to Action */
.cta {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff;
    border-radius: 24px; padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap;
    gap: 1.5rem; align-items: center; justify-content: space-between;
}
.cta h2 { color: #fff; margin: 0 0 .3em; }
.cta p { margin: 0; color: rgba(255, 255, 255, .8); }

/* Unterseiten-Kopf */
.page-hero {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff;
    padding: clamp(2.8rem, 6vw, 4.5rem) 0;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .3em; }
.page-hero p { margin: 0; color: rgba(255, 255, 255, .8); max-width: 60ch; }

/* Standorte */
.location-card { display: flex; flex-direction: column; gap: .4rem; }
.location-card h2 { font-size: 1.35rem; margin-bottom: .2em; }
.meta-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .65rem; }
.meta-list li { display: flex; gap: .7rem; align-items: flex-start; }
.meta-list svg { flex: none; margin-top: .2rem; color: var(--teal-600); }
.map-link { margin-top: auto; padding-top: 1rem; }

/* Rechtstexte */
.legal { max-width: 78ch; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.6rem; }
.legal-notice {
    background: #fff8e6; border: 1px solid #f3dca0; border-radius: 12px; padding: 1rem 1.2rem;
    font-size: .95rem; margin-bottom: 2rem;
}

/* ---------- Formulare ---------- */
.form-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; color: var(--navy-800); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; font: inherit; color: inherit; padding: .85rem 1rem; background: #fff;
    border: 1.5px solid #cfd7e3; border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(20, 184, 166, .18);
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .88rem; margin-top: .3rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; color: var(--muted); }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; accent-color: var(--teal-600); flex: none; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.counter { text-align: right; font-size: .82rem; color: var(--muted); margin-top: .25rem; }

.alert { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.5rem; border: 1px solid; }
.alert-success { background: #eaf8f0; border-color: #a8dcc0; color: #11593a; }
.alert-error { background: #fdecea; border-color: #f2b8b0; color: #8a2217; }
.alert-info { background: #eaf3fb; border-color: #b8d6ee; color: #174a73; }
.alert strong { display: block; margin-bottom: .2rem; }

.aside-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.aside-card h2 { font-size: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .78); padding-top: 3.5rem; font-size: .96rem; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--teal-500); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .6rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .6rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
address { font-style: normal; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
    padding: 1.3rem 0 1.8rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem;
}

/* ---------- Scroll-Animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid-3, .steps { grid-template-columns: repeat(2, 1fr); }
    .form-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute; inset: 74px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md); display: none; padding: 1rem 1.25rem 1.4rem;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: .2rem; }
    .main-nav a:not(.btn) { padding: .8rem 1rem; }
    .main-nav .btn { margin-top: .6rem; width: 100%; }
}
@media (max-width: 620px) {
    body { font-size: 16px; }
    .grid-2, .grid-3, .steps, .form-row, .footer-grid { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
}

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-bar { background: var(--navy-800); color: #fff; }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.admin-bar a { color: #fff; text-decoration: none; opacity: .9; }
.admin-bar a:hover { opacity: 1; text-decoration: underline; }
.admin-bar .links { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.admin-main { padding: 2rem 0 4rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; }
.stat b { display: block; font-size: 1.8rem; color: var(--navy-800); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f1f4f9; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.unread td { background: #f2fbf9; font-weight: 600; }
.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill-ok { background: #e1f5ea; color: #11593a; }
.pill-err { background: #fde5e2; color: #8a2217; }
.pill-new { background: var(--teal-500); color: var(--navy-900); }
.pill-muted { background: #eceff4; color: var(--muted); }
.toolbar { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; }
.toolbar input[type=search] { font: inherit; padding: .6rem .9rem; border: 1.5px solid #cfd7e3; border-radius: 10px; min-width: 220px; }
.inline-form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; color: var(--danger); cursor: pointer; font: inherit; text-decoration: underline; }
.msg-body { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 1.2rem; border: 1px solid var(--line); }
.dl { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
.login-box { max-width: 420px; margin: 8vh auto; }
.pager { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.pager .cur { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } .dl { grid-template-columns: 1fr; } }

@media print {
    .site-header, .site-footer, .nav-toggle, .admin-bar, .toolbar { display: none !important; }
    body { font-size: 12pt; }
}
