/* Grundlegendes Reset und Variablen */
:root {
    --primary-color: #C39953; /* Wohlstandsbildner Gold */
    --primary-hover: #a88244;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --box-bg: #ffffff;
    --header-bg: #111827; /* Modernes dunkles Blau für Kontraste */
    --header-text: #f9fafb;
    --success-color: #16a34a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* -----------------------------
   Übersichtsseite (index.html)
------------------------------ */
.overview-page .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.hero {
    text-align: center;
    background: var(--header-bg);
    color: var(--header-text);
    padding: 80px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.25rem;
    color: #9ca3af;
    margin-bottom: 35px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--text-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--text-color);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid #94a3b8;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--border-color);
}

.chapter {
    background: var(--box-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chapter h3 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.lesson-list {
    list-style: none;
}

.lesson-list li {
    margin-bottom: 10px;
}

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

.lesson-list a:hover {
    text-decoration: underline;
}

/* -----------------------------
   Lektionsseite (lektion.html)
------------------------------ */
.lesson-layout {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    min-height: 100vh;
}

/* Linke Sidebar */
.sidebar-left {
    background: var(--box-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px;
}

.brand {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: var(--header-bg);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-chapter h4 {
    margin-bottom: 10px;
    color: #475569;
}

.nav-chapter ul {
    list-style: none;
}

.nav-chapter li {
    margin-bottom: 8px;
}

.nav-chapter a {
    text-decoration: none;
    color: #64748b;
    font-size: 0.95rem;
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
}

.nav-chapter li.active a, .nav-chapter a:hover {
    background: #fef3c7;
    color: #92400e;
}

/* Hauptbereich (Video, Text, Quiz) */
.content-main {
    padding: 40px;
    max-width: 1000px;
}

.lesson-header {
    margin-bottom: 20px;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.video-container {
    margin-bottom: 30px;
    position: relative;
}

video {
    display: block;
}

/* Neues CSS für den Vimeo-Wrapper */
.vimeo-wrapper {
    padding: 56.25% 0 0 0; /* Erzwingt das 16:9 Format */
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.vimeo-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Next Lesson Link (Wird über JS gesteuert) */
.hidden {
    display: none;
}

.visible {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

#next-lesson-wrapper {
    background: #1e293b;
    padding: 15px;
    text-align: left; /* Wie angefordert: linksbündig unter dem Video */
}

.btn-next {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    border-radius: 4px;
}

.btn-next:hover {
    background: var(--primary-hover);
}

/* Obere Navigation & Video Buttons */
.top-nav-bar {
    margin-bottom: 25px;
}

.lesson-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 10px 0;
    width: 100%;
}

.completion-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Text & Quiz Boxen */
.text-box, .quiz-box {
    background: var(--box-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.text-box h2, .quiz-box h3 {
    margin-bottom: 15px;
}

.text-box ul, .quiz-box ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

/* Rechte Sidebar (Materialien) */
.sidebar-right {
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    padding: 40px 20px;
}

.materials-box {
    background: var(--box-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.materials-box h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.materials-list {
    list-style: none;
}

.materials-list li {
    margin-bottom: 10px;
}

.material-link {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.material-link:hover {
    text-decoration: underline;
}

/* Modernes Quiz Design (direkt in HTML) */
.quiz-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 15px;
}
.question-title {
    font-size: 1.15rem;
    color: var(--header-bg);
    margin-bottom: 20px;
    font-weight: 600;
}
.option-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--box-bg);
}
.option-label:hover {
    border-color: var(--primary-color);
    background: #fef3c7;
}
.option-label input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}
.correct-text {
    background-color: #dcfce7 !important;
    border-color: var(--success-color) !important;
}
.incorrect-text {
    background-color: #fee2e2 !important;
    border-color: #ef4444 !important;
}
.quiz-comment {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--box-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

/* Responsive Anpassungen für kleinere Bildschirme */
@media (max-width: 1024px) {
    .lesson-layout {
        grid-template-columns: 250px 1fr;
    }
    .sidebar-right {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
}

@media (max-width: 768px) {
    .lesson-layout {
        grid-template-columns: 1fr;
    }
    .sidebar-left {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .lesson-actions {
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}