/* ==========================================================================
   Learn Module Styles - alirhasanali.com/learn/
   Card-based accordion sections, sticky header, progress dots, mobile bottom bar
   ========================================================================== */

/* --- Page Background --- */
.learn-page {
    background-color: #f6f7f5; /* sage-50 */
    min-height: 100vh;
}

/* --- Sticky Course Header --- */
.learn-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(246, 247, 245, 0.92);
    
    -webkit-
    border-bottom: 1px solid rgba(199, 208, 193, 0.4);
    padding: 0.75rem 1.5rem;
    transition: box-shadow 0.3s ease;
}

.learn-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.learn-header-inner {
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.learn-header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4d5f45;
    min-width: 0;
}

.learn-header-nav a {
    color: #4d5f45;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 500;
}

.learn-header-nav a:hover {
    color: #3e4c38;
}

.learn-header-nav .course-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.learn-header-module {
    font-size: 0.8125rem;
    color: #637859;
    white-space: nowrap;
}

/* --- Progress Dots --- */
.progress-dots {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: center;
    padding: 0.25rem 0;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #a3b199;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.progress-dot.dot-complete {
    background: #4d5f45;
    border-color: #4d5f45;
}

.progress-dot.dot-active {
    border-color: #637859;
    background: rgba(99, 120, 89, 0.3);
}

.progress-dot.dot-empty {
    border-color: #c7d0c1;
    background: transparent;
}

/* --- Module Hero --- */
.learn-hero {
    padding: 6rem 1.5rem 2rem;
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 50%, #f6f7f5 100%);
}

.learn-hero-inner {
    max-width: 48rem;
    margin: 0 auto;
}

.learn-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2d3629;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .learn-hero h1 { font-size: 2.5rem; }
}

.learn-hero .module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    color: #637859;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.learn-hero .module-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* --- Content Container --- */
.learn-content {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 6rem; /* space for bottom bar */
}

/* --- "What You'll Learn" Card --- */
.learn-objectives {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #4d5f45;
}

.learn-objectives h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-objectives ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.learn-objectives li {
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4d5f45;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.learn-objectives li::before {
    content: '\f00c'; /* fa-check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #637859;
    font-size: 0.75rem;
    top: 0.5rem;
}

/* --- Sensitivity Note --- */
.sensitivity-note {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #713f12;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;
}

.sensitivity-note i {
    color: #ca8a04;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* --- Accordion Section Cards --- */
.learn-section {
    background: white;
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.learn-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.learn-section-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    user-select: none;
    transition: background-color 0.2s ease;
}

.learn-section-header:hover {
    background-color: #fafbf9;
}

.section-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e3e7df;
    color: #4d5f45;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.learn-section.section-read .section-number {
    background: #4d5f45;
    color: white;
}

.learn-section-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3629;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.section-toggle {
    color: #a3b199;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.learn-section.expanded .section-toggle {
    transform: rotate(180deg);
}

.section-read-badge {
    display: none;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #4d5f45;
    font-weight: 500;
    white-space: nowrap;
}

.learn-section.section-read .section-read-badge {
    display: inline-flex;
}

/* --- Section Content (Accordion Body) --- */
.learn-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.learn-section.expanded .learn-section-content {
    max-height: 5000px; /* large enough for any content */
}

.learn-section-body {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #f1f5f0;
}

/* Article content styles within module sections */
.learn-section-body h4 {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #3e4c38;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.learn-section-body p {
    margin-bottom: 1.125rem;
    line-height: 1.85;
    color: #4d5f45;
}

.learn-section-body ul,
.learn-section-body ol {
    margin-bottom: 1.125rem;
    padding-left: 1.5rem;
}

.learn-section-body li {
    margin-bottom: 0.375rem;
    line-height: 1.75;
    color: #4d5f45;
}

.learn-section-body ul li { list-style-type: disc; }
.learn-section-body ol li { list-style-type: decimal; }

.learn-section-body blockquote {
    border-left: 4px solid #637859;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4d5f45;
    background: #f6f7f5;
    border-radius: 0 0.75rem 0.75rem 0;
}

.learn-section-body a {
    color: #4d5f45;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.learn-section-body a:hover {
    color: #3e4c38;
}

/* Reuse article-specific classes in learn context */
.learn-section-body .callout {
    background: #f6f7f5;
    border-left: 4px solid #637859;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.learn-section-body .callout-title {
    font-weight: 600;
    color: #4d5f45;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-section-body .critical-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.learn-section-body .critical-box-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-section-body .arabic-quote {
    font-family: 'Amiri', Georgia, serif;
    font-size: 1.4rem;
    line-height: 2;
    direction: rtl;
    text-align: center;
    color: #3e4c38;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 100%);
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.learn-section-body .arabic-translation {
    font-style: italic;
    color: #4d5f45;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    direction: ltr;
}

.learn-section-body .arabic-source {
    font-size: 0.8125rem;
    color: #637859;
    text-align: center;
    margin-top: 0.375rem;
    direction: ltr;
}

/* Nafs cards */
.learn-section-body .nafs-card {
    background: linear-gradient(135deg, #f9f6f3 0%, #f3ede7 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1.25rem 0;
}

.learn-section-body .nafs-card.ammara { border-left: 4px solid #dc2626; }
.learn-section-body .nafs-card.lawwama { border-left: 4px solid #f59e0b; }
.learn-section-body .nafs-card.mutmainna { border-left: 4px solid #16a34a; }

/* Step cards */
.learn-section-body .step-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    padding-left: 3.5rem;
    margin: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.learn-section-body .step-number {
    position: absolute;
    left: 0.75rem;
    top: 1.25rem;
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, #4d5f45 0%, #637859 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Comparison table */
.learn-section-body .comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.9rem;
}

.learn-section-body .comparison-table th {
    background: #4d5f45;
    color: white;
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-weight: 600;
}

.learn-section-body .comparison-table td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #e3e7df;
}

.learn-section-body .comparison-table tr:nth-child(even) {
    background: #f9f6f3;
}

/* Intervention grid */
.learn-section-body .intervention-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

@media (min-width: 768px) {
    .learn-section-body .intervention-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.learn-section-body .intervention-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.learn-section-body .intervention-card.ammara { border-top: 3px solid #dc2626; }
.learn-section-body .intervention-card.lawwama { border-top: 3px solid #f59e0b; }
.learn-section-body .intervention-card.mutmainna { border-top: 3px solid #16a34a; }

/* FAQ within learn sections */
.learn-section-body .faq-item {
    border-bottom: 1px solid #e3e7df;
    padding: 1rem 0;
}

.learn-section-body .faq-question {
    font-weight: 600;
    color: #2d3629;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.learn-section-body .faq-answer {
    padding-top: 0.75rem;
    color: #4d5f45;
    display: none;
}

.learn-section-body .faq-item.open .faq-answer { display: block; }
.learn-section-body .faq-item.open .faq-icon { transform: rotate(180deg); }
.learn-section-body .faq-icon { transition: transform 0.3s; }

/* Mutahhari list */
.learn-section-body .mutahhari-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    margin: 1.25rem 0;
}

@media (min-width: 640px) {
    .learn-section-body .mutahhari-list { grid-template-columns: 1fr 1fr; }
}

.learn-section-body .mutahhari-item {
    background: white;
    border-radius: 0.625rem;
    padding: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.learn-section-body .mutahhari-item i { color: #4d5f45; margin-top: 0.25rem; }
.learn-section-body .mutahhari-item strong { display: block; color: #3e4c38; margin-bottom: 0.125rem; }
.learn-section-body .mutahhari-item span { font-size: 0.8125rem; color: #637859; }

/* Patterns list */
.learn-section-body .patterns-list {
    background: white;
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin: 0.75rem 0;
}

.learn-section-body .patterns-list li { font-size: 0.875rem; margin-bottom: 0.25rem; }

/* Clinical presentation */
.learn-section-body .clinical-presentation {
    background: rgba(0, 0, 0, 0.025);
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

/* --- Reflection Card --- */
.learn-reflection {
    background: linear-gradient(135deg, #e3e7df 0%, #f6f7f5 100%);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(163, 177, 153, 0.3);
}

.learn-reflection h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #3e4c38;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-reflection .reflection-prompt {
    font-style: italic;
    color: #4d5f45;
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1.0625rem;
}

.learn-reflection textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #c7d0c1;
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.learn-reflection textarea:focus {
    outline: none;
    border-color: #637859;
    box-shadow: 0 0 0 3px rgba(99, 120, 89, 0.15);
}

.learn-reflection textarea::placeholder {
    color: #a3b199;
}

.reflection-save-status {
    font-size: 0.75rem;
    color: #637859;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reflection-save-status.visible {
    opacity: 1;
}

/* --- Key Takeaways Card --- */
.learn-takeaways {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #637859;
}

.learn-takeaways h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learn-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.learn-takeaways li {
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4d5f45;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.learn-takeaways li::before {
    content: '\f005'; /* fa-star */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #819574;
    font-size: 0.625rem;
    top: 0.625rem;
}

/* --- Completion Card --- */
.learn-completion {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.learn-completion.completed {
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 100%);
    border: 2px solid #4d5f45;
}

.complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4d5f45;
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.complete-btn:hover {
    background: #3e4c38;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(77, 95, 69, 0.3);
}

.complete-btn:disabled,
.complete-btn.is-completed {
    background: #e3e7df;
    color: #4d5f45;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.learn-completion .next-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #4d5f45;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    font-size: 0.9375rem;
    transition: gap 0.2s ease;
}

.learn-completion .next-link:hover {
    gap: 0.75rem;
    color: #3e4c38;
}

/* Completed state celebration */
.completion-check {
    display: none;
    font-size: 2.5rem;
    color: #4d5f45;
    margin-bottom: 0.75rem;
}

.learn-completion.completed .completion-check {
    display: block;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Crisis Box (footer) --- */
.learn-crisis {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0 1rem;
    border-radius: 0 0.75rem 0.75rem 0;
}

.learn-crisis-title {
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.learn-crisis ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #7f1d1d;
}

.learn-crisis li {
    padding: 0.25rem 0;
}

.learn-crisis a {
    color: #991b1b;
    font-weight: 600;
    text-decoration: underline;
}

/* --- Mobile Bottom Bar --- */
.learn-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    
    -webkit-
    border-top: 1px solid rgba(199, 208, 193, 0.4);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
}

.learn-bottom-bar a,
.learn-bottom-bar button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4d5f45;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.learn-bottom-bar a:hover,
.learn-bottom-bar button:hover {
    background: rgba(99, 120, 89, 0.08);
}

.learn-bottom-bar .disabled {
    color: #c7d0c1;
    pointer-events: none;
}

.learn-bottom-bar .progress-dots {
    gap: 0.25rem;
}

.learn-bottom-bar .progress-dot {
    width: 8px;
    height: 8px;
}

/* DEPRECATED: Bottom bar is now always visible for slide navigation.
   Old accordion modules that still use this will be converted. */
/* @media (min-width: 768px) { .learn-bottom-bar { display: none; } } */

/* ==========================================================================
   SLIDE-BASED NAVIGATION STYLES (replaces accordion for module pages)
   ========================================================================== */

/* --- Slide Container --- */
.slide-container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    padding-bottom: 5rem; /* space for bottom bar */
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* --- Individual Slide --- */
.learn-slide {
    display: none;
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.learn-slide.active {
    display: block;
}

.learn-slide.active.visible {
    opacity: 1;
    transform: translateX(0);
}

.learn-slide.slide-back {
    transform: translateX(-20px);
}

.learn-slide.slide-back.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Slide Inner Card --- */
.slide-inner {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.slide-inner::-webkit-scrollbar {
    width: 4px;
}

.slide-inner::-webkit-scrollbar-track {
    background: transparent;
}

.slide-inner::-webkit-scrollbar-thumb {
    background: #c7d0c1;
    border-radius: 4px;
}

/* Title slide variant */
.learn-slide[data-slide-type="title"] .slide-inner {
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 50%, #f6f7f5 100%);
    text-align: center;
    padding: 3rem 2rem;
}

.learn-slide[data-slide-type="title"] h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: #2d3629;
    line-height: 1.3;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .learn-slide[data-slide-type="title"] h1 { font-size: 2.5rem; }
}

.learn-slide[data-slide-type="title"] .module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    color: #637859;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.learn-slide[data-slide-type="title"] .module-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.learn-slide[data-slide-type="title"] .module-description {
    color: #637859;
    font-size: 1.0625rem;
    line-height: 1.7;
    max-width: 36rem;
    margin: 0 auto;
}

/* Completion slide variant */
.learn-slide[data-slide-type="completion"] .slide-inner {
    text-align: center;
    padding: 3rem 2rem;
}

/* --- Slide Section Label --- */
.slide-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #637859;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: #e3e7df;
    border-radius: 9999px;
}

/* --- Header Progress Bar --- */
.header-progress-track {
    height: 3px;
    background: #e3e7df;
    margin-top: 0.5rem;
    border-radius: 3px;
    overflow: hidden;
}

.header-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4d5f45 0%, #637859 100%);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

/* Slide counter in header */
.slide-counter {
    font-size: 0.8125rem;
    color: #637859;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* --- Bottom Bar: Slide Navigation (always visible) --- */
.learn-bottom-bar .slide-progress-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    max-width: 200px;
}

.slide-progress-bar {
    width: 100%;
    height: 4px;
    background: #e3e7df;
    border-radius: 4px;
    overflow: hidden;
}

.slide-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4d5f45 0%, #637859 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

.slide-progress-label {
    font-size: 0.6875rem;
    color: #a3b199;
    font-variant-numeric: tabular-nums;
}

/* Slide nav buttons */
.slide-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4d5f45;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    min-height: 48px;
    min-width: 48px;
    justify-content: center;
}

.slide-nav-btn:hover {
    background: rgba(99, 120, 89, 0.08);
}

.slide-nav-btn:disabled {
    color: #c7d0c1;
    pointer-events: none;
}

.slide-nav-btn.slide-nav-primary {
    background: #4d5f45;
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.625rem 1.25rem;
}

.slide-nav-btn.slide-nav-primary:hover {
    background: #3e4c38;
}

.slide-nav-btn.slide-nav-primary:disabled {
    background: #c7d0c1;
    color: white;
}

/* Skip label for unanswered activities */
.slide-nav-skip {
    font-size: 0.6875rem;
    color: #a3b199;
    display: block;
    text-align: center;
    margin-top: -0.125rem;
}

/* --- Activity Card --- */
.activity-card {
    background: linear-gradient(135deg, #e3e7df 0%, #f6f7f5 100%);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(163, 177, 153, 0.3);
}

.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4d5f45;
    background: rgba(77, 95, 69, 0.12);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.activity-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.5rem;
}

.activity-card .activity-prompt {
    color: #4d5f45;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

/* MC Options */
.activity-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.activity-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: white;
    border: 2px solid #e3e7df;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    color: #3e4c38;
    line-height: 1.6;
    width: 100%;
}

.activity-option:hover {
    border-color: #a3b199;
    background: #fafbf9;
}

.activity-option .option-letter {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #e3e7df;
    color: #4d5f45;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.activity-option.selected {
    border-color: #4d5f45;
    background: #f6f7f5;
}

.activity-option.selected .option-letter {
    background: #4d5f45;
    color: white;
}

.activity-option.correct {
    border-color: #16a34a;
    background: #f0fdf4;
}

.activity-option.correct .option-letter {
    background: #16a34a;
    color: white;
}

.activity-option.incorrect {
    border-color: #dc2626;
    background: #fef2f2;
}

.activity-option.incorrect .option-letter {
    background: #dc2626;
    color: white;
}

.activity-option.disabled {
    pointer-events: none;
    opacity: 0.85;
}

.activity-option.disabled.dimmed {
    opacity: 0.5;
}

/* Submit button for quiz */
.activity-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4d5f45;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    margin-top: 0.5rem;
}

.activity-submit-btn:hover {
    background: #3e4c38;
}

.activity-submit-btn:disabled {
    background: #c7d0c1;
    cursor: default;
}

/* Activity feedback */
.activity-feedback {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    display: none;
}

.activity-feedback.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.activity-feedback.correct {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.activity-feedback.incorrect {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.activity-feedback .feedback-icon {
    font-weight: 600;
    margin-right: 0.375rem;
}

/* --- Reflection Textarea in Activities --- */
.activity-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #c7d0c1;
    border-radius: 0.75rem;
    padding: 1rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.activity-textarea:focus {
    outline: none;
    border-color: #637859;
    box-shadow: 0 0 0 3px rgba(99, 120, 89, 0.15);
}

.activity-textarea::placeholder {
    color: #a3b199;
}

.activity-save-status {
    font-size: 0.75rem;
    color: #637859;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-save-status.visible {
    opacity: 1;
}

/* --- Matching Activity --- */
.match-pairs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.match-pair {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.match-term {
    font-weight: 600;
    color: #2d3629;
    min-width: 120px;
    padding: 0.625rem 0;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.match-select {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e3e7df;
    border-radius: 0.5rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.875rem;
    color: #3e4c38;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: auto;
}

.match-select:focus {
    outline: none;
    border-color: #637859;
}

.match-select.correct {
    border-color: #16a34a;
    background: #f0fdf4;
}

.match-select.incorrect {
    border-color: #dc2626;
    background: #fef2f2;
}

/* --- Content styles within slides (reuse section-body patterns) --- */
.slide-inner h4 {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #3e4c38;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.slide-inner h4:first-child {
    margin-top: 0;
}

.slide-inner p {
    margin-bottom: 1.125rem;
    line-height: 1.85;
    color: #4d5f45;
}

.slide-inner ul,
.slide-inner ol {
    margin-bottom: 1.125rem;
    padding-left: 1.5rem;
}

.slide-inner li {
    margin-bottom: 0.375rem;
    line-height: 1.75;
    color: #4d5f45;
}

.slide-inner ul li { list-style-type: disc; }
.slide-inner ol li { list-style-type: decimal; }

.slide-inner blockquote {
    border-left: 4px solid #637859;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4d5f45;
    background: #f6f7f5;
    border-radius: 0 0.75rem 0.75rem 0;
}

.slide-inner a {
    color: #4d5f45;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.slide-inner a:hover {
    color: #3e4c38;
}

/* Reuse special content classes in slide context */
.slide-inner .callout {
    background: #f6f7f5;
    border-left: 4px solid #637859;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.slide-inner .callout-title {
    font-weight: 600;
    color: #4d5f45;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slide-inner .critical-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.slide-inner .critical-box-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slide-inner .arabic-quote {
    font-family: 'Amiri', Georgia, serif;
    font-size: 1.4rem;
    line-height: 2;
    direction: rtl;
    text-align: center;
    color: #3e4c38;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 100%);
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.slide-inner .arabic-translation {
    font-style: italic;
    color: #4d5f45;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    direction: ltr;
}

.slide-inner .arabic-source {
    font-size: 0.8125rem;
    color: #637859;
    text-align: center;
    margin-top: 0.375rem;
    direction: ltr;
}

.slide-inner .nafs-card {
    background: linear-gradient(135deg, #f9f6f3 0%, #f3ede7 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1.25rem 0;
}

.slide-inner .nafs-card.ammara { border-left: 4px solid #dc2626; }
.slide-inner .nafs-card.lawwama { border-left: 4px solid #f59e0b; }
.slide-inner .nafs-card.mutmainna { border-left: 4px solid #16a34a; }

.slide-inner .step-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    padding-left: 3.5rem;
    margin: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    position: relative;
}

.slide-inner .step-number {
    position: absolute;
    left: 0.75rem;
    top: 1.25rem;
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(135deg, #4d5f45 0%, #637859 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.slide-inner .comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.9rem;
}

.slide-inner .comparison-table th {
    background: #4d5f45;
    color: white;
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-weight: 600;
}

.slide-inner .comparison-table td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #e3e7df;
}

.slide-inner .comparison-table tr:nth-child(even) {
    background: #f9f6f3;
}

.slide-inner .intervention-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

@media (min-width: 768px) {
    .slide-inner .intervention-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.slide-inner .intervention-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.slide-inner .intervention-card.ammara { border-top: 3px solid #dc2626; }
.slide-inner .intervention-card.lawwama { border-top: 3px solid #f59e0b; }
.slide-inner .intervention-card.mutmainna { border-top: 3px solid #16a34a; }

.slide-inner .mutahhari-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    margin: 1.25rem 0;
}

@media (min-width: 640px) {
    .slide-inner .mutahhari-list { grid-template-columns: 1fr 1fr; }
}

.slide-inner .mutahhari-item {
    background: white;
    border-radius: 0.625rem;
    padding: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.slide-inner .mutahhari-item i { color: #4d5f45; margin-top: 0.25rem; }
.slide-inner .mutahhari-item strong { display: block; color: #3e4c38; margin-bottom: 0.125rem; }
.slide-inner .mutahhari-item span { font-size: 0.8125rem; color: #637859; }

.slide-inner .patterns-list {
    background: white;
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin: 0.75rem 0;
}

.slide-inner .patterns-list li { font-size: 0.875rem; margin-bottom: 0.25rem; }

.slide-inner .clinical-presentation {
    background: rgba(0, 0, 0, 0.025);
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin: 0.75rem 0;
    font-size: 0.875rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Course Overview Page Styles --- */
.course-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.course-card-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #4d5f45 0%, #637859 100%);
    color: white;
}

.course-card-body {
    padding: 1.5rem 2rem;
}

.module-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #f1f5f0;
    text-decoration: none;
    color: inherit;
    transition: padding-left 0.2s ease;
}

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

.module-list-item:hover {
    padding-left: 0.5rem;
}

.module-list-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e3e7df;
    color: #4d5f45;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.module-list-num.complete {
    background: #4d5f45;
    color: white;
}

.module-list-info {
    flex: 1;
    min-width: 0;
}

.module-list-title {
    font-weight: 600;
    color: #2d3629;
    font-size: 0.9375rem;
}

.module-list-meta {
    font-size: 0.8125rem;
    color: #637859;
}

/* --- Landing Page Styles --- */
.learn-landing-hero {
    padding: 8rem 1.5rem 4rem;
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 40%, #f6f7f5 100%);
    text-align: center;
}

.learn-landing-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .learn-landing-hero h1 { font-size: 3.5rem; }
}

.learn-landing-hero p {
    font-size: 1.125rem;
    color: #637859;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.7;
}

/* Email capture */
.email-capture {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    max-width: 28rem;
    margin: 2rem auto;
}

.email-capture h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.5rem;
}

.email-capture p {
    font-size: 0.875rem;
    color: #637859;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.email-capture form {
    display: flex;
    gap: 0.5rem;
}

.email-capture input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #c7d0c1;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #3e4c38;
    transition: border-color 0.2s ease;
}

.email-capture input[type="email"]:focus {
    outline: none;
    border-color: #637859;
    box-shadow: 0 0 0 3px rgba(99, 120, 89, 0.15);
}

.email-capture button[type="submit"] {
    background: #4d5f45;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.email-capture button[type="submit"]:hover {
    background: #3e4c38;
}

.email-skip {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #a3b199;
    text-decoration: none;
}

.email-skip:hover {
    color: #637859;
}

/* Continue where you left off */
.continue-banner {
    background: linear-gradient(135deg, #e3e7df 0%, #f6f7f5 100%);
    border: 1px solid rgba(163, 177, 153, 0.4);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.continue-banner a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #4d5f45;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9375rem;
}

.continue-banner a:hover {
    color: #3e4c38;
}

/* Pay what you can */
.support-card {
    background: linear-gradient(135deg, #4d5f45 0%, #3e4c38 100%);
    color: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
}

.support-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

.support-card p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 32rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.support-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.support-tier {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

.support-tier:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Coming soon badge */
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* --- Welcome Back Banner --- */
.welcome-back {
    background: linear-gradient(135deg, #e3e7df 0%, #f6f7f5 100%);
    border: 1px solid rgba(163, 177, 153, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #3e4c38;
}

.welcome-back i {
    color: #4d5f45;
}

/* --- Footer for learn pages --- */
.learn-footer {
    background: #2d3629;
    padding: 2rem 1.5rem;
    color: #a3b199;
    font-size: 0.8125rem;
    text-align: center;
    margin-top: 2rem;
}

.learn-footer a {
    color: #c7d0c1;
    text-decoration: none;
}

.learn-footer a:hover {
    color: white;
}

/* --- Utility --- */
.learn-container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.learn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .learn-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .learn-grid.three-col {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Homepage teaser */
.learn-teaser {
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 50%, #f6f7f5 100%);
    border: 1px solid rgba(163, 177, 153, 0.3);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.learn-teaser::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(99, 120, 89, 0.06);
}

.learn-teaser h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.75rem;
    position: relative;
}

.learn-teaser p {
    color: #637859;
    max-width: 32rem;
    margin: 0 auto 1.25rem;
    line-height: 1.6;
    position: relative;
}

.learn-teaser-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4d5f45;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.learn-teaser-btn:hover {
    background: #3e4c38;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(77, 95, 69, 0.25);
}

/* ==========================================================================
   Visual Diagrams - CSS/HTML components for visual learners
   ========================================================================== */

/* --- Diagram Container (shared wrapper) --- */
.diagram-container {
    max-width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

/* --- Nafs Spectrum (horizontal 3-zone bar) --- */
.nafs-spectrum {
    display: flex;
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nafs-zone {
    flex: 1;
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    position: relative;
}

.nafs-zone small {
    display: block;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.nafs-zone.ammara {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.nafs-zone.lawwama {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.nafs-zone.mutmainna {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
}

.nafs-marker {
    position: absolute;
    bottom: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6875rem;
    color: #637859;
    white-space: nowrap;
    font-weight: 500;
}

/* --- Zone Diagram (vertical 3-band — Window of Tolerance) --- */
.zone-diagram {
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.zone-band {
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.zone-band-label {
    font-weight: 700;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.zone-band-desc {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.zone-band.hyper {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.zone-band.window {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    color: #166534;
    padding: 1.75rem 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.zone-band.hypo {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    color: #1e40af;
}

/* --- Comparison Visual (side-by-side cards) --- */
.comparison-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (max-width: 640px) {
    .comparison-visual {
        grid-template-columns: 1fr;
    }
}

.comparison-column {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.comparison-column-header {
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
}

.comparison-column-header.restorative {
    background: #dcfce7;
    color: #166534;
}

.comparison-column-header.pathological {
    background: #ffedd5;
    color: #9a3412;
}

.comparison-column-body {
    padding: 1rem;
    background: white;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #4d5f45;
}

.comparison-column-body .flow-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0;
}

.comparison-column-body .flow-arrow {
    color: #a3b199;
    font-size: 0.75rem;
}

/* --- Framework Arc (connected horizontal cards) --- */
.framework-arc {
    display: flex;
    gap: 0;
    margin: 1.5rem 0;
    align-items: stretch;
}

@media (max-width: 640px) {
    .framework-arc {
        flex-direction: column;
    }
}

.framework-arc-card {
    flex: 1;
    background: white;
    border: 1px solid #e3e7df;
    padding: 1.25rem 1rem;
    text-align: center;
    position: relative;
}

.framework-arc-card:first-child {
    border-radius: 0.75rem 0 0 0.75rem;
}

.framework-arc-card:last-child {
    border-radius: 0 0.75rem 0.75rem 0;
}

@media (max-width: 640px) {
    .framework-arc-card:first-child {
        border-radius: 0.75rem 0.75rem 0 0;
    }
    .framework-arc-card:last-child {
        border-radius: 0 0 0.75rem 0.75rem;
    }
}

.framework-arc-card .arc-arabic {
    font-family: 'Amiri', Georgia, serif;
    font-size: 1.125rem;
    color: #4d5f45;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.framework-arc-card .arc-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #2d3629;
    margin-bottom: 0.375rem;
}

.framework-arc-card .arc-desc {
    font-size: 0.75rem;
    color: #637859;
    line-height: 1.5;
}

.framework-arc-arrow {
    display: flex;
    align-items: center;
    color: #4d5f45;
    font-size: 1.25rem;
    padding: 0 0.25rem;
}

@media (max-width: 640px) {
    .framework-arc-arrow {
        justify-content: center;
        padding: 0.25rem 0;
        transform: rotate(90deg);
    }
}

/* --- Mermaid Diagram Wrapper --- */
.mermaid-wrapper {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.mermaid-wrapper .mermaid {
    width: 100%;
}

/* Ensure mermaid SVGs fill available space */
.mermaid svg {
    width: 100%;
    height: auto;
    min-height: 120px;
}

/* ==========================================================================
   CONTENT ENHANCEMENT STYLES — Vignettes, Transcripts, Practice Guides
   ========================================================================== */

/* --- Vignette Card (Learner Scenarios) --- */
.vignette-card {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f0eb 100%);
    border-left: 4px solid #8b7355;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.5rem;
    margin: 1rem 0;
    color: #44403c;
    line-height: 1.85;
}

.vignette-card .vignette-name {
    font-weight: 600;
    font-style: normal;
    color: #2d3629;
}

.vignette-card p {
    color: #44403c;
    margin-bottom: 0.875rem;
}

.vignette-card p:last-child {
    margin-bottom: 0;
}

.vignette-card .vignette-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
    font-style: normal;
}

/* --- Session Transcript (Clinician Dialogues) --- */
.session-transcript {
    margin: 1rem 0;
    border: 1px solid #e3e7df;
    border-radius: 0.75rem;
    overflow: hidden;
}

.session-transcript .session-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.25rem;
    background: #f5f3ff;
    border-bottom: 1px solid #e3e7df;
}

.session-line {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f6f7f5;
}

.session-line:last-child {
    border-bottom: none;
}

.session-line .speaker {
    font-weight: 600;
    color: #4d5f45;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.session-line .dialogue {
    color: #3e4c38;
    line-height: 1.75;
    font-size: 0.9375rem;
}

.session-line .internal {
    color: #637859;
    font-style: italic;
    font-size: 0.8125rem;
    line-height: 1.6;
    padding: 0.5rem 0.75rem;
    background: #fafbf9;
    border-radius: 0.375rem;
    margin-top: 0.375rem;
}

/* --- Practice Guide Steps --- */
.practice-guide {
    background: linear-gradient(135deg, #f0fdf4 0%, #f6f7f5 100%);
    border: 1px solid rgba(77, 95, 69, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.practice-guide .guide-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #15803d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.practice-step {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(77, 95, 69, 0.1);
}

.practice-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.practice-step .step-num {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    background: #4d5f45;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.125rem;
}

.practice-step .step-content {
    flex: 1;
}

.practice-step .step-content strong {
    display: block;
    color: #2d3629;
    margin-bottom: 0.25rem;
}

.practice-step .step-content p {
    font-size: 0.875rem;
    color: #4d5f45;
    margin-bottom: 0;
    line-height: 1.7;
}

/* --- Complexity / Warning Card --- */
.complexity-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef9ee 100%);
    border-left: 4px solid #d97706;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.complexity-card .complexity-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
}

.complexity-card p {
    color: #78350f;
    line-height: 1.85;
    margin-bottom: 0.875rem;
}

.complexity-card p:last-child {
    margin-bottom: 0;
}

.complexity-card ul {
    padding-left: 1.25rem;
    margin-bottom: 0.875rem;
}

.complexity-card li {
    color: #78350f;
    line-height: 1.7;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

/* --- Deep Source Analysis Card --- */
.deep-source {
    background: linear-gradient(135deg, #f6f7f5 0%, #e3e7df 100%);
    border: 1px solid rgba(163, 177, 153, 0.4);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.deep-source .source-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3e4c38;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
}

.deep-source .arabic-text {
    font-family: 'Amiri', Georgia, serif;
    font-size: 1.4rem;
    line-height: 2;
    direction: rtl;
    text-align: center;
    color: #3e4c38;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.deep-source .scholar-note {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.75rem 0;
    font-size: 0.9375rem;
}

.deep-source .scholar-note .scholar-name {
    font-weight: 600;
    color: #2d3629;
    display: block;
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   ACTIVE LEARNING COMPONENTS — Mirror, Body Check-In, Journal, Throughline, Pause
   ========================================================================== */

/* --- Mirror Prompt (Personal reflection after vignettes) --- */
.mirror-prompt {
    background: linear-gradient(135deg, #faf9f7 0%, #f3ede7 100%);
    border: 1px solid #d4c4b0;
    border-radius: 1rem;
    padding: 1.75rem;
    margin: 1rem 0;
}

.mirror-prompt .mirror-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a7255;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.mirror-prompt h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.5rem;
}

.mirror-prompt .mirror-question {
    color: #4d5f45;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    font-style: italic;
}

.mirror-prompt .mirror-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e8dfd4;
    border-radius: 0.75rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.mirror-prompt .mirror-textarea:focus {
    outline: none;
    border-color: #8a7255;
}

.mirror-prompt .mirror-textarea::placeholder {
    color: #a3b199;
    font-style: italic;
}

/* --- Body Check-In (Somatic pause) --- */
.body-checkin {
    background: linear-gradient(135deg, #f0f7f4 0%, #e3f0e9 100%);
    border: 1px solid #a3b199;
    border-radius: 1rem;
    padding: 1.75rem;
    margin: 1rem 0;
    text-align: center;
}

.body-checkin .checkin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4d5f45;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.body-checkin .checkin-icon {
    font-size: 2rem;
    color: #637859;
    margin-bottom: 0.75rem;
}

.body-checkin h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 0.75rem;
}

.body-checkin .checkin-instruction {
    color: #4d5f45;
    line-height: 1.85;
    font-size: 0.9375rem;
    max-width: 32rem;
    margin: 0 auto 1.25rem;
}

.body-checkin .checkin-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 28rem;
    margin: 0 auto 1.25rem;
}

.body-checkin .checkin-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #4d5f45;
    line-height: 1.65;
}

.body-checkin .checkin-step .step-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #c7d0c1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #3e4c38;
    margin-top: 0.125rem;
}

.body-checkin .checkin-note {
    font-size: 0.8125rem;
    color: #637859;
    font-style: italic;
    margin-top: 0.5rem;
}

/* --- Concept Journal (Inline 1-2 sentence reflection) --- */
.concept-journal {
    background: linear-gradient(135deg, #fefcf9 0%, #fdf8f0 100%);
    border: 1px solid #e8dfd4;
    border-left: 4px solid #bfa88c;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.concept-journal .journal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a68b6a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.concept-journal .journal-question {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #2d3629;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.concept-journal .journal-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.875rem;
    border: 2px solid #e8dfd4;
    border-radius: 0.5rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.concept-journal .journal-textarea:focus {
    outline: none;
    border-color: #a68b6a;
}

.concept-journal .journal-textarea::placeholder {
    color: #a3b199;
    font-style: italic;
}

/* --- Throughline Revisit (Shows earlier response + new prompt) --- */
.throughline-revisit {
    background: linear-gradient(135deg, #f8f6ff 0%, #f0ecff 100%);
    border: 1px solid #c4b5fd;
    border-radius: 1rem;
    padding: 1.75rem;
    margin: 1rem 0;
}

.throughline-revisit .throughline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.throughline-revisit h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 1rem;
}

.throughline-revisit .earlier-response {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #ddd6fe;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.throughline-revisit .earlier-response .response-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.throughline-revisit .earlier-response .response-text {
    font-size: 0.9375rem;
    color: #4d5f45;
    line-height: 1.65;
    font-style: italic;
}

.throughline-revisit .earlier-response .response-empty {
    font-size: 0.875rem;
    color: #a3b199;
    font-style: italic;
}

.throughline-revisit .throughline-question {
    color: #4d5f45;
    line-height: 1.75;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.throughline-revisit .throughline-textarea {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    border: 2px solid #ddd6fe;
    border-radius: 0.75rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.throughline-revisit .throughline-textarea:focus {
    outline: none;
    border-color: #7c3aed;
}

.throughline-revisit .throughline-textarea::placeholder {
    color: #a3b199;
    font-style: italic;
}

/* --- Guided Pause (Breath/body exercise) --- */
.guided-pause {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    border: 1px solid #a3b199;
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    margin: 1rem 0;
    text-align: center;
}

.guided-pause .pause-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4d5f45;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.guided-pause .pause-icon {
    font-size: 2.5rem;
    color: #637859;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.guided-pause h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3629;
    margin-bottom: 1rem;
}

.guided-pause .pause-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 32rem;
    margin: 0 auto 1.5rem;
}

.guided-pause .pause-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.9375rem;
    color: #4d5f45;
    line-height: 1.75;
}

.guided-pause .pause-step .step-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4d5f45;
    margin-top: 0.125rem;
}

.guided-pause .pause-reflection {
    margin-top: 1.25rem;
    text-align: left;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.guided-pause .pause-reflection .pause-question {
    font-style: italic;
    color: #4d5f45;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.guided-pause .pause-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.875rem;
    border: 2px solid #c7d0c1;
    border-radius: 0.5rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #3e4c38;
    background: white;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.guided-pause .pause-textarea:focus {
    outline: none;
    border-color: #637859;
}

.guided-pause .pause-textarea::placeholder {
    color: #a3b199;
    font-style: italic;
}

/* --- Shared save status for all new activity types --- */
.mirror-prompt .activity-save-status,
.concept-journal .activity-save-status,
.throughline-revisit .activity-save-status,
.guided-pause .activity-save-status {
    font-size: 0.75rem;
    color: #637859;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mirror-prompt .activity-save-status.visible,
.concept-journal .activity-save-status.visible,
.throughline-revisit .activity-save-status.visible,
.guided-pause .activity-save-status.visible {
    opacity: 1;
}

/* --- Responsive adjustments for active learning components --- */
@media (max-width: 640px) {
    .mirror-prompt,
    .body-checkin,
    .concept-journal,
    .throughline-revisit,
    .guided-pause {
        padding: 1.25rem;
    }

    .mirror-prompt .mirror-textarea,
    .concept-journal .journal-textarea,
    .throughline-revisit .throughline-textarea,
    .guided-pause .pause-textarea {
        min-height: 80px;
    }

    .body-checkin .checkin-steps,
    .guided-pause .pause-steps {
        max-width: 100%;
    }

    .guided-pause .pause-reflection {
        max-width: 100%;
    }
}
