:root {
    /* Nu Leren Voor Later Branding */
    --brand-dark: #213F3B;
    /* Dark Green - Main Text & Headings */
    --brand-orange: #E85A2A;
    /* Orange - Buttons & Highlights */
    --brand-orange-hover: #D64D20;

    --primary-color: var(--brand-orange);
    /* Map primary actions to Orange */
    --primary-dark: var(--brand-orange-hover);

    --text-main: var(--brand-dark);
    --text-muted: #6B7280;
    /* Gray-500 */
    --text-light: #F9FAFB;

    --bg-body: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-subtle: #F3F4F6;
    /* Gray-100 */

    --border-color: #E5E7EB;

    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 90px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --backdrop-blur: blur(10px);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}



/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

main.container {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Header & Navigation */
header {
    background-color: var(--bg-card);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header .logo img {
    display: block;
    max-height: 80px;
    width: auto;
}

.nav-links {
    margin-left: auto;
}

.badge-elearning {
    background-color: var(--brand-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    transform: translateY(2px);
    /* Optical alignment */
}

header ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

header ul li a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

header ul li a:hover {
    color: var(--primary-color);
}

header ul li a.btn-nav {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
}

header ul li a.btn-nav:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--text-muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 90, 42, 0.1);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Course & Modules List */
.module-list {
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.module-item {
    background: var(--bg-card);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.1s;
}

.module-item:last-child {
    border-bottom: none;
}

.module-item:hover {
    background-color: #F9FAFB;
}

.module-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--bg-body);
    color: var(--text-muted);
    font-weight: 600;
}

.module-status.completed {
    background: #D1FAE5;
    color: #065F46;
}

/* Quiz Styles */
.quiz-question {
    background: #F9FAFB;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.quiz-options label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.quiz-options label:hover {
    border-color: var(--primary-color);
    background-color: #FFF7ED;
}

.quiz-options input[type="radio"] {
    margin-right: 1rem;
    accent-color: var(--primary-color);
    width: 1.2rem;
    height: 1.2rem;
}

/* Certificate Styles */
.certificate-wrapper {
    width: 297mm;
    height: 210mm;
    margin: 0 auto;
    background-image: url('../images/certificate_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--brand-dark);
    font-family: 'Times New Roman', serif;
    /* Classic certificate font */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.certificate-content {
    width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.certificate-header {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--brand-dark);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.certificate-body {
    font-size: 1.5rem;
    margin-bottom: 3rem;
}

.certificate-name {
    font-size: 4rem;
    font-weight: bold;
    color: var(--brand-orange);
    margin: 1rem 0;
    font-family: 'Great Vibes', cursive;
    /* Or a nice script font if available */
    border-bottom: 2px solid var(--brand-dark);
    padding: 0 2rem;
    display: inline-block;
}

.certificate-body h2 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: var(--brand-dark);
}

.certificate-footer {
    position: absolute;
    bottom: 20mm;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
}

@media print {
    @page {
        size: landscape;
        margin: 0;
    }

    body {
        margin: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print {
        display: none !important;
    }

    .certificate-wrapper {
        box-shadow: none;
        width: 100%;
        height: 100%;
    }
}

/* Header Branding */
.brand-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 1rem;
    font-weight: 500;
}

.brand-tagline a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}

.brand-tagline a:hover {
    text-decoration-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--brand-dark);
    border-top: none;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3,
.footer-col h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-logo {
    height: 100px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    /* Make logo white */
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
}

.dev-notice {
    background: rgba(255, 255, 255, 0.1);
    color: #FED7AA;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul,
.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-links li,
.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-col a:hover {
    color: var(--brand-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .brand-tagline {
        display: block;
        margin: 0.5rem 0 0;
        font-size: 0.85rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 1rem 0;
    }

    header nav {
        flex-direction: column;
        gap: 1rem;
    }

    header ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .container {
        width: 95%;
    }

    .certificate-container {
        padding: 2rem;
        margin: 2rem auto;
    }

}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 80%;
    max-width: 300px;
    height: 100%;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-main);
    cursor: pointer;
    margin-bottom: 2rem;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.mobile-menu .btn-nav {
    text-align: center;
}


/* Dashboard Styles */
.dashboard-hero {
    background: linear-gradient(135deg, var(--brand-dark) 0%, #2C554F 100%);
    color: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn-resume {
    background-color: var(--brand-orange);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-resume:hover {
    background-color: var(--brand-orange-hover);
    transform: translateY(-2px);
}

.stat-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-blue {
    background: #E0F2FE;
    color: #0284C7;
}

.bg-green {
    background: #DCFCE7;
    color: #16A34A;
}

.bg-orange {
    background: #FEF3C7;
    color: #D97706;
}

.stat-info h3 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
}

.stat-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Course Cards */
.course-grid {
    display: grid;
    gap: 1.5rem;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    /* Mobile first */
}

@media (min-width: 600px) {
    .course-card {
        flex-direction: row;
    }

    .course-thumb {
        width: 200px;
        flex-shrink: 0;
    }
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-orange);
}

.course-thumb {
    background-color: #E5E7EB;
    position: relative;
    min-height: 150px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    /* Fixed: Ensure it's hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
}

.course-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.course-header h3 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--brand-dark);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-weight: 600;
}

.status-badge.completed {
    background: #D1FAE5;
    color: #065F46;
}

.course-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.progress-section {
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.progress-bar-bg {
    height: 8px;
    background: #F3F4F6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-orange);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Sidebar Widgets */
.section-title {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.action-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    color: white;
}

.nulmeting-card {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.nulmeting-card h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.nulmeting-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-white {
    background: white;
    color: #4F46E5;
    width: 100%;
    text-align: center;
    border: none;
}

.btn-white:hover {
    background: #F9FAFB;
    color: #4338CA;
}

.widget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.widget-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.cert-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cert-list li:last-child {
    border-bottom: none;
}

.cert-info {
    display: flex;
    flex-direction: column;
}

.cert-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.cert-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cert-link {
    font-size: 0.85rem;
    color: var(--brand-orange);
    font-weight: 600;
}

.empty-state {
    display: block;
}

.mobile-menu a.btn-nav {
    text-align: center;
    background-color: var(--brand-orange);
    color: white;
    padding: 0.75rem;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 101;
    }

    .hamburger-btn span {
        width: 100%;
        height: 3px;
        background-color: var(--text-main);
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 200;
        transition: opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-menu.active {
        right: 0;
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-content {
        position: absolute;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: var(--bg-card);
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu.active .mobile-menu-content {
        transform: translateX(0);
    }

    .close-menu-btn {
        align-self: flex-end;
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--text-muted);
        cursor: pointer;
        margin-bottom: 2rem;
        line-height: 1;
    }

    .close-menu-btn:hover {
        color: var(--brand-orange);
    }

    .mobile-menu ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-menu ul li a {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--text-main);
        display: block;
    }

    .mobile-menu ul li a:hover {
        color: var(--brand-orange);
    }

    .mobile-menu .nav-profile-link {
        background-color: var(--bg-subtle);
        padding: 0.75rem;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }
}

/* Course Player Styles */
.course-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .course-layout {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
    }
}

.course-sidebar {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 2rem;
}

.course-content {
    flex: 3;
    width: 100%;
}

.module-list {
    list-style: none;
    margin: 1rem 0;
}

.module-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.module-item:hover {
    background-color: var(--bg-subtle);
}

.module-item.active {
    background-color: #FFF7ED;
    /* Light orange */
    border-left: 3px solid var(--brand-orange);
    font-weight: 600;
}

.module-item a {
    color: var(--text-main);
    text-decoration: none;
    flex: 1;
}

.module-item.active a {
    color: var(--brand-orange);
}

.icon-check {
    color: #16A34A;
    font-weight: bold;
}

.content-card {
    padding: 2.5rem;
}

.module-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--brand-dark);
    border-bottom: 2px solid var(--bg-subtle);
    padding-bottom: 1rem;
}

.module-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 2.5rem;
}

.module-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

/* Quiz Styles */
.quiz-form {
    background: var(--bg-subtle);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.quiz-question {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.question-text {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.quiz-options label:hover {
    background: var(--bg-subtle);
}

.quiz-options input[type="radio"] {
    accent-color: var(--brand-orange);
    width: 1.2rem;
    height: 1.2rem;
}

.divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* Profile & Avatar Styles */
.nav-profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    transition: background-color 0.2s;
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 0;
    left: 28px;
    width: 12px;
    height: 12px;
    background-color: var(--brand-orange);
    border-radius: 50%;
    border: 2px solid white;
    z-index: 10;
}

.nav-profile-link:hover {
    background-color: var(--bg-subtle);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 0 0 1px var(--border-color);
}

.profile-header {
    margin-bottom: 2rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.current-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.avatar-option {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.avatar-option:hover {
    transform: scale(1.1);
}

.avatar-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.avatar-option img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.avatar-option input:checked+img {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(232, 90, 42, 0.2);
}

/* Chat Styles */
.profile-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 1rem;
    border-radius: var(--radius-md);
    position: relative;
}

.message-in {
    align-self: flex-start;
    background: white;
    box-shadow: var(--shadow-sm);
    border-bottom-left-radius: 2px;
}

.message-out {
    align-self: flex-end;
    background: #e3f2fd;
    box-shadow: var(--shadow-sm);
    border-bottom-right-radius: 2px;
}

.message-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: right;
}

.chat-input-area {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Admin Dashboard Actions */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-main);
}

.btn-icon:hover {
    background: var(--bg-subtle);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: var(--text-muted);
}

.btn-icon.delete:hover {
    background: #FEF2F2;
    color: var(--danger-color);
    border-color: #FECACA;
}

/* Content Blocks for Lessons */
.content-block {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid transparent;
}

.content-block-info {
    background-color: #EFF6FF;
    /* Blue-50 */
    border-left-color: #3B82F6;
    /* Blue-500 */
    color: #1E40AF;
    /* Blue-800 */
}

.content-block-warning {
    background-color: #FFFBEB;
    /* Yellow-50 */
    border-left-color: #F59E0B;
    /* Yellow-500 */
    color: #92400E;
    /* Yellow-800 */
}

.content-block-tip {
    background-color: #ECFDF5;
    /* Green-50 */
    border-left-color: #10B981;
    /* Green-500 */
    color: #065F46;
    /* Green-800 */
}

.content-block strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.05em;
}

/* Responsive Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    background: #000;
}

.video-wrapper iframe,
.video-wrapper object,
.video-wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Course Builder Components --- */

/* Flashcards */
.flashcards-container {
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.flashcard {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    flex-shrink: 0;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.flashcard-front {
    background-color: #fff;
    color: var(--text-main);
    border: 2px solid var(--primary-color);
}

.flashcard-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

/* Checklist */
.checklist-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checklist-container .form-check {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.checklist-container .form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checklist-container .form-check-label {
    cursor: pointer;
    font-size: 1.05rem;
}

/* Accordion */
.custom-accordion {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.custom-accordion summary {
    padding: 15px;
    cursor: pointer;
    background: #f8f9fa;
    font-weight: bold;
    list-style: none;
    /* Hide default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-accordion summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
}

.custom-accordion[open] summary::after {
    content: '-';
}

.custom-accordion .details-content {
    padding: 15px;
    border-top: 1px solid #ddd;
}
/* Search Bar */
.search-bar-wrapper {
    flex: 1;
    margin: 0 20px;
    max-width: 400px;
}
.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 5px 15px;
    backdrop-filter: blur(5px);
}
.search-input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    color: var(--text-color);
    padding: 5px;
}
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    transition: transform 0.2s;
}
.search-btn:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .search-bar-wrapper {
        display: none; /* Hide on mobile for now, or move to menu */
    }
}
