* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}


body {
    background: linear-gradient(
        135deg,
        #f8fbff,
        #eef4fb,
        #fffdf2
    );


    color: #231815;
    min-height: 100vh;
}


.learning-page {
    width: 100%;
    min-height: 100vh;
}


.resources-container {
    width: min(1210px, 94%);
    margin: 0 auto;
    padding: 45px 0 70px;
}


.resources-heading {
    text-align: center;
    margin-bottom: 35px;
}


.resources-heading .label {
    display: inline-block;
    padding: 7px 15px;
    border-radius: 30px;


    background: #f5efc6;
    color: #4d0e12;


    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;


    margin-bottom: 12px;
}


.resources-heading h1 {
    color: #4d0e12;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}


.resources-heading p {
    max-width: 720px;
    margin: auto;


    color: #526a84;


    line-height: 1.7;
    font-size: 14px;
}


.resource-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}


.resource-item {
    position: relative;


    min-height: 158px;


    padding: 20px 22px 22px 90px;


    background: rgba(255, 255, 255, 0.88);


    border: 1px solid #d5e1ef;
    border-radius: 17px;


    overflow: hidden;


    cursor: pointer;


    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.resource-item::before {
    content: "";


    position: absolute;


    width: 100px;
    height: 100px;


    right: -28px;
    bottom: -55px;


    background: #e8e1fa;


    border-radius: 50%;
}


.resource-item:nth-child(2)::before,
.resource-item:nth-child(4)::before {
    background: #dce9fc;
}


.resource-item:nth-child(3)::before,
.resource-item:nth-child(6)::before {
    background: #f4e1f0;
}


.resource-item:nth-child(5)::before,
.resource-item:nth-child(8)::before {
    background: #f7edd7;
}


.resource-item:hover {
    transform: translateY(-5px);


    border-color: #a5bcd6;


    box-shadow:
        0 14px 35px rgba(35, 24, 21, 0.10);
}


.resource-item:active {
    transform: translateY(-2px);
}


.resource-number {
    position: absolute;


    left: 17px;
    top: 20px;


    width: 58px;
    height: 58px;


    display: flex;
    align-items: center;
    justify-content: center;


    background: #6d0f20;
    color: #ffffff;


    border-radius: 15px;


    font-size: 20px;
    font-weight: 800;


    box-shadow:
        0 7px 14px rgba(77, 14, 18, 0.18);
}


.resource-info {
    position: relative;
    z-index: 2;
}


.resource-info h3 {
    color: #12385e;


    font-size: 16px;
    font-weight: 800;


    margin-bottom: 7px;
}


.resource-info p {
    color: #526a84;


    font-size: 13px;
    line-height: 1.7;


    margin-bottom: 15px;
}


.resource-tag {
    display: inline-block;


    padding: 6px 11px;


    border-radius: 20px;


    background: #f1f5ff;


    border: 1px solid #dce5f5;


    color: #315b8a;


    font-size: 10px;
    font-weight: 700;
}


.resource-icon {
    position: absolute;


    right: 18px;
    top: 20px;


    width: 46px;
    height: 46px;


    border-radius: 14px;


    display: flex;
    align-items: center;
    justify-content: center;


    background: #ebe5fc;
    color: #4d0e12;


    font-size: 19px;


    z-index: 3;
}


.resource-item:nth-child(2) .resource-icon,
.resource-item:nth-child(4) .resource-icon {
    background: #e1edff;
}


.resource-item:nth-child(3) .resource-icon,
.resource-item:nth-child(6) .resource-icon {
    background: #f6e5f2;
}


.resource-item:nth-child(5) .resource-icon,
.resource-item:nth-child(8) .resource-icon {
    background: #f8eedc;
}


.resource-item::after {
    content: "Click to study";


    position: absolute;


    right: 18px;
    bottom: 16px;


    padding: 5px 10px;


    border-radius: 20px;


    background: rgba(165, 188, 214, 0.22);


    color: #4d0e12;


    font-size: 9px;
    font-weight: 800;


    opacity: 0;


    transform: translateY(5px);


    transition: 0.25s ease;


    z-index: 5;
}


.resource-item:hover::after {
    opacity: 1;
    transform: translateY(0);
}




/* MODAL */


.learning-modal {
    position: fixed;


    inset: 0;


    z-index: 9999;


    display: flex;
    justify-content: center;
    align-items: center;


    padding: 20px;


    background: rgba(35, 24, 21, 0.68);


    backdrop-filter: blur(7px);


    opacity: 0;
    visibility: hidden;
    pointer-events: none;


    transition: 0.3s ease;
}


.learning-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


.learning-modal-card {
    width: min(950px, 100%);


    max-height: 91vh;


    background: #ffffff;


    border-radius: 23px;


    overflow: hidden;
    overflow-y: auto;


    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.25);


    transform: translateY(35px) scale(0.96);


    transition: 0.3s ease;
}


.learning-modal.active .learning-modal-card {
    transform: translateY(0) scale(1);
}


.learning-modal-header {
    position: relative;


    padding: 42px 55px 32px;


    background: linear-gradient(
        135deg,
        #f7faff 0%,
        #edf4fc 55%,
        #f5efc6 100%
    );


    border-bottom: 1px solid #dce6f1;
}


.learning-modal-header span {
    display: inline-block;


    padding: 7px 13px;


    border-radius: 20px;


    background: #e8effa;


    color: #315b8a;


    font-size: 10px;
    font-weight: 800;


    margin-bottom: 13px;
}


.learning-modal-header h2 {
    color: #4d0e12;


    font-size: 28px;
    line-height: 1.3;


    margin-bottom: 10px;


    padding-right: 45px;
}


.learning-modal-header p {
    color: #526a84;


    font-size: 13px;
    line-height: 1.8;


    max-width: 760px;
}


.learning-close {
    position: absolute;


    top: 20px;
    right: 20px;


    width: 42px;
    height: 42px;


    border: none;
    border-radius: 50%;


    background: #f5efc6;
    color: #4d0e12;


    cursor: pointer;


    font-size: 17px;


    display: flex;
    align-items: center;
    justify-content: center;


    transition: 0.25s ease;


    z-index: 10;
}


.learning-close:hover {
    background: #4d0e12;
    color: #ffffff;


    transform: rotate(90deg);
}


.learning-modal-body {
    padding: 35px 50px 50px;
}


.lesson-section {
    margin-bottom: 25px;


    padding: 24px;


    background: #fbfcfe;


    border: 1px solid #e1e8f1;


    border-radius: 16px;
}


.lesson-section:last-child {
    margin-bottom: 0;
}


.lesson-section h3 {
    color: #12385e;


    font-size: 18px;
    font-weight: 800;


    margin-bottom: 13px;
}


.lesson-section p {
    color: #526a84;


    font-size: 13px;
    line-height: 1.85;


    margin-bottom: 12px;
}


.lesson-section p:last-child {
    margin-bottom: 0;
}


.lesson-section ul,
.lesson-section ol {
    color: #526a84;


    font-size: 13px;
    line-height: 1.9;


    padding-left: 23px;
}


.lesson-section li {
    margin-bottom: 5px;
}


.topic-grid {
    display: grid;


    grid-template-columns: repeat(2, 1fr);


    gap: 14px;


    margin-top: 18px;
}


.topic-item {
    padding: 17px;


    background: #ffffff;


    border: 1px solid #dce5ef;


    border-left: 4px solid #4d0e12;


    border-radius: 12px;


    transition: 0.25s ease;
}


.topic-item:hover {
    transform: translateY(-3px);


    border-color: #a5bcd6;


    box-shadow:
        0 8px 18px rgba(35, 24, 21, 0.07);
}


.topic-item strong {
    display: block;


    color: #12385e;


    font-size: 13px;


    margin-bottom: 6px;
}


.topic-item small {
    display: block;


    color: #60748a;


    font-size: 11px;


    line-height: 1.65;
}


.quiz-question {
    padding: 17px;


    margin-bottom: 13px;


    background: #ffffff;


    border: 1px solid #dfe7f1;


    border-radius: 12px;
}


.quiz-question:last-child {
    margin-bottom: 0;
}


.quiz-question strong {
    display: block;


    color: #12385e;


    font-size: 13px;


    margin-bottom: 8px;
}


.quiz-question p {
    margin: 0;
}


.quiz-question label {
    display: block;


    color: #60748a;


    font-size: 12px;


    padding: 4px 0;
}


.page-footer {
    text-align: center;


    padding: 25px;


    color: #60748a;


    font-size: 12px;
}


.page-footer i {
    color: #6d0f20;


    margin-right: 5px;
}




/* TABLET */


@media (max-width: 800px) {


    .resource-list {
        grid-template-columns: 1fr;
    }


    .resources-heading h1 {
        font-size: 30px;
    }


    .learning-modal-header {
        padding: 35px 25px 28px;
    }


    .learning-modal-body {
        padding: 25px;
    }


    .topic-grid {
        grid-template-columns: 1fr;
    }
}




/* MOBILE */


@media (max-width: 500px) {


    .resources-container {
        width: 92%;
        padding-top: 30px;
    }


    .resource-item {
        min-height: 175px;


        padding-left: 78px;
    }


    .resource-number {
        width: 50px;
        height: 50px;


        left: 14px;
        top: 18px;


        font-size: 17px;
    }


    .resource-icon {
        width: 40px;
        height: 40px;


        right: 14px;
        top: 17px;
    }


    .resource-info h3 {
        font-size: 14px;


        padding-right: 42px;
    }


    .resource-info p {
        font-size: 12px;
    }


    .learning-modal {
        padding: 10px;
    }


    .learning-modal-card {
        max-height: 95vh;


        border-radius: 17px;
    }


    .learning-modal-header h2 {
        font-size: 22px;
    }


    .learning-modal-body {
        padding: 18px;
    }


    .lesson-section {
        padding: 17px;
    }


    .learning-close {
        width: 37px;
        height: 37px;
    }


    .resource-item::after {
        display: none;
    }
}