/* ============================================================
   Built in English — shared learning styles
   Used by the learning hub and every lesson page.
   Palette: indigo/violet (#6366f1, #8b5cf6, #4f46e5, #3730a3)
   ============================================================ */

/* ─── Progress Bar + Levels ─── */
.progress-bar {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin: 0 auto;
    max-width: 640px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12);
}

.progress-track {
    position: relative;
    background: rgba(99, 102, 241, 0.18);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 3.4rem;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-steps {
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transform: translateY(2px);
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e2e0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #a8a29e;
    transition: all 0.3s ease;
}

.step-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #a8a29e;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}

.progress-step:hover .step-dot {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.progress-step:hover .step-name { color: #6366f1; }

.progress-step.active .step-dot {
    border-color: #6366f1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.progress-step.active .step-name { color: #5b21b6; }

.progress-step.completed .step-dot {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: white;
}

.progress-step.completed .step-name { color: #8b5cf6; }

.progress-text {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5b21b6;
}

.progress-text .progress-count {
    color: #78716c;
    font-weight: 500;
}

/* ─── Level Sections ─── */
.level-section {
    padding: 70px 0;
}

.level-section:nth-of-type(even) {
    background: white;
}

.level-header {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    text-align: center;
}

.level-eyebrow {
    display: inline-block;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.85rem;
}

.level-title {
    font-size: clamp(1.6rem, 3.2vw, 2.25rem);
    font-weight: 800;
    color: #1c1917;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.level-subtitle {
    font-size: 1.05rem;
    color: #57534e;
    line-height: 1.65;
}

.level-subtitle a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.level-subtitle a:hover { text-decoration: underline; }

/* ─── Cards (Practical-Rewards style, as real links) ─── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.card-item {
    background: #f9f8f7;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-item:not(.is-soon):hover {
    transform: translateY(-4px);
    border-color: #c4b5fd;
    background: white;
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.14);
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card-item:not(.is-soon):hover::before { transform: scaleX(1); }

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.card-number {
    font-size: 0.78rem;
    font-weight: 700;
    color: #a8a29e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
}

.card-badge.done { background: #ede9fe; color: #6d28d9; }
.card-badge.soon { background: #f5f5f4; color: #a8a29e; }
.card-badge.ready { background: #d1fae5; color: #047857; }

.card-icon {
    font-size: 1.9rem;
    margin-bottom: 0.6rem;
    display: block;
}

.card-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1917;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.card-item p {
    color: #78716c;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.card-item p a.card-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.card-item p a.card-link:hover { text-decoration: underline; }

.card-title-link {
    color: inherit;
    text-decoration: none;
}
.card-title-link:hover { color: #6366f1; }

/* "You'll learn" preview list */
.card-points-wrap { margin-top: 1rem; }

.card-points-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a8a29e;
}

.card-points {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}

.card-points li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: #57534e;
    line-height: 1.45;
    margin-bottom: 0.35rem;
}

.card-points li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.62rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8b5cf6;
}

/* Numbered "how it works" flow (the ChatGPT-vs-agents card) */
.card-flow {
    list-style: decimal;
    margin: 0.45rem 0 0 1.4rem;
    padding: 0;
}
.card-flow li {
    font-size: 0.85rem;
    color: #57534e;
    line-height: 1.45;
    margin-bottom: 0.3rem;
    padding-left: 0.2rem;
}
.card-flow li::marker { color: #8b5cf6; font-weight: 700; }
.card-points-wrap + .card-points-wrap { margin-top: 1rem; }

/* Footer row: dive-deeper link + got-it toggle */
.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

.card-foot.card-foot-end { justify-content: flex-end; }

.card-read {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}
.card-read:hover { text-decoration: underline; }

.card-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    border: 1.5px solid #c4b5fd;
    background: white;
    color: #6d28d9;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.card-complete-btn:hover { background: #f5f3ff; border-color: #8b5cf6; }
.card-complete-btn.done {
    background: #ede9fe;
    border-color: #ede9fe;
    color: #6d28d9;
}

.card-soon-note {
    margin-top: auto;
    padding-top: 1.25rem;
    color: #a8a29e;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Completed card — clearly done and greyed back */
.card-item.is-complete {
    background: #eceae7;
    border-color: #ddd9d4;
    box-shadow: none;
}

.card-item.is-complete::before { display: none; }

.card-item.is-complete:hover {
    transform: none;
    box-shadow: none;
    border-color: #ccc7c0;
    background: #eceae7;
}

/* mute the content */
.card-item.is-complete h3,
.card-item.is-complete .card-title-link,
.card-item.is-complete p,
.card-item.is-complete .card-points li,
.card-item.is-complete .card-number,
.card-item.is-complete .card-points-label {
    color: #a8a29e;
}

.card-item.is-complete .card-title-link:hover { color: #78716c; }

.card-item.is-complete .card-points li::before { background: #c4b5fd; }

.card-item.is-complete .card-read { color: #9b96d6; }

/* Coming-soon card (not a link) */
.card-item.is-soon {
    opacity: 0.66;
    cursor: default;
}

/* ─── Lesson Page ─── */
.lesson-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.breadcrumb {
    font-size: 0.875rem;
    color: #78716c;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #6366f1;
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.lesson-eyebrow {
    display: inline-block;
    color: #6366f1;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.lesson-main h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #1c1917;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.lesson-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #292524;
}

.lesson-body h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.75rem);
    font-weight: 800;
    color: #1c1917;
    margin: 2.5rem 0 1rem;
    line-height: 1.25;
}

.lesson-body h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1c1917;
    margin: 1.9rem 0 0.4rem;
}

.lesson-body p { margin-bottom: 1.25rem; }

.lesson-body strong { color: #1c1917; }

.lesson-body ul {
    margin: 0 0 1.25rem 1.25rem;
    padding-left: 0.5rem;
}

.lesson-body li { margin-bottom: 0.6rem; }

.lesson-callout {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-left: 4px solid #6366f1;
    border-radius: 0 14px 14px 0;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #3730a3;
}

.lesson-callout strong { color: #3730a3; }

/* Mark-complete button */
.lesson-complete {
    margin: 3rem 0 0;
    text-align: center;
}

.btn-complete {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-complete:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.btn-complete.done {
    background: #ede9fe;
    color: #6d28d9;
    cursor: default;
}

.btn-complete.done:hover { transform: none; box-shadow: none; }

/* Prev / next */
.lesson-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e7e5e4;
}

.lesson-nav a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #292524;
    max-width: 45%;
    transition: color 0.2s ease;
}

.lesson-nav a:hover { color: #6366f1; }

.lesson-nav a.next { text-align: right; align-items: flex-end; }

.lesson-nav .nav-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a8a29e;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.lesson-nav .nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .progress-bar { padding: 1.25rem 1rem; }
    .progress-track { margin-bottom: 3.6rem; }
    .step-dot { width: 30px; height: 30px; font-size: 0.8rem; }
    .step-name {
        font-size: 0.6rem;
        white-space: normal;
        text-align: center;
        max-width: 64px;
        line-height: 1.25;
    }
    .level-section { padding: 50px 0; }
    .level-header { padding: 0 1.5rem; }
    .cards-grid { grid-template-columns: 1fr; padding: 0 1.5rem; }
    .lesson-main { padding: 2rem 1.25rem 3rem; }
    .lesson-body { font-size: 1.05rem; }
    .lesson-nav a { max-width: 48%; }
}
