/* ==========================================================
   رِحلة القراءات — QIRAAT JOURNEY
   PREMIUM UI / MASTER CSS
   متوافق مع HTML المرسل
   ========================================================== */


/* ==========================================================
   01 — ROOT SYSTEM
   ========================================================== */

:root {

    --font-primary:
        'Cairo',
        'Tajawal',
        system-ui,
        sans-serif;

    --font-quran:
        'Amiri',
        'Traditional Arabic',
        serif;


    /* BACKGROUNDS */

    --bg-base: #080d12;
    --bg-deep: #060a0e;
    --bg-surface: #0d151c;
    --bg-surface-2: #111c24;

    --bg-card: rgba(17, 28, 36, .82);
    --bg-card-hover: rgba(23, 38, 48, .95);

    --bg-glass: rgba(8, 13, 18, .78);


    /* BRAND */

    --green-primary: #1c5b47;
    --green-light: #2b7a60;
    --green-dark: #10392d;

    --gold-primary: #d7b75b;
    --gold-light: #f1dda0;
    --gold-dark: #9c7920;

    --gold-soft: rgba(215, 183, 91, .12);
    --gold-glow: rgba(215, 183, 91, .24);


    /* STATUS */

    --success: #20c997;
    --success-soft: rgba(32, 201, 151, .13);

    --warning: #eab308;
    --warning-soft: rgba(234, 179, 8, .13);

    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, .13);

    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, .13);


    /* TEXT */

    --text-main: #f5f7f8;
    --text-soft: #c5cdd1;
    --text-muted: #8d9ba3;
    --text-dim: #61717a;


    /* BORDERS */

    --border: rgba(255,255,255,.075);
    --border-strong: rgba(255,255,255,.12);
    --border-gold: rgba(215,183,91,.32);


    /* RADII */

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
    --radius-full: 999px;


    /* SHADOWS */

    --shadow-sm:
        0 8px 20px rgba(0,0,0,.18);

    --shadow-md:
        0 18px 45px rgba(0,0,0,.28);

    --shadow-lg:
        0 30px 80px rgba(0,0,0,.42);

    --shadow-gold:
        0 15px 45px rgba(215,183,91,.12);


    /* TRANSITIONS */

    --ease:
        cubic-bezier(.2,.8,.2,1);

    --transition:
        .28s var(--ease);

}


/* ==========================================================
   LIGHT MODE
   ========================================================== */

[data-theme="light"],
body.light-mode {

    --bg-base: #f4f6f4;
    --bg-deep: #edf1ee;

    --bg-surface: #ffffff;
    --bg-surface-2: #f8faf9;

    --bg-card: rgba(255,255,255,.9);
    --bg-card-hover: #ffffff;

    --bg-glass: rgba(255,255,255,.82);

    --text-main: #17211d;
    --text-soft: #42504a;
    --text-muted: #65736d;
    --text-dim: #89948f;

    --border: rgba(18,38,29,.09);
    --border-strong: rgba(18,38,29,.14);

    --shadow-sm:
        0 8px 25px rgba(20,40,30,.07);

    --shadow-md:
        0 18px 45px rgba(20,40,30,.09);

    --shadow-lg:
        0 30px 80px rgba(20,40,30,.13);
}


/* ==========================================================
   02 — RESET
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: var(--bg-base);
}

body {

    min-height: 100vh;

    font-family: var(--font-primary);

    color: var(--text-main);

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(28,91,71,.18),
            transparent 42%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(215,183,91,.055),
            transparent 30%
        ),
        var(--bg-base);

    line-height: 1.7;

    overflow-x: hidden;

    transition:
        background .4s ease,
        color .4s ease;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font-family: inherit;
}

button {
    border: 0;
    outline: 0;
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}


/* ==========================================================
   03 — SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            180deg,
            var(--gold-dark),
            var(--gold-primary)
        );

    border-radius: var(--radius-full);

    border: 2px solid var(--bg-deep);
}


/* ==========================================================
   04 — PAGE WRAPPER
   ========================================================== */

.page-wrapper {
    width: 100%;
    min-height: 100vh;
    position: relative;
}


/* ==========================================================
   05 — HEADER
   ========================================================== */

.header {

    position: sticky;
    top: 0;

    width: 100%;

    min-height: 78px;

    padding:
        12px
        clamp(18px, 4vw, 60px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    background: var(--bg-glass);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-bottom:
        1px solid var(--border);

    z-index: 500;

    transition: var(--transition);
}

.header::after {

    content: "";

    position: absolute;

    bottom: -1px;

    left: 8%;
    right: 8%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold-primary),
            transparent
        );

    opacity: .18;
}


/* LOGO */

.logo {

    display: flex;
    align-items: center;

    gap: 12px;

    flex-shrink: 0;
}

.logo-symbol {

    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            var(--green-primary),
            var(--green-dark)
        );

    border:
        1px solid var(--border-gold);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 8px 25px rgba(0,0,0,.2);
}

.logo-symbol span {

    color: var(--gold-light);

    font-family: var(--font-quran);

    font-size: 25px;

    font-weight: 700;
}

.logo-text {

    display: flex;
    flex-direction: column;

    line-height: 1.2;
}

.logo-text strong {

    font-size: 1rem;

    color: var(--text-main);
}

.logo-text small {

    margin-top: 3px;

    color: var(--text-muted);

    font-size: .67rem;
}


/* NAV */

.desktop-nav {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 4px;

    flex: 1;
}

.nav-link {

    position: relative;

    padding: 9px 13px;

    color: var(--text-muted);

    border-radius: var(--radius-sm);

    font-size: .86rem;

    font-weight: 600;

    transition: var(--transition);
}

.nav-link::after {

    content: "";

    position: absolute;

    bottom: 3px;

    left: 50%;

    width: 0;
    height: 2px;

    transform: translateX(-50%);

    background: var(--gold-primary);

    border-radius: 99px;

    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {

    color: var(--gold-light);

    background: var(--gold-soft);
}

.nav-link.active::after {

    width: 20px;
}


/* HEADER ACTIONS */

.header-actions {

    display: flex;

    align-items: center;

    gap: 9px;
}


/* THEME */

.theme-toggle {

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: var(--gold-light);

    background: var(--gold-soft);

    border: 1px solid var(--border);

    transition: var(--transition);
}

.theme-toggle:hover {

    transform: rotate(12deg) scale(1.06);

    background:
        rgba(215,183,91,.2);

    border-color:
        var(--border-gold);
}

.theme-toggle .moon {
    display: none;
}

body.light-mode .theme-toggle .sun {
    display: none;
}

body.light-mode .theme-toggle .moon {
    display: inline;
}


/* PROFILE */

.profile-button {

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 5px 9px 5px 12px;

    border-radius: var(--radius-full);

    background: var(--bg-card);

    border: 1px solid var(--border);

    color: var(--text-main);

    transition: var(--transition);
}

.profile-button:hover {

    border-color: var(--border-gold);

    transform: translateY(-2px);
}

.avatar {

    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--gold-primary),
            var(--gold-dark)
        );

    color: #10140f;

    font-weight: 800;
}

.profile-info {

    display: flex;
    flex-direction: column;

    text-align: right;

    line-height: 1.2;
}

.profile-info strong {
    font-size: .78rem;
}

.profile-info small {

    color: var(--text-muted);

    font-size: .61rem;
}


/* MENU */

.menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: var(--bg-card);

    border: 1px solid var(--border);

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;
}

.menu-toggle span {

    width: 19px;
    height: 2px;

    background: var(--text-main);

    border-radius: 99px;

    transition: var(--transition);
}


/* MOBILE NAV */

.mobile-nav {

    display: none;

    position: fixed;

    top: 78px;
    right: 14px;
    left: 14px;

    padding: 10px;

    background: var(--bg-surface);

    border:
        1px solid var(--border);

    border-radius: 20px;

    box-shadow: var(--shadow-lg);

    z-index: 490;

    opacity: 0;

    transform:
        translateY(-10px)
        scale(.98);

    pointer-events: none;

    transition: var(--transition);
}

.mobile-nav.open {

    opacity: 1;

    transform:
        translateY(0)
        scale(1);

    pointer-events: auto;
}

.mobile-nav a {

    display: block;

    padding: 13px 15px;

    border-radius: 12px;

    color: var(--text-muted);

    font-weight: 600;

    transition: var(--transition);
}

.mobile-nav a:hover {

    color: var(--gold-light);

    background: var(--gold-soft);
}


/* ==========================================================
   06 — GLOBAL SECTION
   ========================================================== */

.section {

    width: min(
        1180px,
        calc(100% - 40px)
    );

    margin-inline: auto;

    padding-block:
        clamp(70px, 9vw, 120px);
}


/* ==========================================================
   07 — HERO
   ========================================================== */

.hero {

    min-height: 690px;

    display: grid;

    grid-template-columns:
        1.08fr
        .92fr;

    align-items: center;

    gap: clamp(40px, 7vw, 100px);

    position: relative;

    overflow: hidden;
}

.hero::before {

    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    right: -220px;
    top: 30px;

    background:
        radial-gradient(
            circle,
            rgba(28,91,71,.22),
            transparent 68%
        );

    pointer-events: none;
}

.hero-decoration {

    position: absolute;

    border: 1px solid var(--border-gold);

    border-radius: 50%;

    pointer-events: none;

    opacity: .25;
}

.decoration-one {

    width: 330px;
    height: 330px;

    left: -170px;
    bottom: -160px;
}

.decoration-two {

    width: 170px;
    height: 170px;

    right: 42%;
    top: 5%;

    opacity: .08;
}


/* HERO CONTENT */

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {

    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--gold-primary);

    font-size: .76rem;

    font-weight: 700;

    margin-bottom: 22px;
}

.eyebrow span {

    width: 25px;
    height: 1px;

    background: var(--gold-primary);

    opacity: .7;
}

.hero h1 {

    font-size:
        clamp(2.5rem, 5vw, 4.8rem);

    line-height: 1.25;

    letter-spacing: -1.5px;

    font-weight: 800;

    margin-bottom: 24px;
}

.hero h1 em {

    font-family: var(--font-quran);

    font-style: normal;

    font-weight: 700;

    color: var(--gold-primary);

    text-shadow:
        0 0 35px var(--gold-glow);
}

.hero-description {

    max-width: 680px;

    color: var(--text-muted);

    font-size:
        clamp(.95rem, 1.5vw, 1.08rem);

    line-height: 2;

    margin-bottom: 30px;
}


/* ==========================================================
   ADVANCED & UNIFIED BUTTON SYSTEM (COMPLETE)
   ========================================================== */

/* 1. Containers Setup */
.hero-buttons,
.modal-footer,
.quiz-footer,
.quiz-result-actions,
.card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    width: 100%;
}

/* 2. Base Reset & Reset Properties */
.btn,
.submit-order,
#submitOrder,
.lesson-quiz-new,
#quizNextButton,
.quiz-next,
#submitWriting,
.text-button,
.journey-open-btn,
.final-test-btn,
.complete-lesson-btn,
.quiz-result-close,
#quizResultClose,
.quiz-result-retry,
#quizRetry {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem;
    width: auto;
    max-width: 100%;
    flex-shrink: 0;

    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 0.75rem 1.3rem;
    border-radius: var(--radius-sm, 10px);
    box-sizing: border-box !important;

    transition: 
        transform 0.2s var(--ease, ease),
        background 0.2s var(--ease, ease),
        border-color 0.2s var(--ease, ease),
        color 0.2s var(--ease, ease),
        box-shadow 0.2s var(--ease, ease);
}

/* 3. Focus & Accessibility */
.btn:focus-visible,
.submit-order:focus-visible,
#quizResultClose:focus-visible,
#quizRetry:focus-visible,
.lesson-quiz-new:focus-visible,
#quizNextButton:focus-visible,
#submitWriting:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 3px;
}

/* 4. Disabled States */
.btn:disabled,
.submit-order:disabled,
#quizResultClose:disabled,
#quizRetry:disabled,
.lesson-quiz-new:disabled,
#quizNextButton:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ----------------------------------------------------------
   PRIMARY GOLD BUTTONS (Primary & Retry)
   ---------------------------------------------------------- */
.btn-primary,
#quizNextButton,
.quiz-next,
#submitWriting,
.journey-open-btn,
.final-test-btn,
.quiz-result-retry,
#quizRetry {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    color: #10140f;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(215, 183, 91, 0.2);
}

.btn-primary:hover:not(:disabled),
#quizNextButton:hover:not(:disabled),
.quiz-next:hover:not(:disabled),
#submitWriting:hover:not(:disabled),
.quiz-result-retry:hover:not(:disabled),
#quizRetry:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(215, 183, 91, 0.32);
}

.btn-primary:active:not(:disabled),
.quiz-result-retry:active:not(:disabled),
#quizRetry:active:not(:disabled) {
    transform: scale(0.97);
}

/* ----------------------------------------------------------
   SECONDARY / OUTLINE BUTTONS (Close / Return)
   ---------------------------------------------------------- */
.btn-outline,
.quiz-result-close,
#quizResultClose {
    color: var(--text-soft);
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
}

.btn-outline:hover:not(:disabled),
.quiz-result-close:hover:not(:disabled),
#quizResultClose:hover:not(:disabled) {
    color: var(--gold-light);
    border-color: var(--border-gold);
    background: var(--gold-soft);
    transform: translateY(-2px);
}

.btn-outline:active:not(:disabled),
.quiz-result-close:active:not(:disabled),
#quizResultClose:active:not(:disabled) {
    transform: scale(0.97);
}

/* ----------------------------------------------------------
   SUBMIT ORDER BUTTON (Green Action)
   ---------------------------------------------------------- */
.submit-order,
#submitOrder {
    background: linear-gradient(135deg, var(--green-light, #20c997), var(--green-primary, #128c6e));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(28, 91, 71, 0.2);
}

.submit-order:hover:not(:disabled),
#submitOrder:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(28, 91, 71, 0.35);
}

/* ----------------------------------------------------------
   LESSON QUIZ BUTTON (Info Blue Action)
   ---------------------------------------------------------- */
.lesson-quiz-new {
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: var(--info, #60a5fa);
}

.lesson-quiz-new:hover:not(:disabled) {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ----------------------------------------------------------
   TEXT BUTTON (Inline Action)
   ---------------------------------------------------------- */
.text-button {
    background: transparent !important;
    padding: 0.4rem 0;
    color: var(--gold-primary);
    border-radius: 0;
}

/* ----------------------------------------------------------
   ARROW & ICON ANIMATIONS
   ---------------------------------------------------------- */
.btn b,
.submit-order b,
#submitOrder b,
.lesson-quiz-new b,
#quizNextButton b,
.quiz-next b,
#submitWriting b,
.text-button b,
.quiz-result-retry b,
#quizRetry b {
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn:hover:not(:disabled) b,
.submit-order:hover:not(:disabled) b,
#submitOrder:hover:not(:disabled) b,
.lesson-quiz-new:hover:not(:disabled) b,
#quizNextButton:hover:not(:disabled) b,
.quiz-next:hover:not(:disabled) b,
#submitWriting:hover:not(:disabled) b,
.text-button:hover:not(:disabled) b,
.quiz-result-retry:hover:not(:disabled) b,
#quizRetry:hover:not(:disabled) b {
    transform: translateX(-4px);
}

/* ----------------------------------------------------------
   RESPONSIVE LAYOUT (Mobile Optimization)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .quiz-result-actions,
    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn,
    .submit-order,
    #submitOrder,
    .lesson-quiz-new,
    #submitWriting,
    .quiz-result-close,
    #quizResultClose,
    .quiz-result-retry,
    #quizRetry {
        width: 100% !important;
    }
}
/* HERO NOTE */

.hero-note {

    margin-top: 28px;

    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--text-dim);

    font-size: .78rem;
}

.note-icon {
    color: var(--gold-primary);
}


/* HERO VISUAL */

.hero-visual {

    display: flex;

    justify-content: center;

    perspective: 1000px;
}

.journey-preview {

    width: min(100%, 470px);

    padding: 28px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(19,34,43,.92),
            rgba(10,18,24,.96)
        );

    border:
        1px solid var(--border-gold);

    box-shadow:
        var(--shadow-lg),
        0 0 80px rgba(28,91,71,.08);

    position: relative;

    transform:
        rotateY(-5deg)
        rotateX(2deg);

    transition: .6s var(--ease);
}

.journey-preview:hover {

    transform:
        rotateY(0)
        rotateX(0)
        translateY(-8px);
}

.journey-preview::before {

    content: "";

    position: absolute;

    inset: 1px;

    border-radius: 27px;

    background:
        linear-gradient(
            135deg,
            rgba(215,183,91,.08),
            transparent 30%
        );

    pointer-events: none;
}

.preview-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-bottom: 24px;

    border-bottom:
        1px solid var(--border);
}

.preview-header small {

    color: var(--text-muted);

    font-size: .7rem;
}

.preview-header h3 {

    margin-top: 4px;

    font-size: 1.2rem;
}

.preview-badge {

    width: 47px;
    height: 47px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    color: var(--gold-light);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-weight: 800;
}


/* PATH */

.preview-path {

    min-height: 180px;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 18px;
}

.preview-line {

    position: absolute;

    left: 35px;
    right: 35px;

    top: 50%;

    height: 3px;

    transform: translateY(-50%);

    background:
        linear-gradient(
            90deg,
            var(--gold-primary),
            rgba(215,183,91,.12)
        );

    border-radius: 99px;
}

.preview-node {

    position: relative;

    z-index: 2;

    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    font-size: .72rem;

    font-weight: 800;

    background: var(--bg-surface);

    border: 2px solid var(--border);

    color: var(--text-muted);
}

.preview-node.completed {

    color: #10140f;

    background: var(--gold-primary);

    border-color: var(--gold-light);

    box-shadow:
        0 0 0 6px rgba(215,183,91,.08),
        0 0 25px rgba(215,183,91,.25);
}

.preview-node.current {

    color: var(--gold-light);

    border-color: var(--gold-primary);

    box-shadow:
        0 0 0 7px rgba(215,183,91,.07);

    animation:
        nodePulse 2.4s infinite;
}

@keyframes nodePulse {

    0%,100% {
        box-shadow:
            0 0 0 6px rgba(215,183,91,.06);
    }

    50% {
        box-shadow:
            0 0 0 12px rgba(215,183,91,.02),
            0 0 25px rgba(215,183,91,.16);
    }
}

.preview-node.locked {
    opacity: .45;
}


/* PREVIEW FOOTER */

.preview-footer {

    display: flex;

    align-items: end;

    justify-content: space-between;

    gap: 20px;

    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.preview-footer small {

    color: var(--text-muted);

    display: block;

    margin-bottom: 7px;

    font-size: .68rem;
}

.preview-footer strong {

    color: var(--gold-primary);

    font-size: 1.2rem;
}

.mini-progress {

    width: 270px;

    max-width: 100%;

    height: 5px;

    background:
        rgba(255,255,255,.06);

    border-radius: 99px;

    overflow: hidden;
}

.mini-progress span {

    display: block;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--gold-dark),
            var(--gold-light)
        );

    border-radius: inherit;
}


/* ==========================================================
   08 — STATS
   ========================================================== */

.stats-section {

    width: min(
        1180px,
        calc(100% - 40px)
    );

    margin:
        0 auto 40px;

}

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;
}

.stat-card {

    padding: 21px;

    display: flex;

    align-items: center;

    gap: 15px;

    border:
        1px solid var(--border);

    border-radius: var(--radius-md);

    background: var(--bg-card);

    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.stat-card:hover {

    transform: translateY(-5px);

    border-color: var(--border-gold);

    box-shadow: var(--shadow-gold);
}

.stat-icon {

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 13px;

    color: var(--gold-primary);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: 1.2rem;
}

.stat-card span {

    display: block;

    color: var(--text-muted);

    font-size: .72rem;
}

.stat-card strong {

    display: block;

    margin-top: 2px;

    color: var(--text-main);

    font-size: 1.25rem;
}


/* ==========================================================
   09 — SECTION HEADINGS
   ========================================================== */

.section-heading {

    max-width: 720px;

    margin-bottom: 48px;
}

.section-label {

    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 12px;

    color: var(--gold-primary);

    font-size: .72rem;

    font-weight: 700;

    letter-spacing: .4px;
}

.section-label span {

    width: 29px;
    height: 29px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: .65rem;
}

.section-heading h2 {

    font-size:
        clamp(1.8rem, 4vw, 2.7rem);

    line-height: 1.3;

    margin-bottom: 10px;
}

.section-heading p {

    color: var(--text-muted);

    line-height: 1.9;

    font-size: .9rem;
}


/* ==========================================================
   10 — JOURNEY MAP
   ========================================================== */

.journey-map {

    position: relative;

    width: min(
        100%,
        1050px
    );

    margin-inline: auto;

    padding-block: 20px;
}


/* central line */

.journey-map::before {

    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    right: 50%;

    width: 2px;

    transform: translateX(50%);

    background:
        linear-gradient(
            180deg,
            transparent,
            var(--gold-primary) 8%,
            rgba(215,183,91,.15) 92%,
            transparent
        );
}


/* GENERIC GENERATED STAGE SUPPORT */

.journey-map > * {

    position: relative;
}


/* If JS creates these names */

.journey-stage {

    width: calc(50% - 45px);

    padding: 23px;

    margin-bottom: 65px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            var(--bg-card),
            rgba(10,18,24,.65)
        );

    box-shadow: var(--shadow-sm);

    backdrop-filter: blur(12px);

    transition: var(--transition);
}

.journey-stage:hover {

    transform: translateY(-6px);

    border-color: var(--border-gold);

    box-shadow: var(--shadow-md);
}


/* alternating */

.journey-stage:nth-child(odd) {
    margin-right: auto;
}

.journey-stage:nth-child(even) {
    margin-left: auto;
}


/* connector node */

.journey-stage::before {

    content: "";

    position: absolute;

    top: 30px;

    width: 15px;
    height: 15px;

    border-radius: 50%;

    background: var(--bg-surface);

    border:
        3px solid var(--gold-primary);

    box-shadow:
        0 0 0 6px rgba(215,183,91,.07);
}

.journey-stage:nth-child(odd)::before {
    right: -53px;
}

.journey-stage:nth-child(even)::before {
    left: -53px;
}


/* stage head */

.journey-stage-head {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 13px;
}

.journey-stage-number {

    color: var(--gold-primary);

    font-size: .75rem;

    font-weight: 800;
}

.journey-stage-icon {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    color: var(--gold-primary);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: 1.2rem;
}

.journey-stage h3 {

    margin-top: 13px;

    font-size: 1.15rem;
}

.journey-stage p {

    margin-top: 6px;

    color: var(--text-muted);

    font-size: .8rem;

    line-height: 1.9;
}


/* progress */

.journey-stage-progress {

    height: 6px;

    margin:
        17px 0;

    background:
        rgba(255,255,255,.055);

    border-radius: 99px;

    overflow: hidden;
}

.journey-stage-progress span {

    display: block;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--gold-dark),
            var(--gold-primary)
        );

    border-radius: inherit;
}


/* stage buttons */

.journey-open-btn,
.final-test-btn {

    width: 100%;

    min-height: 43px;

    padding: 9px 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    border-radius: 11px;

    color: var(--gold-light);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: .78rem;

    font-weight: 700;

    transition: var(--transition);
}

.journey-open-btn:hover:not(:disabled),
.final-test-btn:hover {

    color: #10140f;

    background: var(--gold-primary);

    transform: translateY(-2px);
}

.journey-open-btn:disabled {

    opacity: .38;

    cursor: not-allowed;
}

/* ==========================================================
   JOURNEY TIMELINE — STRETCH & ALTERNATING GRID (RTL SAFE)
   ========================================================== */

/* الحاوية الرئيسية للمسار */
.journey-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* الخط الذهبي العمودي في المنتصف */
.journey-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, var(--gold-primary, #d7b75b), rgba(215, 183, 91, 0.15));
    transform: translateX(-50%);
    z-index: 1;
}

/* حاوية المحطة الواحدة (Grid من صفين) */
.stage-card, 
.journey-stage-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr; /* تقسيم المساحة لنصفين متساويين */
    width: 100%;
    z-index: 2;
    box-sizing: border-box;
}

/* المحطات الفردية (01, 03, 05) -> محاذاة لليمين */
.journey-timeline > *:nth-child(odd) .stage-card-content,
.journey-timeline > *:nth-child(odd) {
    grid-column: 1 / 2; /* تأخذ العمود الأول (اليمين) */
    padding-left: 2rem;
}

/* المحطات الزوجية (02, 04, 06) -> محاذاة لليسار */
.journey-timeline > *:nth-child(even) .stage-card-content,
.journey-timeline > *:nth-child(even) {
    grid-column: 2 / 3; /* تأخذ العمود الثاني (اليسار) */
    padding-right: 2rem;
}

/* الدائرة الذهبية الثابتة على الخط */
.stage-card::after,
.journey-stage-wrapper::after {
    content: "";
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background-color: var(--bg-main, #10140f);
    border: 2px solid var(--gold-primary, #d7b75b);
    border-radius: 50%;
    z-index: 3;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.stage-card:hover::after,
.journey-stage-wrapper:hover::after {
    background-color: var(--gold-primary, #d7b75b);
    transform: translateX(-50%) scale(1.3);
}

/* ==========================================================
   RESPONSIVE DESIGN (تعديل الجوال)
   ========================================================== */
@media (max-width: 768px) {
    .journey-timeline::before {
        left: 20px !important;
        transform: none;
    }

    .stage-card, 
    .journey-stage-wrapper {
        display: block !important;
        padding-right: 45px !important;
        padding-left: 0 !important;
    }

    .journey-timeline > *:nth-child(odd),
    .journey-timeline > *:nth-child(even) {
        padding: 0 !important;
    }

    .stage-card::after,
    .journey-stage-wrapper::after {
        left: 20px !important;
        transform: translateX(-50%) !important;
    }
}

/* ==========================================================
   JOURNEY ROAD - ALTERNATING TIMELINE (EXACT CLASSES)
   ========================================================== */

/* 1. الحاوية الرئيسية للمسار */
.journey-road {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 2. الخط الذهبي العمودي في المنتصف تماماً */
.journey-road::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, var(--gold-primary, #d7b75b), rgba(215, 183, 91, 0.15));
    transform: translateX(-50%);
    z-index: 1;
}

/* 3. عناصر البداية والنهاية في منتصف الخط */
.journey-start,
.journey-finish {
    position: relative;
    z-index: 3;
    align-self: center;
    text-align: center;
    background: var(--bg-main, #10140f);
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--gold-primary, #d7b75b);
    border-radius: 20px;
}

/* 4. حاوية بطاقة المحطة (تقسيم المساحة بنظام Grid) */
.journey-stop {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    z-index: 2;
    box-sizing: border-box;
}

/* 5. المحطات على الجانب الأيمن (journey-stop-right) */
.journey-stop-right .journey-stage {
    grid-column: 1 / 2; /* إجبار البطاقة للظهور في العمود الأول (يمين) */
    margin-left: 2rem;
}

.journey-stop-right .journey-line-node {
    left: 50%;
    transform: translateX(-50%);
}

/* 6. المحطات على الجانب الأيسر (journey-stop-left) */
.journey-stop-left .journey-stage {
    grid-column: 2 / 3; /* إجبار البطاقة للظهور في العمود الثاني (يسار) */
    margin-right: 2rem;
}

.journey-stop-left .journey-line-node {
    left: 50%;
    transform: translateX(-50%);
}

/* 7. ضبط موقع العقدة/الدائرة الذهبية على الخط في المنتصف */
.journey-line-node {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    background: var(--bg-main, #10140f);
    border: 2px solid var(--gold-primary, #d7b75b);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-number {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--gold-primary, #d7b75b);
}

/* ==========================================================
   RESPONSIVE DESIGN (للجوال)
   ========================================================== */
@media (max-width: 768px) {
    .journey-road::before {
        left: 20px !important;
        transform: none;
    }

    .journey-start,
    .journey-finish {
        align-self: flex-start;
        margin-right: 45px;
    }

    .journey-stop {
        display: block !important;
        padding-right: 45px;
    }

    .journey-stop-right .journey-stage,
    .journey-stop-left .journey-stage {
        margin: 0 !important;
        width: 100% !important;
    }

    .journey-line-node {
        left: 20px !important;
        transform: translateX(-50%) !important;
    }
}

/* ==========================================================
   11 — CURRENT STAGE
   ========================================================== */

.continue-card {

    display: grid;

    grid-template-columns:
        80px
        1fr
        auto;

    align-items: center;

    gap: 25px;

    padding: 28px;

    border:
        1px solid var(--border);

    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(18,31,38,.92),
            rgba(11,19,25,.88)
        );

    box-shadow: var(--shadow-md);

    position: relative;

    overflow: hidden;
}

.continue-card::before {

    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    right: 0;

    width: 3px;

    background:
        linear-gradient(
            180deg,
            var(--gold-light),
            var(--gold-dark)
        );
}

.continue-number {

    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    border-radius: 20px;

    color: var(--gold-light);

    background:
        linear-gradient(
            145deg,
            rgba(215,183,91,.15),
            rgba(215,183,91,.04)
        );

    border:
        1px solid var(--border-gold);

    font-size: 1.25rem;

    font-weight: 800;
}

.stage-status {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: var(--success);

    font-size: .72rem;

    font-weight: 700;
}

.continue-content h3 {

    margin:
        5px 0 4px;

    font-size: 1.25rem;
}

.continue-content p {

    color: var(--text-muted);

    font-size: .8rem;
}

.continue-progress {

    margin-top: 17px;
}

.progress-label {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 7px;

    color: var(--text-muted);

    font-size: .7rem;
}

.progress-label strong {
    color: var(--gold-primary);
}

.progress-bar {

    width: 100%;

    height: 7px;

    overflow: hidden;

    border-radius: 99px;

    background:
        rgba(255,255,255,.055);
}

.progress-bar span {

    display: block;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--gold-dark),
            var(--gold-light)
        );
}


/* ==========================================================
   12 — DASHBOARD
   ========================================================== */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        1.4fr
        1fr
        1fr;

    gap: 15px;
}

.dashboard-card {

    min-height: 205px;

    padding: 24px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background: var(--bg-card);

    box-shadow: var(--shadow-sm);

    transition: var(--transition);

    position: relative;

    overflow: hidden;
}

.dashboard-card:hover {

    transform: translateY(-5px);

    border-color: var(--border-gold);

    box-shadow: var(--shadow-md);
}

.dashboard-card.main-progress {

    grid-column: span 2;

    min-height: 250px;
}

.card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;
}

.card-top > div:first-child span {

    color: var(--text-muted);

    font-size: .72rem;
}

.card-top h3 {

    margin-top: 3px;

    font-size: 1.25rem;
}


/* circle */

.circle-progress {

    width: 85px;
    height: 85px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at center,
            var(--bg-surface) 58%,
            transparent 59%
        ),
        conic-gradient(
            var(--gold-primary) 18%,
            rgba(255,255,255,.06) 18%
        );

    color: var(--gold-light);

    font-size: 1rem;

    font-weight: 800;
}

.large-progress {

    height: 8px;

    margin-top: 34px;

    background:
        rgba(255,255,255,.05);

    border-radius: 99px;

    overflow: hidden;
}

.large-progress span {

    display: block;

    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--green-primary),
            var(--gold-primary)
        );

    border-radius: inherit;
}

.progress-meta {

    display: flex;

    justify-content: space-between;

    margin-top: 20px;

    color: var(--text-muted);

    font-size: .72rem;
}

.progress-meta b {

    color: var(--gold-primary);

    margin-left: 4px;
}


/* normal dashboard */

.dashboard-icon {

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    color: var(--gold-primary);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    margin-bottom: 18px;
}

.dashboard-card small {

    display: block;

    color: var(--text-muted);

    font-size: .68rem;
}

.dashboard-card h3 {

    margin-top: 4px;

    font-size: 1rem;
}

.dashboard-card p {

    margin-top: 6px;

    color: var(--text-muted);

    font-size: .76rem;

    line-height: 1.8;
}


/* TEXT BUTTON */

.text-button {

    margin-top: 18px;

    color: var(--gold-primary);

    font-size: .76rem;

    font-weight: 700;

    transition: var(--transition);
}

.text-button:hover {

    color: var(--gold-light);

    transform: translateX(-4px);
}


/* ==========================================================
   13 — ACHIEVEMENTS
   ========================================================== */

.achievements-grid,
.badges-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}

.badge-card-new {

    padding: 26px 18px;

    text-align: center;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background: var(--bg-card);

    opacity: .45;

    filter: grayscale(.8);

    transition: var(--transition);
}

.badge-card-new:hover {

    transform: translateY(-5px);
}

.badge-card-new.unlocked {

    opacity: 1;

    filter: grayscale(0);

    border-color: var(--border-gold);

    box-shadow: var(--shadow-gold);
}

.badge-icon-new {

    width: 64px;
    height: 64px;

    margin:
        0 auto 14px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    color: var(--gold-primary);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: 1.7rem;
}


/* ==========================================================
   14 — LIBRARY
   ========================================================== */

.library-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;
}

.library-card {

    position: relative;

    min-height: 260px;

    padding: 30px;

    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            var(--bg-card),
            rgba(10,18,24,.8)
        );

    transition: var(--transition);
}

.library-card:hover {

    transform: translateY(-7px);

    border-color: var(--border-gold);

    box-shadow: var(--shadow-md);
}

.library-number {

    position: absolute;

    top: 18px;
    left: 20px;

    color: var(--text-dim);

    font-size: .65rem;

    font-weight: 800;
}

.library-icon {

    width: 55px;
    height: 55px;

    display: grid;
    place-items: center;

    border-radius: 16px;

    color: var(--gold-primary);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-size: 1.35rem;

    margin-bottom: 20px;
}

.library-card h3 {

    font-size: 1.15rem;

    margin-bottom: 8px;
}

.library-card p {

    color: var(--text-muted);

    font-size: .78rem;

    line-height: 1.9;
}


/* ==========================================================
   15 — MODAL
   ========================================================== */

.modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 2000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        rgba(2,6,9,.82);

    backdrop-filter: blur(14px);

    opacity: 0;

    pointer-events: none;

    transition: opacity .3s ease;
}

.modal-overlay.active {

    opacity: 1;

    pointer-events: auto;
}

.stage-modal,
.lesson-modal,
.quiz-window {

    width: min(
        720px,
        100%
    );

    max-height: 88vh;

    overflow-y: auto;

    padding:
        clamp(22px, 5vw, 38px);

    position: relative;

    border:
        1px solid var(--border-gold);

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            var(--bg-surface-2),
            var(--bg-surface)
        );

    box-shadow:
        var(--shadow-lg);

    transform:
        translateY(20px)
        scale(.97);

    transition:
        transform .35s var(--ease);
}

.modal-overlay.active .stage-modal,
.modal-overlay.active .lesson-modal,
.modal-overlay.active .quiz-window {

    transform:
        translateY(0)
        scale(1);
}


/* close */

.modal-close,
.quiz-close {

    position: absolute;

    top: 17px;
    left: 17px;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: var(--text-muted);

    background:
        rgba(255,255,255,.05);

    border:
        1px solid var(--border);

    font-size: 1.35rem;

    transition: var(--transition);
}

.modal-close:hover,
.quiz-close:hover {

    color: white;

    background: var(--danger);

    transform: rotate(90deg);
}


/* modal number */

.modal-stage-number {

    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    margin-bottom: 18px;

    border-radius: 15px;

    color: var(--gold-light);

    background: var(--gold-soft);

    border:
        1px solid var(--border-gold);

    font-weight: 800;
}

.modal-header h2 {

    margin-top: 7px;

    font-size:
        clamp(1.5rem, 4vw, 2rem);
}

.modal-header p {

    margin-top: 8px;

    color: var(--text-muted);

    font-size: .85rem;

    line-height: 1.9;
}


/* modal progress */

.modal-progress {

    margin-top: 25px;

    padding: 18px;

    border-radius: 16px;

    background:
        rgba(255,255,255,.025);

    border:
        1px solid var(--border);
}

.modal-progress > div:first-child {

    display: flex;

    justify-content: space-between;

    margin-bottom: 9px;

    color: var(--text-muted);

    font-size: .72rem;
}

.modal-progress strong {
    color: var(--gold-primary);
}


/* modal sections */

.modal-sections {

    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 14px;

    margin-top: 15px;
}

.modal-block {

    padding: 18px;

    border:
        1px solid var(--border);

    border-radius: 17px;

    background:
        rgba(255,255,255,.025);
}

.modal-block h3 {

    font-size: .9rem;

    margin-bottom: 10px;
}

.modal-block ul {

    list-style: none;
}

.modal-block li {

    position: relative;

    padding:
        6px 17px 6px 0;

    color: var(--text-muted);

    font-size: .75rem;
}

.modal-block li::before {

    content: "◆";

    position: absolute;

    right: 0;

    color: var(--gold-primary);

    font-size: .45rem;
}


/* lessons */

.lessons-area {

    margin-top: 22px;
}

.lessons-heading {

    display: flex;

    align-items: end;

    justify-content: space-between;

    margin-bottom: 14px;
}

.lessons-heading small {

    color: var(--text-muted);

    font-size: .65rem;
}

.lessons-heading h3 {

    font-size: 1rem;
}

.lessons-heading > span {

    color: var(--gold-primary);

    font-size: .7rem;
}

.lessons-list {

    display: flex;

    flex-direction: column;

    gap: 9px;
}

.lesson-card-new {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 15px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: var(--bg-card);

    transition: var(--transition);
}

.lesson-card-new:hover {

    background: var(--bg-card-hover);

    border-color: var(--border-gold);

    transform: translateX(-3px);
}

.lesson-card-new.completed {

    border-right:
        3px solid var(--success);
}


/* ==========================================================
   16 — QUIZ
   ========================================================== */

.answer-grid,
.truefalse-grid {

    display: grid;

    gap: 10px;

    margin-top: 18px;
}

.answer-card,
.tf-card {

    width: 100%;

    padding: 15px 17px;

    display: flex;

    align-items: center;

    gap: 10px;

    text-align: right;

    color: var(--text-main);

    background: var(--bg-card);

    border:
        1px solid var(--border);

    border-radius: 14px;

    transition: var(--transition);
}

.answer-card:hover:not(:disabled),
.tf-card:hover:not(:disabled) {

    border-color: var(--border-gold);

    background: var(--bg-card-hover);

    transform: translateX(-3px);
}

.answer-card.answer-correct,
.tf-card.answer-correct {

    color: var(--success);

    background: var(--success-soft);

    border-color: var(--success);
}

.answer-card.answer-wrong,
.tf-card.answer-wrong {

    color: var(--danger);

    background: var(--danger-soft);

    border-color: var(--danger);
}


/* sortable */

.sortable-list {

    display: flex;

    flex-direction: column;

    gap: 9px;

    margin-top: 18px;
}

.sortable-item {

    padding: 14px;

    display: flex;

    align-items: center;

    gap: 10px;

    background: var(--bg-card);

    border:
        1px solid var(--border);

    border-radius: 13px;

    cursor: grab;

    user-select: none;

    transition: var(--transition);
}

.sortable-item:hover {

    border-color: var(--border-gold);
}

.sortable-item.dragging {

    opacity: .4;

    border:
        2px dashed var(--gold-primary);
}


/* writing */

.writing-question textarea {

    width: 100%;

    min-height: 130px;

    padding: 15px;

    margin-top: 14px;

    resize: vertical;

    color: var(--text-main);

    background:
        rgba(0,0,0,.18);

    border:
        1px solid var(--border);

    border-radius: 14px;

    outline: none;

    transition: var(--transition);
}

.writing-question textarea:focus {

    border-color: var(--gold-primary);

    box-shadow:
        0 0 0 4px rgba(215,183,91,.06);
}


/* ==========================================================
   17 — TOAST
   ========================================================== */

.toast,
#toast {

    position: fixed;

    left: 24px;
    bottom: 24px;

    z-index: 3000;

    min-width: 270px;

    max-width: calc(100vw - 48px);

    padding:
        13px 17px;

    display: flex;

    align-items: center;

    gap: 10px;

    border:
        1px solid var(--border-gold);

    border-radius: 15px;

    background:
        var(--bg-surface);

    box-shadow: var(--shadow-lg);

    transform:
        translateY(120px);

    opacity: 0;

    pointer-events: none;

    transition:
        .45s var(--ease);
}

.toast.show,
#toast.show {

    transform:
        translateY(0);

    opacity: 1;
}

.toast > span,
#toast > span {

    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    color: #07110d;

    background: var(--success);

    font-size: .75rem;
}

.toast p,
#toast p {

    color: var(--text-soft);

    font-size: .75rem;

    line-height: 1.6;
}


/* ==========================================================
   18 — FOOTER
   ========================================================== */

.footer {

    margin-top: 40px;

    padding:
        55px
        clamp(20px, 6vw, 80px)
        25px;

    border-top:
        1px solid var(--border);

    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(0,0,0,.15)
        );
}

.footer-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
}

.footer-brand strong {

    font-size: .95rem;
}

.footer-brand p {

    margin-top: 3px;

    color: var(--text-muted);

    font-size: .7rem;
}

.footer-note {

    max-width: 650px;

    color: var(--text-dim);

    font-size: .7rem;

    line-height: 1.8;

    padding:
        13px 15px;

    border-right:
        2px solid var(--gold-dark);

    background:
        rgba(215,183,91,.025);
}

.footer-bottom {

    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-top: 40px;

    padding-top: 20px;

    border-top:
        1px solid var(--border);

    color: var(--text-dim);

    font-size: .65rem;
}


/* ==========================================================
   19 — REVEAL ANIMATION
   ========================================================== */

.reveal {

    opacity: 0;

    transform:
        translateY(25px);

    transition:
        opacity .7s ease,
        transform .7s var(--ease);
}

.reveal.visible {

    opacity: 1;

    transform:
        translateY(0);
}


/* ==========================================================
   20 — SELECTION
   ========================================================== */

::selection {

    color: #10140f;

    background:
        var(--gold-primary);
}


/* ==========================================================
   21 — FOCUS
   ========================================================== */

button:focus-visible,
a:focus-visible {

    outline:
        2px solid var(--gold-primary);

    outline-offset: 3px;
}


/* ==========================================================
   22 — RESPONSIVE TABLET
   ========================================================== */

@media (max-width: 1050px) {

    .desktop-nav {
        gap: 0;
    }

    .nav-link {
        padding-inline: 8px;
        font-size: .78rem;
    }

    .hero {

        gap: 45px;
    }

    .dashboard-grid {

        grid-template-columns:
            1fr 1fr;
    }

    .dashboard-card.main-progress {

        grid-column: span 2;
    }

    .achievements-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* ==========================================================
   23 — MOBILE
   ========================================================== */

@media (max-width: 800px) {

    .header {

        padding-inline: 16px;
    }

    .desktop-nav,
    .profile-info {

        display: none;
    }

    .menu-toggle {

        display: flex;
    }

    .mobile-nav {
        display: block;
    }


    .hero {

        grid-template-columns: 1fr;

        min-height: auto;

        padding-top: 75px;

        text-align: center;
    }

    .hero-content {

        display: flex;

        flex-direction: column;

        align-items: center;
    }

    .hero-description {

        max-width: 580px;
    }

    .hero-buttons {

        justify-content: center;
    }

    .hero-note {

        justify-content: center;
    }

    .hero-visual {

        margin-top: 20px;
    }

    .journey-preview {

        transform: none;
    }


    .stats-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .journey-map {

        padding-right: 32px;
    }

    .journey-map::before {

        right: 11px;

        transform: none;
    }

    .journey-stage,
    .journey-stage:nth-child(odd),
    .journey-stage:nth-child(even) {

        width: 100%;

        margin:
            0 0 30px;

        padding: 20px;

    }

    .journey-stage::before,
    .journey-stage:nth-child(odd)::before,
    .journey-stage:nth-child(even)::before {

        right: -28px;

        left: auto;

        width: 13px;
        height: 13px;
    }


    .continue-card {

        grid-template-columns: 60px 1fr;
    }

    .continue-card > .btn {

        grid-column: 1 / -1;

        width: 100%;
    }

    .continue-number {

        width: 58px;
        height: 58px;

        border-radius: 16px;
    }


    .library-grid {

        grid-template-columns:
            1fr;
    }

    .library-card {

        min-height: 220px;
    }


    .modal-sections {

        grid-template-columns:
            1fr;
    }


    .footer-bottom {

        flex-direction: column;
    }
}


/* ==========================================================
   24 — SMALL MOBILE
   ========================================================== */

@media (max-width: 520px) {

    html {
        font-size: 15px;
    }

    .section {

        width:
            calc(100% - 28px);

        padding-block:
            65px;
    }

    .header {

        min-height: 68px;
    }

    .logo-text {

        display: none;
    }

    .logo-symbol {

        width: 41px;
        height: 41px;
    }

    .mobile-nav {

        top: 70px;
    }


    .hero {

        padding-top: 55px;
    }

    .hero h1 {

        font-size: 2.25rem;

        letter-spacing: -.8px;
    }

    .hero-description {

        font-size: .84rem;
    }

    .btn {

        width: 100%;
    }

    .hero-buttons {

        width: 100%;
    }


    .journey-preview {

        padding: 20px;

        border-radius: 22px;
    }

    .preview-path {

        min-height: 145px;

        padding-inline: 5px;
    }

    .preview-line {

        left: 15px;
        right: 15px;
    }

    .preview-node {

        width: 37px;
        height: 37px;

        font-size: .63rem;
    }

    .mini-progress {

        width: 170px;
    }


    .stats-grid {

        grid-template-columns:
            1fr;
    }

    .stat-card {

        padding: 17px;
    }


    .dashboard-grid {

        grid-template-columns:
            1fr;
    }

    .dashboard-card.main-progress {

        grid-column: span 1;
    }

    .dashboard-card {

        min-height: 180px;
    }


    .achievements-grid {

        grid-template-columns:
            1fr;
    }


    .continue-card {

        padding: 20px;

        gap: 15px;
    }

    .continue-content h3 {

        font-size: 1rem;
    }


    .stage-modal {

        max-height: 92vh;

        padding: 22px 17px;

        border-radius: 22px;
    }


    .toast,
    #toast {

        left: 14px;
        right: 14px;

        bottom: 14px;

        min-width: 0;

        width: auto;
    }
}


/* ==========================================================
   25 — REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior: auto !important;

        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;
    }

    .reveal {

        opacity: 1;

        transform: none;
    }
}

/* ==========================================================
   زر فتح الدرس — lesson-open-btn-new
   ========================================================== */

.lesson-open-btn-new {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 145px;
    min-height: 46px;

    padding: 11px 20px;

    border: 1px solid var(--border-gold);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.16),
            rgba(212, 175, 55, 0.05)
        );

    color: var(--gold-light);

    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 800;

    cursor: pointer;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* ----------------------------------------------------------
   اللمعة
   ---------------------------------------------------------- */

.lesson-open-btn-new::before {
    content: "";

    position: absolute;

    top: 0;
    right: -120%;

    width: 70%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.20),
        transparent
    );

    transform: skewX(-20deg);

    transition: right 0.55s ease;

    pointer-events: none;
}


/* ----------------------------------------------------------
   النص
   ---------------------------------------------------------- */

.lesson-open-btn-new span,
.lesson-open-btn-new b {
    position: relative;
    z-index: 2;
}


/* ----------------------------------------------------------
   السهم
   ---------------------------------------------------------- */

.lesson-open-btn-new b {
    font-size: 1.15rem;
    line-height: 1;

    transition:
        transform 0.25s ease;
}


/* ----------------------------------------------------------
   Hover
   ---------------------------------------------------------- */

.lesson-open-btn-new:hover {

    transform: translateY(-3px);

    background:
        linear-gradient(
            135deg,
            var(--gold-primary),
            var(--gold-dark)
        );

    border-color: var(--gold-primary);

    color: #111;

    box-shadow:
        0 10px 25px rgba(212, 175, 55, 0.20),
        0 0 0 4px rgba(212, 175, 55, 0.06);
}


.lesson-open-btn-new:hover::before {
    right: 140%;
}


.lesson-open-btn-new:hover b {
    transform: translateX(-5px);
}


/* ----------------------------------------------------------
   الضغط
   ---------------------------------------------------------- */

.lesson-open-btn-new:active {
    transform: translateY(0) scale(0.97);

    box-shadow:
        0 5px 12px rgba(212, 175, 55, 0.12);
}


/* ----------------------------------------------------------
   Focus — للوصول بالكيبورد
   ---------------------------------------------------------- */

.lesson-open-btn-new:focus-visible {

    outline: none;

    border-color: var(--gold-primary);

    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.15),
        0 8px 20px rgba(212, 175, 55, 0.12);
}


/* ----------------------------------------------------------
   داخل بطاقة الدرس
   ---------------------------------------------------------- */

.lesson-card-new .lesson-open-btn-new {
    flex-shrink: 0;
}


/* ----------------------------------------------------------
   الموبايل
   ---------------------------------------------------------- */

@media (max-width: 768px) {

    .lesson-open-btn-new {

        width: 100%;

        min-height: 48px;

        margin-top: 10px;

        border-radius: 13px;
    }

    .lesson-card-new .lesson-open-btn-new {
        width: 100%;
    }
}

/* ==========================================================
   زر إتمام الدرس
   ========================================================== */

.complete-lesson-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 170px;
    min-height: 48px;

    padding: 12px 22px;

    border: 1px solid var(--border-gold);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.18),
            rgba(212, 175, 55, 0.05)
        );

    color: var(--gold-light);

    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 800;

    cursor: pointer;
    overflow: hidden;

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* اللمعة */

.complete-lesson-btn::before {
    content: "";

    position: absolute;

    top: 0;
    right: -120%;

    width: 70%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );

    transform: skewX(-20deg);

    transition: right 0.55s ease;

    pointer-events: none;
}


/* المحتوى فوق اللمعة */

.complete-lesson-btn {
    isolation: isolate;
}


/* Hover */

.complete-lesson-btn:hover {

    transform: translateY(-3px);

    background:
        linear-gradient(
            135deg,
            var(--gold-primary),
            var(--gold-dark)
        );

    border-color: var(--gold-primary);

    color: #111;

    box-shadow:
        0 10px 25px rgba(212,175,55,0.20),
        0 0 0 4px rgba(212,175,55,0.06);
}


.complete-lesson-btn:hover::before {
    right: 140%;
}


/* الضغط */

.complete-lesson-btn:active {
    transform: translateY(0) scale(0.97);
}


/* ==========================================================
   حالة الدرس المكتمل
   ========================================================== */

.complete-lesson-btn.is-completed {

    background:
        linear-gradient(
            135deg,
            rgba(16,185,129,0.18),
            rgba(16,185,129,0.06)
        );

    border-color: rgba(16,185,129,0.45);

    color: #6ee7b7;
}


.complete-lesson-btn.is-completed:hover {

    background:
        linear-gradient(
            135deg,
            #10b981,
            #059669
        );

    border-color: #10b981;

    color: #fff;

    box-shadow:
        0 10px 25px rgba(16,185,129,0.20);
}


/* Focus */

.complete-lesson-btn:focus-visible {

    outline: none;

    box-shadow:
        0 0 0 4px rgba(212,175,55,0.15),
        0 8px 20px rgba(212,175,55,0.12);
}


/* الموبايل */

@media (max-width: 768px) {

    .complete-lesson-btn {

        width: 100%;

        min-height: 50px;

        border-radius: 13px;
    }
}


/* ==========================================================
   QIRAAT JOURNEY — NAV HOME BUTTON
   زر الرئيسية داخل شريط التنقل
   ========================================================== */

.nav-home-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    height: 42px;
    padding: 0 14px;

    border-radius: 12px;

    color: var(--text-main);

    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.10),
            rgba(212, 175, 55, 0.035)
        );

    border: 1px solid rgba(212, 175, 55, 0.22);

    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 700;

    overflow: hidden;

    transition:
        transform 0.25s ease,
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* خط ذهبي صغير أسفل الزر */

.nav-home-btn::after {
    content: "";

    position: absolute;

    right: 50%;
    bottom: 0;

    width: 0;
    height: 2px;

    background: var(--gold-primary);

    transform: translateX(50%);

    transition: width 0.3s ease;

    border-radius: 10px;
}


/* الأيقونة */

.nav-home-btn .home-icon {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: var(--gold-primary);

    background: rgba(212, 175, 55, 0.08);

    font-size: 1rem;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}


/* النص */

.nav-home-btn .home-text {
    white-space: nowrap;
}


/* Hover */

.nav-home-btn:hover {
    color: var(--gold-primary);

    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.15),
            rgba(212, 175, 55, 0.06)
        );

    border-color:
        rgba(212, 175, 55, 0.5);

    transform: translateY(-2px);

    box-shadow:
        0 8px 24px rgba(212, 175, 55, 0.10);
}


.nav-home-btn:hover::after {
    width: 55%;
}


.nav-home-btn:hover .home-icon {
    color: var(--bg-base);

    background: var(--gold-primary);

    transform: scale(1.08);
}


/* الضغط */

.nav-home-btn:active {
    transform: translateY(0) scale(0.97);
}


/* التركيز */

.nav-home-btn:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 3px;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

    .nav-home-btn {
        width: 42px;
        height: 42px;

        padding: 0;

        border-radius: 11px;
    }

    .nav-home-btn .home-text {
        display: none;
    }

    .nav-home-btn .home-icon {
        width: 28px;
        height: 28px;
    }

}