/* =========================================================
   LESSON PAGE — VERSION 2
   ========================================================= */

.lesson-page {
    display: grid;
    gap: 24px;
    padding-bottom: 32px;
}


/* Breadcrumbs */

.lesson-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;

    padding: 14px 18px;

    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 14px;

    color: #66788a;
    font-size: .9rem;
}

.lesson-breadcrumbs a {
    color: #245f91;
    font-weight: 750;
}

.lesson-breadcrumbs a:hover {
    text-decoration: underline;
}


/* =========================================================
   LESSON HERO
   ========================================================= */

.lesson-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;

    padding: clamp(28px, 5vw, 52px);

    overflow: hidden;

    background:
        linear-gradient(
            120deg,
            #174c79 0%,
            #2679b7 58%,
            #4aa7d8 100%
        );

    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(29, 77, 113, .18);

    color: #ffffff;
}

.lesson-header::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -70px;
    bottom: -120px;

    background: rgba(255,255,255,.08);
    border-radius: 50%;
}

.lesson-number {
    position: relative;
    z-index: 2;

    display: grid;
    place-items: center;

    width: 92px;
    height: 92px;

    background: #ffffff;
    border: 6px solid rgba(255,255,255,.24);
    border-radius: 50%;

    color: #1c6093;
    font-size: 1.05rem;
    font-weight: 900;
    text-align: center;
}

.lesson-header > div:last-child {
    position: relative;
    z-index: 2;
}

.lesson-header h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

.lesson-amharic-title {
    margin: 0 0 10px;

    color: #fff1a8;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    font-weight: 800;
}

.lesson-introduction {
    max-width: 800px;
    margin: 0;

    color: rgba(255,255,255,.92);
    font-size: 1rem;
    line-height: 1.7;
}


/* =========================================================
   MODULE PROGRESS
   ========================================================= */

.lesson-progress-card {
    padding: 22px 24px;

    background: #ffffff;
    border: 1px solid #dce5ef;
    border-left: 6px solid #8c55d9;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(30, 55, 80, .08);
}

.lesson-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
}

.lesson-progress-top h2 {
    margin: 0;
    color: #273d57;
    font-size: 1.15rem;
}

.lesson-progress-percentage {
    color: #7444b8;
    font-weight: 900;
}

.lesson-progress-track {
    width: 100%;
    height: 12px;

    overflow: hidden;

    background: #ece7f4;
    border-radius: 999px;
}

.lesson-progress-fill {
    width: 20%;
    height: 100%;

    background: linear-gradient(90deg, #8e57d4, #d965c7);
    border-radius: inherit;
}


/* =========================================================
   SHARED LESSON SECTIONS
   ========================================================= */

.lesson-objectives,
.lesson-video-section,
.lesson-vocabulary,
.lesson-resource-section,
.family-practice-card,
.heritage-practice-preview,
.lesson-not-available {
    padding: clamp(22px, 4vw, 34px);

    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    box-shadow: 0 7px 20px rgba(30, 55, 80, .07);
}


/* Objectives */

.lesson-objectives {
    border-left: 6px solid #e5ad21;
    background: linear-gradient(135deg, #fffdf4, #ffffff);
}

.lesson-objectives h2 {
    margin-top: 0;
    color: #5f4614;
}

.lesson-objectives ul {
    display: grid;
    gap: 10px;
    margin-bottom: 0;
    padding-left: 22px;
}

.lesson-objectives li::marker {
    color: #d99a05;
}


/* Section heading */

.lesson-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.lesson-step {
    display: grid;
    place-items: center;
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    background: #e4effa;
    border-radius: 50%;

    color: #245f91;
    font-size: 1.05rem;
    font-weight: 900;
}

.lesson-section-heading h2 {
    margin: 0 0 5px;
    color: #203a57;
}

.lesson-section-heading p {
    margin: 0;
    color: #667788;
}


/* =========================================================
   VIDEO
   ========================================================= */

.lesson-video-section {
    border-left: 6px solid #2d80c3;
}

.lesson-video-wrapper {
    overflow: hidden;

    background: #15283a;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(16, 36, 54, .18);
}

.lesson-video {
    display: block;
    width: 100%;
    max-height: 620px;
    background: #111;
}

.video-help-note {
    margin-top: 16px;
    padding: 15px 18px;

    background: #edf6ff;
    border-radius: 12px;

    color: #315d7d;
    line-height: 1.6;
}


/* =========================================================
   VOCABULARY
   ========================================================= */

.lesson-vocabulary {
    border-left: 6px solid #36a45a;
}

.vocabulary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.vocabulary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 180px;
    padding: 20px;

    background: linear-gradient(145deg, #f1fff2, #ffffff);
    border: 1px solid #cce7d0;
    border-radius: 17px;

    text-align: center;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.vocabulary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 22px rgba(36, 111, 57, .12);
}

.vocabulary-amharic {
    margin-bottom: 10px;

    color: #258143;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 850;
}

.vocabulary-card strong {
    margin-bottom: 7px;
    color: #273c4f;
}

.vocabulary-card small {
    color: #6b7b87;
}


/* =========================================================
   RESOURCE
   ========================================================= */

.lesson-resource-section {
    border-left: 6px solid #e78327;
}

.resource-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;

    padding: 20px;

    background: #fff8ee;
    border: 1px solid #f0d7b8;
    border-radius: 16px;
}

.resource-icon {
    display: grid;
    place-items: center;

    width: 62px;
    height: 62px;

    background: #ffe5c3;
    border-radius: 16px;

    font-size: 2rem;
}

.resource-information h3 {
    margin: 0 0 6px;
    color: #6d401c;
}

.resource-information p {
    margin: 0;
    color: #6a625a;
}


/* =========================================================
   FAMILY PRACTICE
   ========================================================= */

.family-practice-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 18px;

    border-left: 6px solid #d253a5;
    background: linear-gradient(135deg, #fff3fb, #ffffff);
}

.family-practice-card h2 {
    margin-top: 0;
    color: #7b2d64;
}

.practice-dialogue {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.practice-dialogue-line {
    padding: 15px 17px;

    background: #ffffff;
    border: 1px solid #eed5e6;
    border-radius: 13px;
}

.practice-dialogue-line p {
    margin: 0 0 5px;
}

.practice-dialogue-line small {
    color: #7d6977;
}


/* =========================================================
   HERITAGE PRACTICE PREVIEW
   Phase 1 placeholder
   ========================================================= */

.heritage-practice-preview {
    position: relative;
    overflow: hidden;

    border-left: 6px solid #8854cc;

    background:
        linear-gradient(
            135deg,
            #f4ecff 0%,
            #fff7fb 58%,
            #fffbea 100%
        );
}

.heritage-practice-preview::after {
    content: "ሀ ለ ሐ";
    position: absolute;
    right: 24px;
    bottom: -12px;

    color: rgba(107, 63, 167, .08);
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: 7rem;
    font-weight: 900;
}

.heritage-practice-preview-content {
    position: relative;
    z-index: 2;
}

.heritage-practice-label {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;

    background: #7e4bc1;
    border-radius: 999px;

    color: #ffffff;
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.heritage-practice-preview h2 {
    margin: 0 0 9px;
    color: #54317f;
}

.heritage-practice-preview p {
    max-width: 760px;
    margin-bottom: 18px;
    color: #665571;
    line-height: 1.65;
}

/* =========================================================
   FIDEL FAMILY CARDS
   ========================================================= */

.fidel-family-grid {
    position: relative;
    z-index: 2;

    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.fidel-family-card {
    padding: 22px;

    background: #ffffff;
    border: 1px solid #ddd3e9;
    border-radius: 18px;

    box-shadow: 0 7px 18px rgba(54, 39, 77, .07);
}

.fidel-family-purple {
    border-left: 6px solid #8251c8;
    background: linear-gradient(135deg, #faf6ff, #ffffff);
}

.fidel-family-green {
    border-left: 6px solid #38a95b;
    background: linear-gradient(135deg, #f3fff4, #ffffff);
}

.fidel-family-orange {
    border-left: 6px solid #eb8b29;
    background: linear-gradient(135deg, #fff8ef, #ffffff);
}

.fidel-family-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

.fidel-family-label {
    display: inline-block;
    margin-bottom: 5px;

    color: #74677f;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fidel-family-header h3 {
    margin: 0;

    color: #453052;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: 1.45rem;
}

.fidel-family-icon {
    display: grid;
    place-items: center;
    flex: 0 0 54px;

    width: 54px;
    height: 54px;

    background: #f0e8fa;
    border-radius: 15px;

    color: #7141ad;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: 1.9rem;
    font-weight: 900;
}

.fidel-family-green .fidel-family-icon {
    background: #e3f6e7;
    color: #258244;
}

.fidel-family-orange .fidel-family-icon {
    background: #fff0dd;
    color: #c76b14;
}

.fidel-family-description {
    margin: 0 0 16px;
    color: #6d6273;
}

.fidel-preview-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(52px, 1fr));
    gap: 10px;
}

.fidel-preview-row span {
    display: grid;
    place-items: center;

    min-height: 62px;
    padding: 8px;

    background: #ffffff;
    border: 1px solid #d8c8eb;
    border-radius: 13px;

    color: #7040ac;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: 1.75rem;
    font-weight: 850;

    box-shadow: 0 3px 8px rgba(70, 47, 96, .05);
}

.fidel-family-green .fidel-preview-row span {
    border-color: #c8e7cf;
    color: #258244;
}

.fidel-family-orange .fidel-preview-row span {
    border-color: #efd3b7;
    color: #c76b14;
}

.fidel-family-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.fidel-action-button {
    min-height: 42px;
    padding: 9px 14px;

    background: #f3edf9;
    border: 1px solid #d9cbea;
    border-radius: 11px;

    color: #68418f;
    font-size: .84rem;
    font-weight: 800;
}

.fidel-family-green .fidel-action-button {
    background: #ebf8ee;
    border-color: #cce7d2;
    color: #277c43;
}

.fidel-family-orange .fidel-action-button {
    background: #fff3e5;
    border-color: #efd6ba;
    color: #ad641f;
}

.fidel-action-button:disabled {
    cursor: not-allowed;
    opacity: .72;
}


/* Tablet */

@media (max-width: 760px) {

    .fidel-preview-row {
        grid-template-columns: repeat(4, minmax(50px, 1fr));
    }
}


/* Phone */

@media (max-width: 520px) {

    .fidel-family-card {
        padding: 18px;
    }

    .fidel-family-header {
        align-items: flex-start;
    }

    .fidel-preview-row {
        grid-template-columns: repeat(3, minmax(48px, 1fr));
    }

    .fidel-family-actions {
        flex-direction: column;
    }

    .fidel-action-button {
        width: 100%;
    }
}
.fidel-family{

    margin-top:24px;

}

.fidel-family:first-of-type{

    margin-top:18px;

}

.fidel-family-title{

    margin-bottom:10px;

    color:#5c378e;

    font-size:1rem;

    font-weight:800;

}

.fidel-preview-row span {
    display: grid;
    place-items: center;

    width: 58px;
    height: 58px;

    background: #ffffff;
    border: 1px solid #d8c8eb;
    border-radius: 13px;

    color: #7040ac;
    font-family: var(--font-ethiopic, Georgia, serif);
    font-size: 1.65rem;
    font-weight: 850;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.lesson-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;

    padding: 22px;

    background: #ffffff;
    border: 1px solid #dce5ef;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(30, 55, 80, .07);
}

.lesson-actions .primary-button,
.lesson-actions .secondary-button {
    min-width: 190px;
    justify-content: center;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .vocabulary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .lesson-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .lesson-number {
        margin-inline: auto;
    }

    .lesson-introduction {
        margin-inline: auto;
    }

    .resource-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .resource-icon {
        margin-inline: auto;
    }

    .family-practice-card {
        grid-template-columns: 1fr;
    }

    .lesson-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .lesson-actions a {
        width: 100%;
    }
}


@media (max-width: 520px) {

    .lesson-page {
        gap: 18px;
    }

    .vocabulary-grid {
        grid-template-columns: 1fr;
    }

    .lesson-section-heading {
        gap: 12px;
    }

    .lesson-step {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .fidel-preview-row span {
        width: 50px;
        height: 50px;
        font-size: 1.45rem;
    }
}