/* --- Globale Stile --- */
:root {
    --sidebar-width: 180px;
    --header-background: #333;
    --sidebar-background: #2c3e50;
    --link-color: #ecf0f1;
    --link-hover-color: #3498db;
    --text-color: #333;
    --background-color: #010044;
    --content-background: #fff;
    --primary-color: #0056b3;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    color: #a2d149; /* Moderneres, weicheres Grün */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

/* --- Code-Styling --- */
code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05em;
    background-color: #f4f4f4;
    padding: 2px 5px;
    border-radius: 3px;
    color: #d63384; /* Klassische Code-Farbe */
    border: 1px solid #ddd;
}

/* --- Selbst-Check Sektion --- */
.self-check {
    background-color: #e8f5e9;
    border-left: 5px solid #4caf50;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.self-check h3 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 1.1rem;
}

.self-check ul {
    list-style-type: '✓ ';
    padding-left: 20px;
}

/* --- Mobile First Layout --- */
.burger-menu {
    display: block;
    background: var(--header-background);
    color: var(--link-color);
    border: none;
    font-size: 1.5rem;
    padding: 10px 15px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    z-index: 1001;
}

.sidebar-nav {
    background-color: var(--header-background);
    padding: 0;
    display: none; /* Standardmäßig auf Mobilgeräten ausgeblendet */
}

.sidebar-nav.nav-open {
    display: block; /* Eingeblendet, wenn die Klasse aktiv ist */
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* Vertikale Liste auf Mobilgeräten */
}

.sidebar-nav li {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav a {
    color: var(--link-color);
    padding: 0.5rem;
    display: block;
    font-size: 0.9rem;
}
.sidebar-nav a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* Styling für Details/Summary im mobilen Layout */
.sidebar-nav details {
    /* Standardmäßig geschlossen auf Mobilgeräten */
    display: block; /* Stellt sicher, dass details im mobilen Layout sichtbar ist */
}
    .sidebar-nav summary {
    cursor: pointer;
    display: block;
}
.sidebar-nav summary > a {
    color: var(--link-color);
    padding: 0.5rem;
    font-size: 0.9rem;
    display: block;
    text-decoration: none;
}
.sidebar-nav summary > a:hover {
    color: var(--link-hover-color);
}
.sidebar-nav details[open] summary > a {
    color: var(--link-hover-color);
}.sidebar-nav details ul {
    flex-direction: column; /* Untermenü als Spalte in Mobilansicht */
    background-color: rgba(0, 0, 0, 0.2); /* Leicht dunklerer Hintergrund für Untermenüs */
    padding-left: 10px;
}
.sidebar-nav details ul li {
    margin-bottom: 0;
}
.sidebar-nav details ul a {
    padding-left: 1.5rem; /* Einrückung für Untermenüpunkte */
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
    background-color: #e7f3ff;
    color: #003366;
    font-weight: bold;
}

.sidebar-nav ul li ul li a.active {
    background-color: #d0e7ff;
}

.main-content {
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

.banner-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

main {
    background: var(--content-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 180px); /* Stellt sicher, dass der Main-Bereich mindestens die Höhe des Viewports abzüglich Header/Footer hat */
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    color: #fff;
}
footer a {
    color: #fff;
}

/* --- Tablet & Desktop Layout --- */
@media (min-width: 768px) {
    body {
        display: flex;
    }

    .burger-menu {
        display: none; /* Auf Desktop ausblenden */
    }

    .sidebar-nav {
        display: block !important; /* Immer sichtbar auf Desktop */
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-width);
        background: var(--sidebar-background);
        padding: 20px;
		overflow-y: auto; /* Falls die Navigation mal länger wird */
    }

    .sidebar-nav > ul { /* Direkte Kinder-UL der Nav */
        flex-direction: column;
    }

    .sidebar-nav > ul > li { /* Direkte Kinder-LI der Nav */
        margin-bottom: 10px;
    }
    .sidebar-nav > ul > li > details > summary {
        list-style: none; /* Entfernt den Standardpfeil */
        position: relative;
    }
    .sidebar-nav > ul > li > details > summary > a {
        padding: 10px 15px;
        border-radius: 5px;
        transition: background-color 0.3s;
        display: block; /* Sicherstellen, dass der gesamte Bereich klickbar ist */
        color: var(--link-color);
        text-decoration: none;
    }
    .sidebar-nav > ul > li > details > summary > a:hover {
        background-color: var(--link-hover-color);
        color: var(--link-color);
    }

    /* Styling für Details/Summary im Desktop-Layout */
    .sidebar-nav details {
        margin-bottom: 10px; /* Abstand zwischen den Hauptpunkten */
    }
    .sidebar-nav summary {
        list-style: none; /* Entfernt den Standardpfeil */
        position: relative;
    }
    .sidebar-nav summary::-webkit-details-marker {
        display: none; /* Entfernt den Standardpfeil in Webkit-Browsern */
    }
    .sidebar-nav summary::after { /* Benutzerdefinierter Pfeil */
        content: '▸';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        transition: transform 0.2s;
    }
    .sidebar-nav details[open] summary::after {
        transform: translateY(-50%) rotate(90deg);
    }
    
    .sidebar-nav details > ul { /* Untermenü-UL */
        list-style: none;
        padding-left: 15px; /* Einrückung des Untermenüs */
        margin-top: 5px;
        background-color: rgba(0, 0, 0, 0.1); /* Leichter Hintergrund für Untermenü */
        border-radius: 5px;
    }
    .sidebar-nav details > ul > li {
        margin-bottom: 5px;
    }
    .sidebar-nav details > ul > li > a {
        padding: 5px 10px;
        display: block;
        color: var(--link-color);
        text-decoration: none;
        font-size: 0.85rem; /* Etwas kleinere Schrift für Unterpunkte */
        border-radius: 3px;
    }
    .sidebar-nav details > ul > li > a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--link-hover-color);
    }

    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        padding: 30px;
    }
}

/* Bereich für die Formatieruing der Flashcards */
#flashcard {
    border: 2px solid #333;
    padding: 50px;
    margin 20px 0;
    cursor: pointer;
    background-color: #f4f4f4;
    font-size: 1.2em;
    min-height: 250px;
}
#cardSet {
    font-size: 1.2em;
}
.card-controls button {
    margin: 10px;
    padding: 10px 20px;
}
.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
}
.progress-bar {
    height: 30px;
    background-color: #4CAF50;
    border-radius: 5px;
    width: 0%;
    transition: width 0.5s ease;
}
.progress-details {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

/* --- Beibehaltene Stile für die Kursübersicht (topic grid) --- */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}

.topic-tile {
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    background-color: #333;
}
.topic-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.topic-tile a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
}
.topic-tile a:hover {
    background-color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
}
.short-name {
    font-size: 1.5rem;
}
.long-name {
    font-size: 1rem;
    margin-top: 5px;
}

/* Spezifische Inhaltsbereiche */
.learning-goals {
    background-color: #f0f7ff;
    border-left: 5px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.learning-goals h3 {
    margin-top: 0;
    color: #0056b3;
}

.next-step {
    background-color: #f8f9fa;
    border: 1px dashed #010044;
    padding: 20px;
    margin-top: 30px;
    text-align: center;
    border-radius: 8px;
}

.next-step .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: yellowgreen;
    color: #010044;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
}

.next-step .button:hover {
    background-color: #218838;
}

.infobox {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
}

.intro-quote {
    background-color: #A7C6ED;
    border-left: 5px solid #2c3e50;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
}

hr {
    border: 0;
    height: 1px;
    background: #eee !important;
    margin: 40px 0;
}

/* Tabellen-Styling */
table {
    width: auto;
    min-width: 250px;
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: left;
}

table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

table tbody tr:hover {
    background-color: #e7f3ff;
}
