@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');
/* Page heading */

body {
    font-family: "Cairo";

    margin: 0;
    padding: 0;
}

body > h1 {
    margin: 35px auto 12px;
    padding: 0 18px;
    text-align: center;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.6;
}

body > center img[smallgif] {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin: 5px auto 30px;
    padding: 12px;
    border-radius: 24px;
    background: linear-gradient(145deg, #e8faff, #eafff5);
    box-shadow: 0 8px 22px rgba(26, 130, 160, 0.10);
}

/* Main navigation area */

.field-navigation {
    width: min(94%, 1050px);
    margin: 0 auto 28px;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;

    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #dceef3;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(31, 105, 140, 0.07);
}

/* Dropdowns */

.navigator {
    width: min(100%, 390px);
    min-width: 220px;
    min-height: 48px;
    padding: 9px 42px 9px 14px;

    color: #315e70;
    background: linear-gradient(145deg, #ffffff, #f0fbff);
    border: 1px solid #cce8ef;
    border-radius: 12px;
    outline: none;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 3px 10px rgba(30, 100, 140, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.2s ease;
}

.navigator:hover {
    border-color: #8ed5e2;
}

.navigator:focus {
    border-color: #28b5c4;
    box-shadow: 0 0 0 4px rgba(40, 181, 196, 0.13);
}

.navigator option {
    padding: 10px;
    color: #315e70;
    background: #f4fcff;
    font-family: inherit;
    font-size: 15px;
}

/* Keep the second dropdown aligned with the first */

.unit-navigation {
    width: min(100%, 390px);
    display: flex;
    justify-content: center;
}

.unit-navigation .navigator {
    width: 100%;
}

/* Previous / next buttons */

.navigation-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 8px auto 0;
}

.navigation-buttons > button {
    min-width: 125px;
    min-height: 46px;
    padding: 10px 24px;

    color: #ffffff;
    background: linear-gradient(110deg, #159fc2, #16b5aa);
    border: 0;
    border-radius: 12px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;

    box-shadow: 0 5px 14px rgba(17, 157, 174, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
                filter 0.2s ease;
}

.navigation-buttons > button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 8px 18px rgba(17, 157, 174, 0.24);
}

.navigation-buttons > button:active {
    transform: translateY(0) scale(0.98);
}

/* Divider */

body > hr {
    width: min(92%, 1050px);
    height: 2px;
    margin: 32px auto;
    border: 0;
    background: linear-gradient(to right, transparent, #8bdce3, #a5e8d0, transparent);
}

/* Lesson content heading */

body > label[for="lesson-container"] {
    display: block;
    width: min(92%, 1050px);
    margin: 0 auto 16px;
    color: #168a9b;
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 900;
    text-align: center;
}

body > label[for="lesson-container"] .bigname {
    display: inline-block;
    padding: 5px 18px;
}

/* Lesson iframe */

.lesson-container {
    width: min(94%, 1100px);
    margin: 0 auto 45px;
    padding: 0;
    text-align: center;

    border: solid 1px #0cffc6;
    border-radius: 12px;
}

#unit-container {
    display: block;
    width: 100%;
    
    margin: 0 auto;

    background: #ffffff;
    border: 1px solid #d5eaf0;
    border-radius: 16px;

    box-shadow: 0 8px 28px rgba(31, 105, 140, 0.10);
}

/* Small details used inside lesson content, if present */

impword, .impword, [impword] {
    color: #a03207;
    font-weight: 900;
    
    text-decoration: solid underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 8%;
    text-decoration-color: #a03207;

} /* كلمات مفتاحية */

definition, .definition, [definition] {
    color: #10438f;
    font-weight: 900;

    text-indent: 9px;
    text-decoration-color: #10438f;

} /* عنوان التعريف */

aspects, .aspects, [aspects] {
    color: #137c73;
    font-weight: 900;
    text-decoration-color: #137c73;

} /* عنوان المظاهر */

aspect, .aspect, [aspect] {
    color: #407c6a;
    font-weight: 700;
    text-decoration-color: #407c6a;

} /* مظهر */

c, .c, [c] {
    color: #72407c;
    font-weight: 700;
    text-decoration-color: #72407c;

} /* كلمات معتبرة */

note-title, .note-title, [note-title] {
    color: #be2d2d;
    font-weight: 800;
    text-decoration-color: #be2d2d;

} /* عنوان الملاحظات*/

note, .note, [note] {
    display: block;
    background: #ffb5b57c;
    border-right: 4px solid #be2d2d;
    border-radius: 5px;

    padding: 10px 14px;
    margin: 12px 0;
    text-decoration-color: #be2d2d;

} /* محتوى الملاحظات */

fnc, .fnc, [fnc] {
    color: #267c52;
    font-weight: 800;
    text-decoration-color: #267c52;

} /* وظائف */

rfml, .rfml, [rfml] {
    color: #64748b;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #64748b;
} /* اعادة تسمية */

ilu, .ilu, [ilu] {
    color: #8b387a;
    font-weight: 700;
} /* تمثيل */

question, .question, [question] {
    color: #ff510c;
    font-weight: 900;

} /* وظائف */

answer, .answer, [answer] {
    color: #5f3010;
    font-weight: 800;
} /* وظائف */

[bold] {
    font-weight: bold;
}

[underline] {
    text-decoration: underline;
}

[italic] {
    font-style: italic;
}

li {
  padding: 8px 6px;  
}

ul, ol {
    list-style-position: inside;
}

/* =========================
   LOADED LESSON PAGE
========================= */

.lesson-page {
    margin: 0;
    padding: 25px 35px;

    background: transparent;
    color: #344b58;

    font-family: "Cairo", sans-serif;
}

.lesson-content {
    width: 100%;
    margin: auto;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* FIELD TITLE */

.lesson-page .fieldTitle,
.lesson-page .unitTitle,
.lesson-page .lessonTitle {
    margin: 0;
    text-align: center;
    line-height: 1.8;

    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 8%;
}

.lesson-page .fieldTitle {
    color: #64818d;
    font-size: 21px;
    font-weight: 600;
    text-align: center;
    line-height: 1.7;
    margin: 20px 15px 5px;
    text-decoration: none;
}

.lesson-page .unitTitle {
    color: #2869b4;
    font-size: 27px;
    font-weight: 900;
    text-align: center;
    line-height: 1.7;
    margin: 5px 15px 25px;
    text-decoration: none;
}

.lesson-page .lessonTitle {
    background: rgb(19, 165, 121);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

/* UNIT TITLE */

.lesson-page .unitTitle {
    padding: 12px 15px;
}

/* LESSON TITLE */

.lesson-page .lessonTitle {
    padding: 12px;
    border-bottom: 2px solid #b8e9ed;
}

.title-separator {
    width: 65px;
    height: 3px;
    margin: 12px auto;

    background: linear-gradient(
        to right,
        #9bded5,
        #159b7b
    );

    border-radius: 10px;
}

/* LESSON BODY */

.lesson-body {
    background: #ffffff;

    border: dashed  #8ca2ab;
    border-radius: 12px;

    padding: 25px 30px;
    margin: 25px auto;

    box-shadow: 0 3px 12px rgba(35, 85, 110, 0.04);

    font-size: larger;

    color: #263746;
    line-height: 1.9;
}

.lesson-body > img {
    width: 100%;
}
/* Avoid the old global button hover affecting unrelated buttons.
   These rules only affect the controls on this page. */

@media (max-width: 700px) {
    body > h1 {
        margin-top: 25px;
    }

    body > center img[smallgif] {
        width: 78px;
        height: 78px;
        margin-bottom: 22px;
    }

    .field-navigation {
        width: 94%;
        padding: 17px 13px;
        gap: 12px;
        border-radius: 16px;
    }

    .navigator,
    .unit-navigation {
        width: 100%;
        min-width: 0;
    }

    .navigation-buttons {
        gap: 10px;
    }

    .navigation-buttons > button {
        flex: 1;
        min-width: 0;
        padding: 10px 14px;
    }

    body > hr {
        margin: 25px auto;
    }

    .lesson-container {
        width: 96%;
        margin-bottom: 25px;
    }

    #unit-container {
        height: 72vh;
        min-height: 480px;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .navigation-buttons {
        flex-direction: column;
    }

    .navigation-buttons > button {
        width: 100%;
        flex: none;
    }

    #unit-container {
        min-height: 420px;
    }
}

@media (max-width: 600px) {
    .lesson-page {
        padding: 15px;
    }

    .lesson-content {
        gap: 14px;
    }

    .lesson-body {
        padding: 12px;
    }
}