
/* =========================================
   SUBJECT INTRO + TEACHERS SECTIONS
========================================= */

.subject-intro-section,
.teachers-section {
    width: 100%;
    box-sizing: border-box;
    padding: 3.5rem 0 1rem;
}

.subject-intro-section .regular-content-container,
.teachers-section .regular-content-container {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0;
}

/* INTRO HEADINGS */

.subject-intro,
.teachers-intro {
    width: 100%;
    box-sizing: border-box;
    padding: 0 1.25rem;
    text-align: center;
}

.subject-intro h1,
.teachers-intro h2 {
    max-width: 700px;
    margin: 0 auto 1.25rem;
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    line-height: 1.25;
    font-weight: 700;
    color: #5B2B95;
}

.subject-intro > p,
.teachers-intro > p {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.65;
    color: #171515;
}

/* SUBJECT DESCRIPTION */

.subject-intro-description {
    max-width: 850px;
    box-sizing: border-box;
    margin: 2rem auto 0;
    padding: 0 1.25rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #171515;
}

.subject-intro-description p {
    margin: 0 0 1.25rem;
}

.subject-intro-description p:last-child {
    margin-bottom: 0;
}

.subject-intro-highlight {
    font-weight: 600;
}

/* TEACHERS GRID — MOBILE */

.teachers-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    width: 90%;
    max-width: 350px;
    margin: 2.5rem auto 0;
}

/* TEACHER CARD */

.teacher-card {
    width: 100%;
    min-width: 0;
    color: #171515;
}

.teacher-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    border: 2px solid #5B2B95;
    border-radius: 18px;
    box-sizing: border-box;
}

.teacher-card-content {
    padding: 0.8rem 0.25rem 0;
}

.teacher-card-content p {
    margin: 0 0 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.55;
    color: #171515;
}

/* PROFILE LINK */

/* TEACHER MODAL OVERLAY */

/* SCROLLABLE MODAL CONTENT */

.teacher-modal-content {
    flex: 1;
    min-height: 0;

    overflow-y: auto;

    padding: 24px;
    box-sizing: border-box;
}

.teacher-modal-overlay {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.7);

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 16px;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 450ms linear,
        visibility 450ms linear;

    z-index: 5000;
}

.teacher-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* TEACHER MODAL BOX */

.teacher-modal-box {
    position: relative;

    display: flex;
    flex-direction: column;

    background: white;
    color: #171515;

    width: 100%;
    max-width: 440px;
    max-height: 90vh;

    overflow: hidden;

    padding: 0;

    border: 2px solid #5B2B95;
    border-radius: 18px;

    box-sizing: border-box;
}


/* TEACHER IMAGE */

.teacher-modal-image {
    display: block;

    width: 135px;
    aspect-ratio: 3 / 4;

    object-fit: cover;
    object-position: center;

    border: 2px solid #5B2B95;
    border-radius: 14px;

    margin: 0 auto 18px;
}


/* TEACHER NAME */

.teacher-modal-box h2 {
    margin: 0 0 18px;

    color: #5B2B95;

    font-size: 1.5rem;
    line-height: 1.3;

    text-align: center;
}


/* TEACHER INFORMATION */

.teacher-modal-info {
    margin-bottom: 16px;
    font-weight: 600;
}

.teacher-modal-info p {
    margin: 0 0 8px;

    font-size: 0.95rem;
    line-height: 1.5;
}

.teacher-modal-info p:last-child {
    margin-bottom: 0;
}


/* TEACHER DESCRIPTION */

.teacher-modal-description {
    margin: 0;

    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 600;
    color: #171515;
}


/* REVIEWS SECTION */

.teacher-modal-reviews {
    margin-top: 24px;
    padding-top: 18px;

    border-top: 1px solid #D8C9E8;
}

.teacher-modal-reviews h3 {
    margin: 0 0 12px;

    color: #5B2B95;

    font-size: 1.2rem;
}

.teacher-modal-reviews p {
    margin: 0;

    font-size: 0.9rem;
    line-height: 1.6;
}


/* CLOSE BUTTON */

.teacher-modal-close {
    position: absolute;

    top: 8px;
    right: 12px;

    background: none;
    border: none;

    color: #5B2B95;

    font-size: 2rem;
    line-height: 1;

    cursor: pointer;

    z-index: 10;
}

.teacher-profile-btn {
    display: block;
    width: fit-content;
    margin-top: 0.8rem;

    padding: 0;

    background: none;
    border: none;

    color: #5B2B95;

    font: inherit;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition: color 0.25s ease;
}

.teacher-profile-btn:hover {
    color: #8A5BC2;
}


/* FIXED CTA FOOTER */

.teacher-modal-footer {
    flex-shrink: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 16px;

    border-top: 2px solid #5B2B95;

    background: white;
    box-sizing: border-box;
}


/* CTA BUTTON */

.demo-cta-button {
    display: inline-block;

    padding: 0.7rem 1.6rem;

    border: 2px solid transparent;
    border-radius: 999px;

    background-color: #5B2B95;
    color: #F3EDF1;

    font-weight: 600;
    text-decoration: none;
    text-align: center;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.demo-cta-button:hover {
    background-color: #8A5BC2;
    color: #F3EDF1;
}
/*MEDIA QUERY - DESKTOP*/


@media (min-width: 1200px){


/* =========================================
   SUBJECT INTRO + TEACHERS — DESKTOP
========================================= */

.subject-intro-section,
.teachers-section {
    padding: 5rem 0 1rem;
}

/* INTRO HEADINGS */

.subject-intro h1,
.teachers-intro h2 {
    font-size: 3rem;
    max-width: 850px;
}

/* INTRO SUBTITLES */

.subject-intro > p,
.teachers-intro > p {
    width: 90%;
    max-width: none;
    font-size: 1.15rem;
}

/* SUBJECT DESCRIPTION */

.subject-intro-description {
    max-width: 900px;
    margin-top: 2.5rem;
    font-size: 1.1rem;
}

.teachers-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
    justify-content: center;
    gap: 3rem 2.5rem;
    max-width: 1200px;
    width: 90%;
    max-width: 1200px;
    margin: 3.5rem auto 0;
}

.teacher-card-image {
    border-radius: 22px;
}

.teacher-card-content {
    padding: 1rem 0.25rem 0;
}

}