/* ==========================================================================
   ZENTRALE DESIGN-DATEI - HUNDE-TRAININGSKONZEPTE
   Farbschema: Rauchblau, Warmes Sandbeige, Creme & Sand-Gold
   ========================================================================== */

/* 1. LOKALE SCHRIFTARTEN (100 % DSGVO-konform) */
@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat-VariableFont_wgh.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caveat';
    src: url('/fonts/Caveat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* 2. FARB-VARIABLEN */
:root {
    --bg: #FAF8F5;            /* Creme-Hintergrund */
    --card: #FFFFFF;          /* Kartenweiss */
    --sand: #EFECE6;          /* Warmes Sandbeige */
    --sand-hover: #E3DFD6;    /* Dunkleres Sandbeige (Hover) */
    --border: #E2DDD3;        /* Sanfter Rahmen */
    --primary: #4A647A;       /* Rauchblau Hauptfarbe */
    --primary-dark: #384D5F;  /* Dunkles Rauchblau (Hover) */
    --primary-soft: #6D8599;  /* Helles Rauchblau */
    --accent: #C29B70;        /* Sanftes Sand-Gold */
    --accent-dark: #8F6B43;   /* Dunkles Sand-Gold fuer Text */
    --accent-bg: #FAF5EE;     /* Zarter Hintergrund fuer Hinweis-Boxen */
    --accent-border: #E6DAC8; /* Rahmen fuer Hinweis-Boxen */
    --text: #2C3338;          /* Weiches Anthrazit-Blau */
    --text-muted: #5A626A;    /* Gedaempfte Textfarbe */
    --error-bg: #FDF2EE;
    --error-text: #A84A39;
    --error-border: #F2D2C9;
}

/* 3. GRUNDLAGEN & TYPOGRAFIE */
* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.font-caveat {
    font-family: 'Caveat', cursive;
}

/* 4. KOPFZEILE (TOP-BAR) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.12rem;
    text-decoration: none;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.back-link:hover { color: var(--primary-dark); }

.license-badge {
    background: var(--sand);
    color: var(--text-muted);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 0.82rem;
}

.mobile-menu-btn {
    display: none;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

/* 5. ZENTRIERTE SEITEN (LOGIN, INFO, DATENSCHUTZ, IMPRESSUM) */
.page-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.2rem;
}

.login-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 25px rgba(74, 100, 122, 0.06);
}

.login-card h1 {
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.container-narrow {
    max-width: 820px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

.container-wide {
    max-width: 1080px;
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

.card-box {
    background: var(--card);
    border-radius: 18px;
    padding: 2.4rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 25px rgba(74, 100, 122, 0.05);
}

.eyebrow {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.3rem 0;
    display: block;
}

/* 6. FORMULARE & BUTTONS */
.form-input {
    width: 100%;
    padding: 12px 14px;
    margin: 0.5rem 0 1rem 0;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.form-input:focus {
    border-color: var(--primary);
    background: var(--card);
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-full { width: 100%; }

.btn-download {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 0.8rem;
    margin-right: 0.5rem;
    transition: background 0.2s;
}
.btn-download:hover { background: var(--primary-dark); }

.btn-download-outline {
    display: inline-block;
    background: var(--sand);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    margin-top: 0.8rem;
    transition: background 0.2s;
}
.btn-download-outline:hover { background: var(--sand-hover); }

/* 7. HINWEIS- & STATUS-BOXEN */
.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert-success {
    background: #EBF1F5;
    color: var(--primary-dark);
    border: 1px solid #C6D5E0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hint-box-gold {
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.2rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 1.2rem 0;
}
.hint-box-gold strong { color: var(--accent-dark); }
.hint-box-gold a { color: var(--primary); font-weight: 600; text-decoration: underline; }

/* 8. DASHBOARD (KURSUEBERSICHT) */
.kurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.8rem;
}

.kurs-card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.8rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}
.kurs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 100, 122, 0.08);
}
.kurs-card h2 {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin: 0 0 0.6rem 0;
}
.kurs-card p {
    font-size: 0.94rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}

/* 9. KURS-ANSICHT (SIDEBAR, INHALT & SPEZIAL-BOXEN) */
.kurs-layout {
    max-width: 1150px;
    width: 100%;
    margin: 1.8rem auto;
    padding: 0 1.2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    flex: 1;
}

.sidebar {
    background: var(--card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 75px;
}

.sidebar-kurstitel {
    font-family: 'Caveat', cursive;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.8rem 0;
    line-height: 1.2;
    color: var(--primary-dark);
}

.progress-wrap {
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sand);
}
.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}
.progress-bar-bg { background: var(--sand); height: 8px; border-radius: 10px; overflow: hidden; }
.progress-bar-fill { background: var(--primary); height: 100%; border-radius: 10px; transition: width 0.3s ease; }

.kapitel-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.93rem;
    margin-bottom: 6px;
    transition: 0.2s;
}
.kapitel-link:hover, .kapitel-link.active {
    background: var(--sand);
    color: var(--primary-dark);
    font-weight: 600;
}
.check-icon { color: var(--primary); font-weight: bold; font-size: 1rem; }

.content-card {
    background: var(--card);
    border-radius: 18px;
    padding: 2.2rem;
    border: 1px solid var(--border);
}
.content-card h1 {
    font-family: 'Caveat', cursive;
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-top: 0.2rem;
}
.content-card h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1.6rem;
    margin-bottom: 0.5rem;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    margin: 1.5rem 0;
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Trainingskarte, Zauber-Box, Baustein & Checkliste */
.baustein-box {
    background: var(--sand);
    border-left: 4px solid var(--primary);
    padding: 1.3rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0;
}
.trainingskarte {
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 14px;
    padding: 1.5rem;
    margin: 1.8rem 0;
}
.trainingskarte-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
}
.zauber-box {
    background: var(--accent-bg);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 1.3rem 1.5rem;
    margin: 1.5rem 0;
}
.checkliste { list-style: none; padding-left: 0; margin: 0.8rem 0; }
.checkliste li { padding-left: 1.6rem; position: relative; margin-bottom: 0.5rem; }
.checkliste li::before { content: "¹3"; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

/* Post-it Notizzettel mit Reisszwecke */
.postit-lang {
    position: relative;
    margin: 2.2rem auto;
    max-width: 580px;
    width: 92%;
    padding: 2.2rem 1.8rem 1.6rem 1.8rem;
    background: #fefabc linear-gradient(150deg, #f3f098 0%, #fefabc 100%);
    border: 1px solid #dcd692;
    box-shadow: 2px 4px 10px rgba(44, 51, 56, 0.14);
    transform: rotate(1.8deg);
    border-bottom-right-radius: 55px 8px;
    color: #2C3338;
}
.postit-lang h4 {
    font-family: 'Caveat', cursive;
    font-size: 1.65rem;
    font-weight: 700;
    text-align: center;
    margin: 0.4rem 0 0.9rem 0;
    line-height: 1.2;
    color: #2C3338;
}
.postit-lang p { font-size: 0.96rem; line-height: 1.65; margin: 0.5rem 0; }
.postit-lang.notes::before {
    content: "";
    background: var(--primary) radial-gradient(circle at 8px 8px, rgba(255,255,255,0.45), rgba(0,0,0,0.45));
    width: 22px;
    height: 22px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: calc(50% - 11px);
    box-shadow: 2px 3px 4px rgba(0,0,0,0.35);
}

/* Kapitel abschliessen & Navigation */
.complete-box {
    margin-top: 2.2rem;
    padding: 1.2rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.btn-complete {
    background: var(--card);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-complete:hover { background: var(--sand); }
.btn-complete.done { background: var(--primary); color: #FFFFFF; }

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.btn-nav {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: 0.2s;
}
.btn-nav:hover { background: var(--primary-dark); }

/* 10. ZENTRALER FOOTER (OHNE INLINE-STYLES) */
.site-footer {
    margin-top: auto;
    width: 100%;
    background: var(--sand);
    border-top: 1px solid var(--border);
    padding: 1.8rem 1.5rem;
    color: var(--text-muted);
}
.footer-inner {
    max-width: 90%;
    margin: 0 auto;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
}
.footer-links a { color: var(--primary); text-decoration: none; }
.footer-links a:hover { color: var(--primary-dark); text-decoration: underline; }
.footer-sep { color: #C5BEB2; }

.footer-hint {
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 80%;
    margin: 0 auto;
    text-align: center;
}
.footer-hint strong { color: var(--primary-dark); }
.footer-hint a { color: var(--primary); font-weight: 600; text-decoration: underline; }

.footer-copy {
    margin-top: 0.8rem;
    font-size: 0.75rem;
    color: #8A9199;
}

/* 11. MOBILE ANSICHT */
@media (max-width: 850px) {
    .kurs-layout { grid-template-columns: 1fr; margin-top: 1rem; }
    .license-badge { display: none; }
    .mobile-menu-btn { display: inline-block; }
    .sidebar {
        display: none;
        position: fixed;
        top: 60px;
        left: 1rem;
        right: 1rem;
        z-index: 99;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        max-height: 75vh;
        overflow-y: auto;
    }
    .sidebar.open { display: block; }
    .card-box, .content-card { padding: 1.5rem; }
}

/* 12. INFO-SEITEN, IMPRESSUM & DATENSCHUTZ */
.info-section {
    margin-bottom: 1.7rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--sand);
}
.info-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
}
.info-section h2 {
    color: var(--primary);
    font-size: 1.15rem;
    margin: 0 0 0.7rem 0;
}
.info-section code {
    background: var(--sand);
    color: var(--primary-dark);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88rem;
}

.profil-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--sand);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.4rem;
    margin-bottom: 1.8rem;
}
.profil-bild {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card);
    box-shadow: 0 4px 12px rgba(74, 100, 122, 0.12);
    background: var(--card);
    flex-shrink: 0;
}
.profil-info h2 { margin: 0 0 0.3rem 0; font-size: 1.15rem; color: var(--primary-dark); }
.profil-info p { margin: 0; font-size: 0.93rem; color: var(--text-muted); }

.zugang-hint {
    background: var(--sand);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 1.4rem 1.5rem;
    margin-top: 1.2rem;
}
.zugang-hint-title {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}
.hint-list { list-style: none; padding: 0; margin: 0; }
.hint-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-size: 0.93rem;
    color: var(--text);
}
.hint-list li:last-child { margin-bottom: 0; }
.icon-svg {
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    color: var(--primary);
}
.highlight-label { font-weight: 600; color: var(--accent-dark); }

.seitenende {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}
.seitenende a { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.seitenende a:hover { color: var(--primary-dark); }

@media (max-width: 600px) {
    .profil-box { flex-direction: column; text-align: center; }
}

/* 13. PERSÖNLICHE KAPITEL-NOTIZEN */
.notizen-box {
    margin-top: 2.2rem;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-left: 4px solid var(--accent);
    border-radius: 0 14px 14px 0;
    padding: 1.3rem 1.5rem;
}
.notizen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.notizen-titel {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1rem;
}
.notizen-hinweis {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.notizen-textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.notizen-textarea:focus {
    border-color: var(--primary);
}
.notizen-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.7rem;
}
.btn-notiz {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-notiz:hover {
    background: var(--primary-dark);
}
.notiz-saved {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}


