/*
 * Gemeinsames Aussehen aller Themenseiten (familienkalender.html, einkaufsliste.html, …).
 * Erzeugt werden die Seiten aus themenseiten/ (node themenseiten/bauen.mjs) – Änderungen am Aufbau dort,
 * am Aussehen hier. Nach jeder Änderung ?v=… in themenseiten/bauen.mjs hochzählen (Browser-Cache).
 * Externe Datei ist erlaubt: CSP style-src 'self' 'unsafe-inline'.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1f2937;
    line-height: 1.6;
    background: #f8fafc;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ===== HEADER (wie index.html) ===== */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1e293b;
}

.logo img { width: 40px; height: 40px; border-radius: 10px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 32px; }

.nav-links a {
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: #7c3aed; }
.header-buttons { display: flex; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary { background: #7c3aed; color: white; }
.btn-primary:hover { background: #6d28d9; }

.btn-outline {
    background: white;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-outline:hover { border-color: #7c3aed; color: #7c3aed; }

.btn-large { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }

/* ===== ALLGEMEINE BLÖCKE ===== */
.section { padding: 24px 24px; }

.box {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f3ff;
    color: #7c3aed;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 0.85rem;
    color: #64748b;
}

.breadcrumb a { color: #7c3aed; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== HERO ===== */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-lead {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 28px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 24px;
    font-size: 0.9rem;
    color: #64748b;
}

.hero-facts span::before {
    content: "✓";
    color: #059669;
    font-weight: 700;
    margin-right: 6px;
}

/* Modul-Video (Hochformat 9:16, stumm). Startet nur auf Tipp – native Bedienleiste
   liefert Pause (BFSG/WCAG 2.2.2); preload="none" lädt bis dahin nur das Vorschaubild. */
/* Dunkler Rahmen wie .phone-frame auf der Startseite – ohne ihn verschwimmt der helle
   Video-Hintergrund mit der weißen Karte (Christoph, 23.11.2026) */
.video-box {
    max-width: 300px;
    margin: 0 auto;
    background: #1e293b;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

.video-box video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 28px;
    background: #f5f3ff;
}

.video-caption {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== FUNKTIONEN ===== */
.section-head { max-width: 720px; margin-bottom: 40px; }

.section-head h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-head p { font-size: 1.05rem; color: #64748b; line-height: 1.7; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 24px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.feature-card p { font-size: 0.95rem; color: #475569; line-height: 1.6; }
.feature-card p + p { margin-top: 8px; }

.note {
    margin-top: 28px;
    padding: 16px 20px;
    background: #f5f3ff;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #4c1d95;
    line-height: 1.6;
}

/* ===== WECHSEL ===== */
.switch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.switch-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
}

.switch-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.switch-card p { font-size: 0.95rem; color: #475569; line-height: 1.6; }

/* ===== FAQ ===== */
.faq { max-width: 820px; }

.faq details {
    border-bottom: 1px solid #e2e8f0;
}

.faq summary {
    list-style: none;
    cursor: pointer;
    min-height: 56px;
    padding: 16px 40px 16px 0;
    position: relative;
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: #7c3aed;
}

.faq details[open] summary::after { content: "–"; }

.faq summary:focus-visible {
    outline: 3px solid #a78bfa;
    outline-offset: 2px;
    border-radius: 4px;
}

.faq .answer {
    padding: 0 0 20px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq .answer a { color: #7c3aed; font-weight: 600; }
.faq .answer a:hover { text-decoration: underline; }

/* ===== CTA ===== */
.cta {
    max-width: 1200px;
    margin: 0 auto;
    background: #1e293b;
    color: white;
    padding: 56px 60px;
    border-radius: 24px;
    text-align: center;
}

.cta h2 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.cta p { font-size: 1.05rem; color: #cbd5e1; margin-bottom: 28px; }
.cta .hero-buttons { justify-content: center; }
.cta .btn-outline { background: transparent; color: white; border-color: #475569; }
.cta .btn-outline:hover { border-color: white; color: white; }

/* ===== FOOTER (wie index.html) ===== */
.footer { padding: 24px 24px 48px; }

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #0f172a;
    color: white;
    padding: 48px;
    border-radius: 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand { display: flex; align-items: flex-start; gap: 16px; }
.footer-brand img { width: 48px; height: 48px; border-radius: 12px; }
.footer-brand-text h4 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.footer-brand-text p { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }

.footer-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    /* >= 44px Touchfläche (BFSG / WCAG 2.5.8) */
    padding: 11px 0;
    transition: color 0.2s;
}

.footer-section a:hover { color: white; }

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* ===== MOBILE MENÜ (assets/menu.js) ===== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: #475569;
}

.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 16px 24px;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: #475569;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu a:last-child { border-bottom: none; }

.mobile-menu .btn-primary {
    display: block;
    margin-top: 12px;
    text-align: center;
    padding: 12px 20px;
    color: white;
}

/* ===== MEDIEN NEBEN DER ÜBERSCHRIFT ===== */
/* Handy-Screenshot im dunklen Rahmen (wie .phone-frame auf der Startseite) */
.phone-frame {
    background: #1e293b;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    margin: 0 auto;
}

.phone-frame img { border-radius: 28px; display: block; width: 100%; height: auto; }

/* Querformat-Screenshot (Desktop-Ansicht) im dunklen Rahmen */
.screen-frame {
    background: #1e293b;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    max-width: 520px;
    margin: 0 auto;
}

.screen-frame img { border-radius: 12px; display: block; width: 100%; height: auto; }

/* Seite ohne Bild/Video: Text über die ganze Breite */
.hero.hero--text { grid-template-columns: 1fr; }
.hero.hero--text > div { max-width: 760px; }

/* Links im Fließtext der Karten und Antworten */
.feature-card a, .switch-card a { color: #7c3aed; font-weight: 600; }
.feature-card a:hover, .switch-card a:hover { text-decoration: underline; }

/* ===== WEITERE MODULE ===== */
.module-links { display: flex; flex-wrap: wrap; gap: 12px; }

.module-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: white;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.module-links a:hover { border-color: #7c3aed; color: #7c3aed; }
.module-links a:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }

/* ===== FOOTER: ZEILE MIT ALLEN THEMENSEITEN ===== */
.footer-modules { padding-bottom: 24px; }

.footer-modules h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #e2e8f0;
}

.footer-modules nav { display: flex; flex-wrap: wrap; column-gap: 24px; }

.footer-modules a {
    display: block;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 11px 0;
    transition: color 0.2s;
}

.footer-modules a:hover { color: white; }

/* Stand-Datum unter den Haken der Themenseiten */
.stand-zeile { margin-top: 12px; font-size: 0.85rem; color: #64748b; }

/* ===== HILFE (hilfe.html, hilfe-*.html – Inhalt aus wiki/hilfe.html) ===== */
.help-h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 16px;
}

.faq-more {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #475569;
}

.faq-more a, .help-intro a, .note a { color: #7c3aed; font-weight: 600; }
.faq-more a:hover, .help-intro a:hover, .note a:hover { text-decoration: underline; }

.help-intro p { font-size: 1.05rem; color: #475569; line-height: 1.7; }
.help-intro p + p, .help-intro ul { margin-top: 12px; }
.help-intro ul { padding-left: 22px; color: #475569; }
.help-intro .stand { display: block; margin-top: 12px; font-size: 0.85rem; color: #64748b; }

.help-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Antworten aus der Quelle: Absätze, Listen, Beispiele, Modul-Marken */
.faq .answer p + p,
.faq .answer p + ul, .faq .answer p + ol,
.faq .answer ul + p, .faq .answer ol + p { margin-top: 10px; }
.faq .answer ul, .faq .answer ol { padding-left: 22px; }
.faq .answer li + li { margin-top: 4px; }
.faq .answer strong { color: #1e293b; }

.use-case {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f5f3ff;
    border-left: 3px solid #7c3aed;
    border-radius: 8px;
    color: #4c1d95;
}

.badge {
    display: inline-block;
    padding: 0 8px;
    border-radius: 6px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.85em;
    font-weight: 600;
}

/* Übersicht: Themen-Karten mit Fragen-Links */
.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.help-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
}

.help-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.help-card h3 a { color: #1e293b; }
.help-card h3 a:hover { color: #7c3aed; }
.help-card ul { list-style: none; }

.help-card li a {
    display: block;
    padding: 6px 0;
    font-size: 0.92rem;
    color: #475569;
}

.help-card li a:hover { color: #7c3aed; }
.help-card .mehr { margin-top: 6px; font-size: 0.9rem; font-weight: 600; color: #7c3aed; }

/* Installation: drei Karten */
.install-card ol { padding-left: 22px; color: #475569; font-size: 0.95rem; line-height: 1.6; }
.install-card li + li { margin-top: 6px; }
.install-card .req { margin-top: 12px; font-size: 0.88rem; color: #64748b; }

@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; gap: 40px; }
    .feature-grid, .switch-grid, .help-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .header-buttons { display: none; }
    .mobile-menu-btn { display: block; }

    .section { padding: 0 16px 24px; }
    .breadcrumb { padding: 12px 16px 12px; }

    .box { padding: 32px 20px; border-radius: 16px; }
    .cta { padding: 32px 20px; border-radius: 16px; }

    .hero h1, .help-h1 { font-size: 1.75rem; }
    .hero-lead { font-size: 1rem; }
    .section-head h2, .cta h2 { font-size: 1.5rem; }

    .feature-grid, .switch-grid, .help-grid { grid-template-columns: 1fr; }

    .footer { padding: 0 16px 24px; }
    .footer-container { padding: 32px 24px; border-radius: 16px; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
}
