/* ==========================================================================
   Lesson Content Styling - Professional & Consistent
   ========================================================================== */

/* Base Content Styling */
.lesson-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #2d3748;
    max-width: 100%;
}

/* Typography - Headings */
.lesson-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 4px solid #3b82f6;
    background: linear-gradient(90deg, #eff6ff 0%, transparent 100%);
    padding: 0.75rem 1rem;
    border-radius: 8px 8px 0 0;
}

.lesson-content h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding: 0.625rem 0.875rem;
    background: linear-gradient(90deg, #dbeafe 0%, transparent 70%);
    border-left: 4px solid #3b82f6;
    border-radius: 0 6px 6px 0;
}

.lesson-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1d4ed8;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    padding-left: 0.75rem;
    border-left: 3px solid #60a5fa;
}

.lesson-content h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2563eb;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.lesson-content h5,
.lesson-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
}

/* First heading - no top margin */
.lesson-content > h1:first-child,
.lesson-content > h2:first-child,
.lesson-content > h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.lesson-content p {
    margin-bottom: 1.25rem;
    text-align: left;
}

.lesson-content p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph (first paragraph after heading) */
.lesson-content h1 + p,
.lesson-content h2 + p {
    font-size: 1.15rem;
    color: #4a5568;
}

/* Links */
.lesson-content a {
    color: #4f46e5;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.lesson-content a:hover {
    color: #3730a3;
}

/* Lists */
.lesson-content ul,
.lesson-content ol {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.lesson-content ul {
    list-style-type: none;
}

.lesson-content ul > li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.875rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.lesson-content ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.lesson-content ol {
    list-style-type: none;
    counter-reset: item;
}

.lesson-content ol > li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.875rem;
    counter-increment: item;
}

.lesson-content ol > li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Nested lists */
.lesson-content ul ul,
.lesson-content ol ol,
.lesson-content ul ol,
.lesson-content ol ul {
    margin-top: 0.625rem;
    margin-bottom: 0.625rem;
}

.lesson-content ul ul > li::before {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    width: 7px;
    height: 7px;
}

.lesson-content ol ol > li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

/* Blockquotes - Styled as important notes */
.lesson-content blockquote {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid #3b82f6;
    border-radius: 0 12px 12px 0;
    font-style: normal;
    color: #1e3a8a;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.lesson-content blockquote::before {
    content: "\F431"; /* Bootstrap icon - lightbulb */
    font-family: "bootstrap-icons";
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    font-size: 1.25rem;
    color: #3b82f6;
}

.lesson-content blockquote p {
    margin-bottom: 0;
}

.lesson-content blockquote p:first-child {
    font-weight: 600;
}

.lesson-content blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #64748b;
}

/* Code - Inline */
.lesson-content code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    background-color: #f1f5f9;
    color: #be185d;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* Code Blocks */
.lesson-content pre {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.lesson-content pre code {
    font-size: 0.9rem;
    line-height: 1.7;
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    border: none;
    border-radius: 0;
}

/* Tables */
.lesson-content table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.lesson-content thead {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}

.lesson-content th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.lesson-content td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.lesson-content tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.lesson-content tbody tr:hover {
    background-color: #f1f5f9;
}

.lesson-content tbody tr:last-child td {
    border-bottom: none;
}

/* Images */
.lesson-content img {
    max-width: 100%;
    height: auto;
    margin: 1.75rem 0;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.lesson-content figure {
    margin: 1.75rem 0;
}

.lesson-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Horizontal Rule */
.lesson-content hr {
    margin: 2.5rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
}

/* Strong & Emphasis */
.lesson-content strong {
    font-weight: 700;
    color: #1e40af;
    background: linear-gradient(180deg, transparent 60%, #dbeafe 60%);
    padding: 0 2px;
}

.lesson-content em {
    font-style: italic;
    color: #4338ca;
}

/* Important text highlight */
.lesson-content mark,
.lesson-content .highlight {
    background: linear-gradient(180deg, transparent 40%, #fef08a 40%);
    padding: 0 4px;
    border-radius: 2px;
}

/* Definition Lists */
.lesson-content dl {
    margin: 1.5rem 0;
}

.lesson-content dt {
    font-weight: 600;
    color: #1e293b;
    margin-top: 1rem;
}

.lesson-content dd {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    color: #4a5568;
}

/* ==========================================================================
   Special Content Blocks - Callouts, Tips, Warnings, etc.
   ========================================================================== */

/* Info Box */
.lesson-content .info-box,
.lesson-content .tip-box,
.lesson-content .warning-box,
.lesson-content .note-box,
.lesson-content .example-box {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid;
}

.lesson-content .info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #3b82f6;
}

.lesson-content .tip-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left-color: #10b981;
}

.lesson-content .warning-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left-color: #f59e0b;
}

.lesson-content .note-box {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left-color: #8b5cf6;
}

.lesson-content .example-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left-color: #64748b;
}

/* Auto-detect callouts by content patterns */
.lesson-content p:has(strong:first-child) {
    /* Paragraphs starting with bold text get subtle highlight */
}

/* Key Concept Box - auto-styled */
.lesson-content .key-concept {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.75rem 0;
    border: 1px solid #fbbf24;
}

/* Summary Box */
.lesson-content .summary {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.75rem 0;
    border: 1px solid #10b981;
}

/* ==========================================================================
   Assignment & Quiz Sections
   ========================================================================== */

/* Assignment scenario styling */
.lesson-content .assignment-scenario,
.lesson-content [class*="opdracht"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.75rem 0;
    border: 2px solid #f59e0b;
}

/* Quiz questions styling */
.lesson-content .quiz-question,
.lesson-content .quiz-questions {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 10px;
    margin: 1rem 0;
    border: 1px solid #e2e8f0;
}

.lesson-content .quiz-questions h4 {
    color: #4f46e5;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* ==========================================================================
   Video Placeholder Styling
   ========================================================================== */

.lesson-content .video-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 1.75rem 0;
}

.lesson-content .video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .lesson-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .lesson-content h1 {
        font-size: 1.6rem;
    }

    .lesson-content h2 {
        font-size: 1.4rem;
    }

    .lesson-content h3 {
        font-size: 1.2rem;
    }

    .lesson-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .lesson-content table {
        font-size: 0.9rem;
    }

    .lesson-content th,
    .lesson-content td {
        padding: 0.625rem 0.875rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .lesson-content {
        font-size: 11pt;
        line-height: 1.6;
        color: #000;
    }

    .lesson-content pre {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ccc;
    }

    .lesson-content a {
        color: #000;
        text-decoration: underline;
    }
}

/* ==========================================================================
   Grading Criteria (Hidden from students)
   ========================================================================== */

.grading-criteria-hidden {
    display: none !important;
}

/* ==========================================================================
   Smooth Animations
   ========================================================================== */

.lesson-content h1,
.lesson-content h2,
.lesson-content h3,
.lesson-content p,
.lesson-content ul,
.lesson-content ol,
.lesson-content blockquote,
.lesson-content pre,
.lesson-content table {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
