/*
 * entwicklung.css - gemeinsames Stylesheet fuer den Bereich Entwicklung & Talentfoerderung
 * (Editoren: Foerderplaene, Monitoring, Leistungsdiagnostik; Infomodule: Kognitive
 * Entwicklung, Talentidentifikation, Uebergangs-Management). Familienfarbe: Violett.
 * CTA bleibt Orange. Editor- und Info-Klassen in einer Datei, damit alle 6 einheitlich sind.
 */

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-soft: #f5f3ff;
    --secondary: #a78bfa;
    --accent: #f59e0b;        /* einheitliche Aktionsfarbe (CTA) ueber alle Module */
    --text: #1f2937;
    --text-soft: #6b7280;
    --bg: #f8fafc;
    --border: #e5e7eb;
    --ok: #16a34a;
    --warn: #dc2626;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }

/* ===== Kopf / Toolbar (Editoren wie Infomodule) ===== */
.editor-header {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff; padding: 1rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.editor-header h1 { font-family: 'Poppins', sans-serif; font-size: 1.35rem; font-weight: 600; }
.editor-header .sub { font-size: 0.85rem; opacity: 0.9; font-weight: 300; }
.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btn {
    border: none; border-radius: 50px; padding: 0.6rem 1.2rem;
    font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; text-decoration: none; display: inline-block;
}
.btn-pdf { background: var(--accent); color: #fff; }
.btn-pdf:hover { background: #e88100; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.28); }
body.embed .editor-header { display: none; }

/* Themen-Headerbild */
.ent-hero img { display: block; width: 100%; height: 170px; object-fit: cover; }
@media (max-width: 600px) { .ent-hero img { height: 120px; } }

/* ===== Inhalt ===== */
.wrap { max-width: 900px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }
.intro { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 1.5rem; }
.ent-h1 { font-family: 'Poppins', sans-serif; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--primary-dark); margin-bottom: 0.6rem; }
.ent-lead { font-size: 1.02rem; color: var(--text-soft); margin-bottom: 1.5rem; max-width: 70ch; }

/* Karten (Editor-Bloecke und Info-Abschnitte) */
.card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
    position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.card h2 {
    font-family: 'Poppins', sans-serif; font-size: 1.2rem; color: var(--primary-dark);
    margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;
}

/* Formularfelder */
label { display: block; font-weight: 600; font-size: 0.85rem; margin: 0.7rem 0 0.3rem; color: var(--text); }
.hint { font-weight: 400; color: var(--text-soft); font-size: 0.8rem; }
input[type=text], input[type=date], input[type=number], textarea, select {
    width: 100%; border: 1.5px solid var(--border); border-radius: 8px;
    padding: 0.55rem 0.7rem; font-family: 'Inter', sans-serif; font-size: 0.95rem;
    color: var(--text); background: #fff; resize: vertical;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.18);
}
textarea { min-height: 60px; overflow: hidden; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.25rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.6rem 1.25rem; }
@media (max-width: 600px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.agebar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.agebar select { max-width: 360px; }
.saved-note { font-size: 0.8rem; color: var(--primary-dark); font-weight: 600; min-height: 1.1em; }

/* Tabelle (z. B. Leistungsdiagnostik) */
table.ent-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.ent-table th, .ent-table td { border: 1px solid var(--border); padding: 0.5rem 0.6rem; text-align: left; font-size: 0.9rem; vertical-align: top; }
.ent-table th { background: var(--primary-soft); color: var(--primary-dark); font-family: 'Poppins', sans-serif; font-weight: 600; }
.ent-table input { border: 1px solid var(--border); }

/* Info-Listen */
.ent-list { list-style: none; margin: 0.4rem 0 0.6rem; }
.ent-list li { position: relative; padding-left: 1.7rem; margin-bottom: 0.5rem; color: var(--text-soft); }
.ent-list li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.ent-list.dot li::before { content: '\2022'; color: var(--primary); font-size: 1.2rem; line-height: 1.2; }
.ent-list.check li::before { content: '\2713'; color: var(--ok); }
.ent-list.cross li::before { content: '\2715'; color: var(--warn); }
.ent-list strong { color: var(--text); }
.card p { color: var(--text-soft); margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }

/* Hervorhebungs-Boxen */
.ent-callout { border-radius: 12px; padding: 1rem 1.25rem; margin: 1rem 0; border: 1px solid; }
.ent-callout-title { font-family: 'Poppins', sans-serif; font-weight: 600; display: block; margin-bottom: 0.3rem; }
.ent-callout p { margin: 0; font-size: 0.95rem; }
.ent-callout.is-info { background: var(--primary-soft); border-color: #ddd6fe; color: var(--primary-dark); }
.ent-callout.is-info p { color: #5b21b6; }
.ent-callout.is-tip { background: #fffbeb; border-color: #fde68a; }
.ent-callout.is-tip p, .ent-callout.is-tip .ent-callout-title { color: #92400e; }
.ent-callout.is-alert { background: #fef2f2; border-color: #fecaca; }
.ent-callout.is-alert p, .ent-callout.is-alert .ent-callout-title { color: #991b1b; }

/* Kachel-Raster */
.ent-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0; }
.ent-tile { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.2rem; }
.ent-tile-emoji { font-size: 1.6rem; }
.ent-tile h3 { font-family: 'Poppins', sans-serif; font-size: 1.05rem; color: var(--text); margin: 0.4rem 0 0.3rem; }
.ent-tile p { color: var(--text-soft); font-size: 0.9rem; }

.ent-ages { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.2rem 0 0.6rem; }
.ent-age { background: var(--primary-soft); color: var(--primary-dark); border-radius: 50px; padding: 0.1rem 0.6rem; font-size: 0.72rem; font-weight: 600; }
.ent-source { font-size: 0.8rem; color: var(--text-soft); margin-top: 0.75rem; }
.ent-source a { color: var(--primary-dark); }

@media (max-width: 600px) {
    .card { padding: 1.25rem 1.25rem; }
    .wrap { padding: 1.25rem 1rem 3rem; }
}

@media print {
    @page { margin: 14mm; }
    body { background: #fff; }
    .editor-header, .toolbar, .no-print { display: none !important; }
    .wrap { max-width: none; padding: 0; }
    .card { box-shadow: none; border: 1px solid #d1d5db; break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px; }
    .card::before { display: none; }
    input[type=text], input[type=date], input[type=number], textarea, select { border: none; padding: 2px 0; font-size: 11pt; background: transparent; color: #000; }
    .ent-table th, .ent-table td { border: 1px solid #999; }
    .ent-table input { border: none; }
    textarea { resize: none; }
    label { margin: 6px 0 1px; }
    .ent-tile, .ent-callout { box-shadow: none; border: 1px solid #d1d5db; break-inside: avoid; }
    .print-title { display: block !important; }
}
.print-title { display: none; }

/* Embed-Modus (im Homepage-Modal) */
body.embed { background: #fff; }
body.embed .wrap { padding-top: 1.25rem; }
.embed-toolbar {
    position: sticky; top: 0; z-index: 6;
    display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
    padding: 0.75rem 1rem; background: #f8fafc; border-bottom: 1px solid var(--border);
}
.embed-toolbar .btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--border); }
.embed-toolbar .btn-ghost:hover { border-color: var(--primary); background: var(--primary-soft); }
.embed-toolbar .btn-pdf { background: var(--accent); color: #fff; }
.embed-toolbar .btn-pdf:hover { background: #e88100; }
