/* ============================================================
   Lernnetz-Schule.de – Hauptstyles
   Stil: Freundlich, bunt, schülernah – Lila als Hauptfarbe
   Font: Nunito (rund, freundlich, lesbar)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Nunito+Sans:wght@400;600&display=swap');

:root {
    --primary:        #7c3aed;
    --primary-light:  #8b5cf6;
    --primary-dark:   #5b21b6;
    --primary-bg:     #ede9fe;
    --primary-bg2:    #f5f3ff;
    --accent-bg:      #fce7f3;
    --accent-pink:    #ec4899;
    --accent-yellow:  #f59e0b;
    --accent-teal:    #14b8a6;
    --accent-blue:    #3b82f6;
    --text:           #1e1b4b;
    --text-muted:     #6b7280;
    --text-light:     #9ca3af;
    --border:         #e5e7eb;
    --bg:             #fafafa;
    --white:          #ffffff;
    --success:        #059669;
    --success-bg:     #d1fae5;
    --warning:        #d97706;
    --warning-bg:     #fef3c7;
    --danger:         #dc2626;
    --danger-bg:      #fee2e2;
    --info:           #2563eb;
    --info-bg:        #dbeafe;
    --radius-sm:      6px;
    --radius:         12px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --shadow-sm:      0 1px 3px rgba(124,58,237,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow:         0 4px 16px rgba(124,58,237,.12), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg:      0 12px 40px rgba(124,58,237,.18), 0 4px 8px rgba(0,0,0,.08);
    --font:           'Nunito', sans-serif;
    --font-body:      'Nunito Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.65; min-height: 100vh; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font); font-weight: 800; line-height: 1.25; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--white); border-bottom: 2px solid var(--primary-bg); position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 12px rgba(124,58,237,.08); }
.site-header nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font); font-weight: 900; font-size: 22px; color: var(--text); white-space: nowrap; }
.logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--primary), var(--accent-pink)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.logo span { color: var(--primary); }
.logo small { font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--primary-bg); padding: 2px 8px; border-radius: 20px; margin-left: 4px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 600; font-family: var(--font); transition: all .2s; white-space: nowrap; }
.nav-links a:hover { background: var(--primary-bg); color: var(--primary); }
.nav-links .btn-nav { background: var(--primary); color: white !important; padding: 8px 18px; }
.nav-links .btn-nav:hover { background: var(--primary-dark) !important; color: white !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 24px; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 700; font-family: var(--font); cursor: pointer; text-decoration: none; transition: all .2s; line-height: 1; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px rgba(124,58,237,.35); }
.btn-primary:hover { background: var(--primary-dark); color: white; box-shadow: 0 6px 20px rgba(124,58,237,.45); }
.btn-secondary { background: var(--primary-bg); color: var(--primary); }
.btn-secondary:hover { background: #ddd6fe; color: var(--primary-dark); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg2); }
.btn-success { background: var(--success); color: white; }
.btn-danger  { background: var(--danger);  color: white; }
.btn-pink    { background: var(--accent-pink); color: white; }
.btn-lg { padding: 14px 32px; font-size: 17px; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 16px; font-size: 13px; border-radius: var(--radius-sm); }

/* Flash */
.flash-container { margin: 20px 0 0; }
.flash { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 10px; font-size: 14px; font-weight: 600; font-family: var(--font); animation: slideDown .3s ease; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.flash-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.flash-error   { background: var(--danger-bg);  color: var(--danger);  border-left: 4px solid var(--danger); }
.flash-info    { background: var(--info-bg);    color: var(--info);    border-left: 4px solid var(--info); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border-left: 4px solid var(--warning); }

/* Main */
.main-content { padding: 40px 24px 60px; min-height: calc(100vh - 68px - 80px); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-bg-1, #f5f3ff) 0%, var(--hero-bg-2, #fce7f3) 50%, var(--hero-bg-3, #ede9fe) 100%); border-radius: var(--radius-xl); padding: 72px 48px; text-align: center; position: relative; overflow: hidden; margin-bottom: 48px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: white; color: var(--primary); border: 2px solid var(--primary-bg); padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 700; font-family: var(--font); margin-bottom: 24px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 900; margin-bottom: 20px; background: linear-gradient(135deg, var(--primary-dark), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stat .number { font-family: var(--font); font-size: 28px; font-weight: 900; color: var(--primary); }
.hero-stat .label { font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* Feature Cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 48px; }
.feature-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: all .25s; }
.feature-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.feature-icon.purple { background: var(--primary-bg); }
.feature-icon.pink   { background: #fce7f3; }
.feature-icon.teal   { background: #ccfbf1; }
.feature-icon.yellow { background: #fef9c3; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* Cards */
.card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--primary-bg); }

/* Forms */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; font-family: var(--font); margin-bottom: 7px; color: var(--text); }
.form-group label .required { color: var(--accent-pink); margin-left: 3px; }
.form-control { width: 100%; padding: 11px 16px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 15px; font-family: var(--font-body); color: var(--text); background: var(--white); transition: all .2s; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,58,237,.1); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.error-box { background: var(--danger-bg); border: 2px solid #fca5a5; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; }
.error-box ul { list-style: none; }
.error-box li { color: var(--danger); font-size: 14px; font-weight: 600; font-family: var(--font); padding: 3px 0; }
.error-box li::before { content: '✕ '; font-size: 12px; }

/* Listings */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.listing-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: all .25s; text-decoration: none; color: inherit; display: block; position: relative; }
.listing-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-3px); color: inherit; }
.listing-card .subject-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-bg); color: var(--primary); padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; font-family: var(--font); margin-bottom: 12px; }
.listing-card h3 { font-size: 18px; margin-bottom: 4px; }
.listing-card .meta { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.listing-card .price { font-size: 20px; font-weight: 800; font-family: var(--font); color: var(--primary); margin-top: 12px; }
.listing-card .verified-badge { position: absolute; top: 16px; right: 16px; background: var(--success-bg); color: var(--success); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--font); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; font-family: var(--font); }
.badge-purple { background: var(--primary-bg); color: var(--primary); }
.badge-green  { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--warning-bg); color: var(--warning); }
.badge-red    { background: var(--danger-bg);  color: var(--danger); }
.badge-pink   { background: #fce7f3; color: var(--accent-pink); }

/* Page Header */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 32px; margin-bottom: 8px; }
.page-header p { color: var(--text-muted); font-size: 16px; }

/* Auth */
.auth-wrapper { min-height: calc(100vh - 148px); display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); }
.auth-card h2 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

/* Wochentag-Buttons (Verfügbarkeits-Picker) */
.weekday-btn {
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all .2s;
}

/* Aktiv = Tag ist eingeschaltet */
.weekday-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Inaktiv = Tag ist ausgeschaltet */
.weekday-btn:not(.active) {
    background: var(--bg);
    color: var(--text-light);
    border-color: var(--border);
    text-decoration: line-through;
    opacity: 0.5;
}

/* Footer */
.site-footer { background: var(--footer-bg, var(--text)); color: var(--footer-muted, #a5b4fc); padding: 32px 24px; text-align: center; font-size: 14px; }
.site-footer a { color: var(--footer-link, #c4b5fd); }
.site-footer a:hover { text-decoration: underline; opacity: .85; }
.site-footer .footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

/* Animations */
@keyframes fadeInUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.animate-in { animation: fadeInUp .4s ease forwards; }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 48px 24px; }
    .hero h1 { font-size: 30px; }
    .features-grid { grid-template-columns: 1fr; }
    .nav-links .hide-mobile { display: none; }
}
@media (max-width: 480px) {
    .listing-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
}
/* Navbar auf Startseite höher für hängendes Logo */
.navbar {
    min-height: 64px;
    overflow: visible !important;
    position: relative;
    z-index: 50;
}

/* Hero-Bereich auf Startseite bekommt oben Abstand */
.hero {
    padding-top: 60px; /* Platz für das hängende Logo */
}
.navbar {
    z-index: 50;
}
.hero {
    position: relative;
    z-index: 40;
}
/* Dual-Handle Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(124,58,237,.4);
    pointer-events: all;
    cursor: grab;
    margin-top: -7px;
}
input[type=range]::-webkit-slider-thumb:active {
    cursor: grabbing;
    box-shadow: 0 2px 10px rgba(124,58,237,.6);
}
input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(124,58,237,.4);
    pointer-events: all;
    cursor: grab;
}

/* ------------------------------------------------------------
   Druckansicht — überall im Sitewide-Layout: nur der eigentliche
   Seiteninhalt wird gedruckt, Menü/Footer/Flash-Meldungen nicht.
   Einzelne Seiten (z.B. Verifikations-/Einwilligungszettel) können
   zusätzlich per .no-print / .print-* Klassen feiner steuern.
   ------------------------------------------------------------ */
@media print {
    .site-header, .site-footer, .flash-container, .no-print {
        display: none !important;
    }
    body { background: #fff; }
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
    }
    @page { size: A4; margin: 10mm; }
}
input[type=range]::-webkit-slider-runnable-track { background: transparent; }
input[type=range]::-moz-range-track { background: transparent; }
/* Mobile: Kopfzeile darf umbrechen statt Menüpunkte abzuschneiden */
@media (max-width: 768px) {
    .site-header nav { overflow: visible !important; height: auto !important; }
    .site-header .nav-inner { height: auto !important; min-height: 56px; padding: 8px 16px !important; gap: 6px 10px !important; flex-wrap: wrap; }
    .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
    .nav-links a { padding: 6px 10px; font-size: 13px; }
    .nav-links .btn-nav { padding: 6px 12px; }
}

/* Mobile: mehrspaltige Inline-Raster (Formulare, Kacheln) untereinander statt aus dem Bild */
@media (max-width: 640px) {
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns:2fr 1fr"],
    [style*="grid-template-columns:1fr 360px"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Schulleiter: grafisches Menue (Kacheln) im Seitenkopf, ersetzt das lange Kopfmenue */
.school-hero { background: linear-gradient(135deg, var(--hero-bg-1, #f5f3ff) 0%, var(--hero-bg-2, #fce7f3) 100%); border-radius: var(--radius-xl); padding: 28px 32px; margin-bottom: 24px; }
.school-hero h1 { font-size: 28px; margin-bottom: 4px; }
.school-hero-meta { font-size: 14px; color: var(--text-muted); }
.school-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.school-hero-stat { background: rgba(255,255,255,.85); border-radius: var(--radius); padding: 8px 14px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.school-hero-stat strong { display: block; font-family: var(--font); font-size: 20px; line-height: 1.1; color: var(--text); }
.hub-group { font-family: var(--font); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 26px 0 10px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.hub-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); transition: all .2s; }
.hub-tile:hover { border-color: var(--primary-light, var(--primary)); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.hub-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--primary-bg); }
.hub-title { font-family: var(--font); font-weight: 800; font-size: 15px; }
.hub-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.hub-badge { position: absolute; top: 12px; right: 12px; min-width: 22px; text-align: center; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; background: var(--primary); }
.hub-badge.urgent { background: var(--danger); }
.hub-tile.attention { border-color: var(--primary); background: var(--primary-bg2); }
.crumb { font-size: 13px; color: var(--text-muted); margin: 0 0 18px; font-weight: 600; }
.crumb a { color: var(--primary); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
@media (max-width: 640px) { .school-hero { padding: 20px 18px; } .hub-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
