/* ==========================================================================
   Lessons Shared Stylesheet
   All lesson-specific CSS lives here so every Level 1-4 lesson automatically
   picks up the same look and feel. DO NOT duplicate these in inline <style> tags.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   Arabic Typography
   ---------------------------------------------------------------------------- */

/* Already defined in professional_style.css but made explicit here for clarity */
.font-arabic-large {
    font-family: var(--arabic-font);
    font-size: 3.5rem;
    line-height: 1.6 !important;
    padding-top: 0.2em;
    padding-bottom: 0.1em;
    display: inline-block;
}

/* Lesson page main title (التدريبات, المحادثة, المفردات, etc.) — use Arabic font */
.container.mt-5.pt-5.mb-5 .text-center.mb-5 h1 {
    font-family: var(--arabic-font);
}

/* Exercise card headers and body (Arabic instructions and items) */
.exercise-header,
.exercise-body {
    font-family: var(--arabic-font);
}

/* Dialogue speaker names (أَحْمَد, عَلِي, سَلْمَى, etc.) */
.speaker-name {
    font-family: var(--arabic-font);
}

/* ----------------------------------------------------------------------------
   Section Header
   ---------------------------------------------------------------------------- */
.section-header {
    font-weight: 800;
    border-bottom: 2px solid #eaebed;
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    color: #2d3748;
}

.section-header i {
    margin-right: 15px;
    color: #4a5568;
}

/* ----------------------------------------------------------------------------
   Letter Card  (used in the 28-letter grids)
   ---------------------------------------------------------------------------- */
.letter-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.letter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* When revealed (clicked) the card tints to the lesson colour.
   Each lesson can override just this one property via a scoped CSS variable. */
.letter-card.revealed {
    background-color: var(--lesson-reveal-bg, #f0f9ff) !important;
    border-color: var(--lesson-reveal-border, #3b82f6) !important;
}

/* ----------------------------------------------------------------------------
   Drill / Flashcard  (used in the 100-card random recognition grids)
   ---------------------------------------------------------------------------- */
.drill-card {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-width: 2px !important;
    border-color: #f1f5f9 !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drill-card:hover {
    border-color: #cbd5e1 !important;
    transform: scale(1.05);
    z-index: 2;
}

.drill-card.revealed {
    background-color: var(--lesson-reveal-bg, #f0f9ff) !important;
    border-color: var(--lesson-reveal-border, #3b82f6) !important;
}

/* Hidden metadata — revealed on click */
.drill-name {
    opacity: 0;
    transition: all 0.3s ease;
}

.drill-card.revealed .drill-name {
    opacity: 1 !important;
}

/* ----------------------------------------------------------------------------
   Utility helpers used across lessons
   ---------------------------------------------------------------------------- */
.cursor-pointer {
    cursor: pointer;
}

.makhraj-box {
    border-left: 4px solid #4299e1;
    background: #f7fafc;
    padding: 1.5rem;
    height: 100%;
    border-radius: 0.25rem;
}

.makhraj-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3182ce;
}

/* ----------------------------------------------------------------------------
   Lesson Intro Hero  (the centred heading + lead text at the top of each lesson)
   ---------------------------------------------------------------------------- */
.lesson-intro {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease;
}

.lesson-intro h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.lesson-intro p.lead {
    max-width: 680px;
    margin: 0 auto;
    color: #64748b;
}

/* ----------------------------------------------------------------------------
   Scroll Progress Bar  (thin bar at the very top, fills as user scrolls)
   ---------------------------------------------------------------------------- */
#lesson-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--lesson-color, #3b82f6);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ----------------------------------------------------------------------------
   Responsive tweaks
   ---------------------------------------------------------------------------- */
@media (max-width: 576px) {
    .font-arabic-large {
        font-size: 2.5rem;
    }

    .drill-card {
        min-height: 100px;
    }
}
