/*
 Theme Name:   Twenty Twenty-Four Child
 Description:  Individuelles Child-Theme optimiert nach Lehr-Lern-Psychologie. Beinhaltet klebrige Sidebars ohne Layout-Shift, optimalen Whitespace, elaboriertes Feedback und visuelle Autonomie-Marker.
 Author:       Ihr Name
 Template:     twentytwentyfour
 Version:      1.2.0
*/


body {
	text-align: justify;
	background-color: #f4f5f7;
}


/* ==========================================================================
   1. Obere Navigation & Dropdown (Sticky)
   ========================================================================== */
.top-navigation {
    background-color: #2c3e50;
    padding: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.admin-bar .top-navigation { top: 32px; }
.main-menu { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.main-menu > li { position: relative; }
.main-menu a { color: #ffffff; text-decoration: none; padding: 15px 20px; display: block; font-family: sans-serif; transition: background 0.3s; }
.main-menu a:hover { background-color: #34495e; }

/* Hover-Effekt für Untermenü-Einträge (hellere Stufe, da Hintergrund bereits #34495e) */
.main-menu .sub-menu a:hover,
.dropdown li a:hover {
    background-color: #4a6278;
}

/* Pfeil-Indikator für Menüpunkte mit Untermenü */
.main-menu > li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    margin-left: 7px;
    vertical-align: middle;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.75);
    transition: transform 0.25s ease, border-top-color 0.25s ease;
}
.main-menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
    border-top-color: #ffffff;
}

/* FIX: WordPress rendert Untermenüs als .sub-menu – beide Klassen abdecken */
.dropdown,
.main-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #34495e;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 999;
}
.dropdown li a,
.main-menu .sub-menu li a {
    padding: 12px 15px;
    border-bottom: 1px solid #2c3e50;
}
.main-menu li:hover > .dropdown,
.main-menu li:hover > .sub-menu {
    display: block;
}

/* ==========================================================================
   2. Layout-Strukturen, Klebrige Sidebars & Whitespace
   ========================================================================== */
.breadcrumbs { background-color: #f5f6fa; padding: 10px 0; border-bottom: 1px solid #dcdde1; font-family: sans-serif; font-size: 0.9em; }
.breadcrumbs-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.breadcrumbs a { color: #2980b9; text-decoration: none; }
.breadcrumbs .breadcrumb-separator { margin: 0 8px; color: #7f8c8d; }
.breadcrumbs .current { color: #7f8c8d; }
html { scroll-behavior: smooth; }

.site-container { max-width: 1200px; margin: 30px auto; padding: 0 20px; display: flex; font-family: sans-serif; gap: 30px; }

/* LERNPSYCHOLOGIE: Feste Breitenregelung und Sichtbarkeits-Steuerung verhindert Text-Springen (Layout Shift) */
.sidebar-left, .sidebar-right { 
    position: -webkit-sticky; 
    position: sticky; 
    top: 70px; 
    height: fit-content; 
    max-height: calc(100vh - 90px); 
    overflow-y: auto; 
}
.admin-bar .sidebar-left, .admin-bar .sidebar-right { top: 102px; max-height: calc(100vh - 122px); }

.sidebar-left { flex: 0 0 250px; }

/* Rechte Sidebar bleibt im Flexbox-Layout reserviert, wird aber unsichtbar geschaltet */
.sidebar-right { 
    flex: 0 0 240px; 
    visibility: hidden; 
    opacity: 0; 
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out; 
}
.sidebar-right.is-active { 
    visibility: visible; 
    opacity: 1; 
}

/* LERNPSYCHOLOGIE: Strukturierender Whitespace für klare kognitive Abschnitte */


.section-navigation { background-color: #f8f9fa; padding: 20px; border-radius: 5px; border: 1px solid #e2e8f0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #2c3e50; padding-bottom: 8px; margin-bottom: 15px; }
.sidebar-header h3 { margin: 0 !important; }
#qr-toggle-btn { background: none; border: none; cursor: pointer; color: #2c3e50; padding: 6px; display: flex; align-items: center; border-radius: 4px; }
#qr-toggle-btn:hover, #qr-toggle-btn.active { background-color: #edf2f7; color: #2980b9; }
.qr-code-box { text-align: center; padding: 12px; background-color: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 15px; }
.qr-code-box img { max-width: 220px; margin: 0 auto; display: block; }
#qr-text-display { margin: 12px 0 8px 0; font-size: 1.2em; font-weight: bold; color: #c0392b; word-wrap: break-word; text-align: center; }
#qr-text-input { width: 100%; padding: 8px; margin-top: 10px; border: 1px solid #ccd1d9; border-radius: 4px; font-size: 0.85em; box-sizing: border-box; }
.section-navigation ul { list-style: none; padding: 0; margin: 0; }
.section-navigation li a { display: block; padding: 8px 0; color: #333; text-decoration: none; border-bottom: 1px solid #edf2f7; }
.section-navigation ul ul { list-style: none; padding-left: 15px; margin: 5px 0; }
.section-navigation ul ul ul { padding-left: 15px; margin: 3px 0; }
.section-navigation li a.depth-2 { font-weight: bold; color: #2c3e50; }
.section-navigation li a.depth-3 { font-weight: normal; color: #555555; font-size: 0.9em; padding: 6px 0; }
.section-navigation li a.depth-4 { font-weight: normal; color: #7f8c8d; font-size: 0.82em; padding: 4px 0; font-style: italic; }
.section-navigation li a.sidebar-link.active { color: #2980b9 !important; font-weight: bold !important; }

/* ==========================================================================
   3. Haftnotiz-Design (Post-it) & Glossar
   ========================================================================== */
.definition-box.haftnotiz { background: #fff9c4; padding: 25px 20px 20px 20px; border-radius: 2px; box-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.12); position: relative; transform: rotate(-1.5deg); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.definition-box.haftnotiz:hover { transform: rotate(0deg) scale(1.03); box-shadow: 0 14px 28px rgba(0,0,0,0.15), 0 10px 10px rgba(0,0,0,0.15); }
.definition-box.haftnotiz::before { content: ""; position: absolute; top: -9px; left: 30%; width: 40%; height: 18px; background: rgba(255, 255, 255, 0.5); box-shadow: 0 1px 3px rgba(0,0,0,0.05); transform: rotate(1deg); }
.definition-box.haftnotiz h3 { margin-top: 0; color: #795548; font-family: 'Courier New', Courier, monospace; font-size: 1.1em; border-bottom: 1px dashed #bcaaa4; padding-bottom: 5px; }
#definition-text { font-size: 0.95em; line-height: 1.4; color: #3e2723; margin: 0; }
.close-def-btn { position: absolute; top: 4px; right: 8px; background: none; border: none; font-size: 22px; font-weight: bold; color: #795548; cursor: pointer; line-height: 1; transition: color 0.2s; }
.close-def-btn:hover { color: #d32f2f; }
.glossary-term { border-bottom: 2px dotted #2980b9; color: #2c3e50; cursor: help; font-weight: 500; transition: background-color 0.2s; padding: 0 2px; }
.glossary-term:hover { background-color: rgba(41, 128, 185, 0.1); }
.glossary-term.active-term { background-color: #f1c40f; color: #000000; }
.page-glossary { margin-top: 50px; padding-top: 30px; border-top: 3px double #e2e8f0; }
#glossary-list dt { font-weight: bold; color: #2980b9; font-size: 1.1em; margin-top: 15px; }
#glossary-list dd { margin-left: 0; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #edf2f7; color: #4a5568; }

/* ==========================================================================
   4. Integrierte Quiz- & Aufgaben-Styles
   ========================================================================== */
.gsg-wrapper { color: #333; }
.gsg-quiz-card { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 10px; padding: 25px; margin-bottom: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.gsg-quiz-card h3 { margin-top: 0; color: #333; }
.gsg-question { margin-bottom: 20px; }
.gsg-question p { font-weight: bold; margin-bottom: 10px; }
.gsg-radio-label { display: block; margin-bottom: 8px; cursor: pointer; }
.gsg-question::before { content: "Selbsteinschätzung"; display: inline-block; background-color: #f3e5f5; color: #6a1b9a; font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 10px; margin-bottom: 6px; letter-spacing: 0.03em; }
.gsg-question-check::before { content: "✔︎ Wissensfrage"; display: inline-block; background-color: #e3f2fd; color: #005a9c; font-size: 11px; font-weight: bold; padding: 2px 8px; border-radius: 10px; margin-bottom: 6px; letter-spacing: 0.03em; }
.gsg-radio-label.gsg-feedback-correct { color: #2e7d32; font-weight: bold; }
.gsg-radio-label.gsg-feedback-correct::after { content: " ✓ Richtig"; color: #2e7d32; font-size: 13px; }
.gsg-radio-label.gsg-feedback-wrong { color: #c62828; }
.gsg-radio-label.gsg-feedback-wrong::after { content: " ✗ Falsch"; color: #c62828; font-size: 13px; }
.gsg-radio-label.gsg-feedback-missed::after { content: " ← Richtige Antwort"; color: #2e7d32; font-size: 12px; font-style: italic; }

/* LERNPSYCHOLOGIE: Visualisierung von elaboriertem Feedback (Erklärungsboxen) */
.gsg-elaborated-feedback {
    margin-top: 10px;
    padding: 12px 15px;
    background-color: #f0f4f8;
    border-left: 4px solid #2980b9;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out forwards;
}

.gsg-btn { background-color: #333; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.3s ease; }
.gsg-btn:hover { background-color: #111; }
.gsg-recommendation { display: none; background-color: #f8f9fa; border: 1px solid #ddd; padding: 15px; border-radius: 8px; margin-bottom: 30px; text-align: center; font-weight: bold; line-height: 1.4; }
.gsg-tasks-container { display: none; }
.gsg-tabs { display: flex; border-bottom: 2px solid #e9ecef; margin-bottom: 20px; flex-wrap: wrap; }
.gsg-tab-btn { background: none; border: none; padding: 12px 20px; font-size: 16px; font-weight: bold; color: #6c757d; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.3s ease; }
.gsg-tab-btn:hover { color: #333; }

/* LERNPSYCHOLOGIE: Kennzeichnung des empfohlenen Niveaus stärkt die Autonomie, da sichtbare Alternativen bleiben */
.gsg-tab-btn.is-recommended::after {
    content: " ★ Empfehlung";
    font-size: 0.75em;
    color: #e67e22;
    vertical-align: super;
    margin-left: 5px;
}

.btn-niveau-1.active { color: #2e7d32; border-bottom-color: #2e7d32; }
.theme-green .gsg-task-header { background-color: #e8f5e9; border-left: 4px solid #2e7d32; color: #1b5e20; }
.theme-green .gsg-level-info { background-color: #f1f8e9; border-left: 4px solid #7cb342; }
.btn-niveau-2.active { color: #005a9c; border-bottom-color: #005a9c; }
.theme-blue .gsg-task-header { background-color: #e3f2fd; border-left: 4px solid #005a9c; color: #003c6c; }
.theme-blue .gsg-level-info { background-color: #e1f5fe; border-left: 4px solid #03a9f4; }
.btn-niveau-3.active { color: #6a1b9a; border-bottom-color: #6a1b9a; }
.theme-purple .gsg-task-header { background-color: #f3e5f5; border-left: 4px solid #6a1b9a; color: #4a148c; }
.theme-purple .gsg-level-info { background-color: #faf5ff; border-left: 4px solid #ab47bc; }
.gsg-level-info { padding: 15px 20px; margin-bottom: 25px; border-radius: 0 6px 6px 0; color: #333; }
.gsg-level-info h4 { margin-top: 0; margin-bottom: 8px; }
.gsg-level-info p { margin: 0; }
.gsg-tab-content { display: none; animation: fadeIn 0.4s; }
.gsg-tab-content.active { display: block; }

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.gsg-task-item { margin-bottom: 15px; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.gsg-task-header { width: 100%; text-align: left; padding: 15px 20px; font-size: 16px; font-weight: bold; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s; }
.gsg-task-header:hover { filter: brightness(0.95); }
.gsg-task-icon { font-size: 14px; transition: transform 0.3s; }
.gsg-task-header.active .gsg-task-icon { transform: rotate(180deg); }
.gsg-task-body { display: none; padding: 20px; background-color: white; border-top: 1px solid #e0e0e0; }
.gsg-task-body p { margin-top: 0; }
.gsg-help-btn { background-color: transparent; color: #555; border: 1px solid #aaa; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 14px; margin-top: 15px; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s; }
.gsg-help-btn:hover { background-color: #f8f9fa; color: #000; border-color: #555; }
.gsg-help-content { display: none; background-color: #fff8e1; border-left: 3px solid #ffc107; padding: 15px; margin-top: 15px; border-radius: 0 4px 4px 0; font-size: 14.5px; color: #5a4a00; }
.gsg-hint-step { display: none; padding-bottom: 10px; }
.gsg-hint-step.visible { display: block; animation: fadeIn 0.3s; }
.gsg-hint-step + .gsg-hint-step.visible { border-top: 1px dashed #e6c84a; padding-top: 10px; margin-top: 5px; }
.gsg-hint-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e6c84a; }
.gsg-hint-counter { font-size: 13px; color: #7a6200; font-style: italic; }
.gsg-hint-next-btn { background-color: #ffc107; color: #5a4a00; border: none; padding: 5px 12px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: bold; transition: background-color 0.2s; }
.gsg-hint-next-btn:hover { background-color: #e6ab00; }
.gsg-hint-next-btn:disabled { background-color: #e0e0e0; color: #aaa; cursor: default; }
.gsg-progress-wrapper { margin-bottom: 20px; background-color: #f8f9fa; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; }
.gsg-progress-label { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 10px; font-size: 15px; }
.gsg-progress-container { width: 100%; background-color: #e0e0e0; border-radius: 8px; height: 12px; overflow: hidden; }
.gsg-progress-bar { height: 100%; width: 0%; transition: width 0.5s ease; background-color: #2e7d32; }
.theme-green .gsg-progress-bar { background-color: #2e7d32; }
.theme-blue .gsg-progress-bar { background-color: #005a9c; }
.theme-purple .gsg-progress-bar { background-color: #6a1b9a; }
.gsg-checkbox-label { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: normal; font-size: 14px; color: #555; padding: 4px 8px; border-radius: 4px; transition: background-color 0.2s; }
.gsg-checkbox-label:hover { background-color: rgba(0,0,0,0.05); }
.gsg-task-checkbox { width: 16px; height: 16px; cursor: pointer; }
.gsg-solution-container { display: none; margin-top: 25px; padding: 20px; border: 2px dashed #4caf50; background-color: #f1f8e9; border-radius: 8px; animation: fadeIn 0.5s; }
.gsg-solution-container h4 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.vig-table, .sol-table { border-collapse: collapse; margin: 12px 0; font-family: monospace; font-size: 14px; width: 100%; }
.vig-table th, .sol-table th { border: 1px solid #aaa; padding: 6px 8px; background-color: #eceff1; text-align: left; font-weight: bold; }
.sol-table th { background-color: #f5f5f5; }
.vig-table td, .sol-table td { border: 1px solid #ccc; padding: 6px 8px; text-align: center; min-width: 28px; }
.vig-table .filled { background-color: #e8f5e9; font-weight: bold; }
.vig-table .empty { background-color: #fff9c4; color: #999; }
.vig-table .result, .sol-table .highlight { background-color: #e3f2fd; font-weight: bold; }
.sol-table .highlight { background-color: #c8e6c9; }
.vig-note { background-color: #e8eaf6; border-left: 3px solid #5c6bc0; padding: 10px 14px; margin: 12px 0; border-radius: 0 4px 4px 0; font-size: 14px; color: #283593; }
.partner-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: bold; margin-bottom: 8px; }
.partner-a { background-color: #fff3e0; color: #e65100; }
.partner-b { background-color: #e8f5e9; color: #1b5e20; }
.partner-ab { background-color: #e3f2fd; color: #0d47a1; }

/* ==========================================================================
   7. Sidebar als Overlay-Drawer
   ========================================================================== */

/* Sidebar aus dem Flex-Flow herausnehmen: liegt jetzt als festes Overlay
   über dem Inhalt. Der Hauptinhalt füllt dadurch automatisch die volle Breite. */
.sidebar-left {
    position: fixed;
    left: 0;
    top: 90px;                          /* angehoben für sauberen Header-Abschluss */
    width: 300px;                       /* breiter */
    height: calc(100vh - 90px);
    max-height: none;
    z-index: 200;
    overflow-y: auto;
    background-color: #fff;
    box-shadow: 3px 0 14px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.35s ease;
}
.admin-bar .sidebar-left {
    top: 122px;
    height: calc(100vh - 122px);
}

/* Eingeklappt: Sidebar gleitet nach links aus dem Viewport */
.sidebar-left.is-collapsed {
    transform: translateX(-100%);
}

/* Toggle-Button: sitzt immer an der rechten Kante der Sidebar.
   Da die Sidebar stets bei left:0 beginnt, reichen zwei feste Werte. */
#sidebar-collapse-btn {
    position: fixed;
    left: 300px;                        /* Startzustand: Sidebar offen (= neue Breite) */
    top: 50%;
    transform: translateY(-50%);
    z-index: 300;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    width: 16px;
    height: 52px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.35s ease, background-color 0.2s;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
    padding: 0;
}
#sidebar-collapse-btn:hover { background-color: #2980b9; }
.admin-bar #sidebar-collapse-btn { top: calc(50% + 16px); }

/* ==========================================================================
   8. Scroll-to-top Button
   ========================================================================== */
#scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 300;
    background-color: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s;
}
#scroll-to-top-btn.is-visible { opacity: 1; visibility: visible; }
#scroll-to-top-btn:hover { background-color: #2980b9; }

/* Rechte Sidebar ebenfalls als festes Overlay – nimmt keinen Platz mehr im Flex-Flow
   ein, damit der Hauptinhalt ohne Versatz mittig liegt. */
.sidebar-right {
    position: fixed;
    right: 0;
    top: 90px;
    width: 280px;
    height: calc(100vh - 90px);
    max-height: none;
    flex: none;
    z-index: 200;
    overflow-y: auto;
    padding: 20px;
}
.admin-bar .sidebar-right {
    top: 122px;
    height: calc(100vh - 122px);
}

/* Hauptinhalt zentrieren (beide Sidebars sind jetzt Overlays, nicht mehr im Flex-Flow).
   flex: 0 1 auto setzt flex-basis auf auto, damit die width-Eigenschaft greift –
   flex: 1 aus dem Basisstyle hinterließ flex-basis: 0, was die Breite auf 0 zwang. */
.main-content {
    flex: 0 1 auto;
    width: 100%;
    max-width: 700px;
    margin-inline: auto;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(26,42,74,0.08);
    margin-bottom: 2rem;
}

/* ==========================================================================
   9. Content-Area Styling (Option 2 Design-System)
   ========================================================================== */

/* Absätze */
.main-content p {
    margin-bottom: 1.75rem;
    line-height: 1.8;
    font-size: 16px;
}

.main-content p:last-of-type {
    margin-bottom: 0;
}

/* Überschriften mit besseren Abständen */
.main-content h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 2em;
    color: var(--navy, #1a2a4a);
}

.main-content h2 {
    color: var(--blue, #1f6fa8);
    border-left: 4px solid var(--orange, #d4680a);
    padding-left: 1rem;
    margin-top: 4rem;
    margin-bottom: 1.75rem;
    font-size: 1.8em;
    font-weight: 800;
}

.main-content h2:not(:first-child)::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(to right, var(--blue, #1f6fa8), transparent);
    margin-bottom: 1.5rem;
    margin-left: -1rem;
    padding-left: 1rem;
}

.main-content h3 {
    color: var(--navy, #1a2a4a);
    border-left: 3px solid #80cbc4;
    padding-left: 0.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.4em;
    font-weight: 700;
}

.main-content h4 {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    font-size: 1.15em;
    color: var(--navy, #1a2a4a);
    border-left: 2px solid #7f8c8d;
    padding-left: 0.5rem;
}

/* Trennlinien */
.main-content hr {
    border: 0;
    height: 1px;
    background: #e2e8f0;
    margin: 2rem 0;
}

/* Subtile Trennlinie nach Text-Blöcken vor h2 */
.main-content > p:nth-of-type(3n) {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Listen */
.main-content ul,
.main-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.75rem;
}

.main-content li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #334155;
}

.main-content ul ul,
.main-content ol ol {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Tabellen */
.main-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.main-content table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--navy, #1a2a4a);
    border-bottom: 2px solid #e2e8f0;
}

.main-content table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.main-content table tr:last-child td {
    border-bottom: none;
}

.main-content table tr:hover {
    background-color: #f8f9fa;
}

/* Code-Blöcke */
.main-content code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #c0392b;
}

.main-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
}

.main-content pre code {
    background: none;
    padding: 0;
    color: var(--navy, #1a2a4a);
}

/* Blockquotes */
.main-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--blue, #1f6fa8);
    background: #e8f2fb;
    color: #0c3a5c;
    border-radius: 0 8px 8px 0;
}

.main-content blockquote p {
    margin-bottom: 0;
}

/* Links */
.main-content a {
    color: var(--blue, #1f6fa8);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.main-content a:hover {
    border-bottom-color: var(--blue, #1f6fa8);
}

/* Bilder */
.main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.main-content figure {
    margin-bottom: 1.5rem;
}

.main-content figcaption {
    text-align: center;
    font-size: 0.875em;
    color: #64748b;
    font-style: italic;
    margin-top: 0.5rem;
}

/* ==========================================================================
   10. Image Viewer (Sidebar + Modal)
   ========================================================================== */

/* Clickable images */
.main-content img {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-content img:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

/* Image Viewer Sidebar */
.image-viewer-sidebar {
    position: fixed;
    right: 0;
    top: 90px;
    width: 420px;
    height: calc(100vh - 90px);
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 250;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.image-viewer-sidebar.is-open {
    transform: translateX(0);
}

.admin-bar .image-viewer-sidebar {
    top: 122px;
    height: calc(100vh - 122px);
}

.image-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.image-viewer-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: var(--navy, #1a2a4a);
    font-weight: 700;
}

.image-viewer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.image-viewer-close:hover {
    background-color: #f4f5f7;
    color: var(--navy, #1a2a4a);
}

.image-viewer-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.image-viewer-img-wrapper {
    width: 100%;
    max-width: 380px;
}

.image-viewer-img-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-viewer-img-wrapper img:hover {
    transform: scale(1.05);
}

.image-viewer-caption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9em;
    color: #64748b;
    font-style: italic;
}

.image-viewer-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f2fb;
    border-radius: 6px;
    border-left: 3px solid var(--blue, #1f6fa8);
    font-size: 0.85em;
    color: #0c3a5c;
    text-align: center;
}

/* Image Viewer Modal (Fullscreen) */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-viewer-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.image-viewer-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-viewer-modal-img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.image-viewer-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.image-viewer-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.image-viewer-modal-caption {
    margin-top: 1.5rem;
    color: #ffffff;
    text-align: center;
    font-size: 0.95em;
    font-style: italic;
}