/* ==================================================
   JOHN RUFFIN LECTURE SERIES

   Sections:
   1. Shared typography
   2. Series introduction
   3. Current lecturer
   4. Past lecturer cards
   5. Biography modal
   6. Tablet and mobile
================================================== */

/* ---------- 1. Shared typography ---------- */

.xula-ruffin-label {
    display: block;
    margin-bottom: 14px;
    color: #007D69;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.xula-ruffin-intro h2,
.xula-current-lecturer h2,
.xula-ruffin-section-heading h2,
.xula-ruffin-modal h2 {
    margin: 0;
    color: #000000;
    font-family: var(--font-heading);
    font-size: clamp(32px, 3.5vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

/* ---------- 2. Series introduction ---------- */

.xula-ruffin-intro {
    padding: 100px 0 80px;
    background: #FFFFFF;
}

.xula-ruffin-intro__grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(45px, 7vw, 90px);
    align-items: center;
}

.xula-ruffin-intro__portrait {
    position: relative;
	align-self: start;
    min-height: 470px;
    overflow: hidden;
    background: linear-gradient(145deg, #00594A, #007D69);
    box-shadow: 16px 16px 0 #FFC530;
}

.xula-ruffin-intro__portrait img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.xula-ruffin-intro__portrait span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-heading);
    font-size: clamp(90px, 12vw, 155px);
    font-weight: 800;
}

.xula-ruffin-intro__content p {
    margin: 22px 0 0;
    color: #414141;
    font-size: 17px;
    line-height: 1.75;
}

.xula-ruffin-intro__legacy {
    padding: 18px 20px;
    background: #EAF8F5;
    border-left: 5px solid #00A887;
}

/* ---------- 3. Current lecturer ---------- */

.xula-current-lecturer {
    padding: 90px 0;
    background: #EAF8F5;
}

.xula-current-lecturer__grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(45px, 7vw, 95px);
    align-items: start;
}

.xula-current-lecturer__portrait {
    position: relative;
    align-self: start;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(145deg, #00594A, #007D69);
    box-shadow: 20px 20px 0 #FFC530;
}

.xula-current-lecturer__portrait img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.xula-ruffin-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-heading);
    font-size: clamp(90px, 13vw, 180px);
    font-weight: 800;
}

.xula-current-lecturer__year {
    position: absolute;
    right: 25px;
    bottom: 25px;
    z-index: 3;
    padding: 11px 17px;
    color: #000000;
    background: #FFC530;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.xula-current-lecturer__title {
    margin: 20px 0 28px;
    color: #007D69;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.65;
}

.xula-current-lecturer__bio > p {
    margin: 0;
    color: #414141;
    font-size: 17px;
    line-height: 1.78;
}

.xula-current-lecturer__bio > p + p {
    margin-top: 1.15em;
}

.xula-current-lecturer__bio-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 24px;
    padding: 12px 24px;
    color: #FFFFFF;
    background: #007D69;
    border: 2px solid #007D69;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.xula-current-lecturer__bio-button:hover,
.xula-current-lecturer__bio-button:focus-visible {
    color: #000000;
    background: #FFC530;
    border-color: #FFC530;
}

/* ---------- 4. Past lecturer cards ---------- */

.xula-past-lecturers {
    padding: 105px 0;
    background: #FFFFFF;
}

.xula-ruffin-section-heading {
    /*max-width: 820px;*/
    margin: 0 auto 55px;
    text-align: center;
}

.xula-ruffin-section-heading p {
    margin: 20px 0 0;
    color: #555555;
    font-size: 17px;
    line-height: 1.7;
}

.xula-ruffin-section-heading alert {
    margin: 20px 0 0;
    color: #C16C29;
    font-size: 17px;
    line-height: 1;
	font-weight: 700;
	font-style: italic;
}

.xula-ruffin-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.xula-ruffin-card {
    display: grid;
    grid-template-columns: clamp(125px, 30%, 165px) minmax(0, 1fr);
    height: 330px;
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid #DADBDC;
    border-left: 5px solid #00A887;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.xula-ruffin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.13);
}

.xula-ruffin-card__photo {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background: linear-gradient(145deg, #00594A, #00A887);
}

.xula-ruffin-card__photo img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.xula-ruffin-card__photo span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--font-heading);
    font-size: 54px;
    font-weight: 800;
}

.xula-ruffin-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 25px 24px;
}

.xula-ruffin-card__year {
    display: block;
    margin-bottom: 10px;
    color: #007D69;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.xula-ruffin-card h3 {
    margin: 0 0 14px;
    color: #000000;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.xula-ruffin-card p {
    flex: 1;
    min-height: 0;
    margin: 0 0 24px;
    padding-right: 10px;
    overflow-y: auto;
    color: #555555;
    font-size: 15px;
    line-height: 1.65;
    scrollbar-color: #00A887 #EAF8F5;
    scrollbar-width: thin;
}

.xula-ruffin-card p::-webkit-scrollbar {
    width: 6px;
}

.xula-ruffin-card p::-webkit-scrollbar-track {
    background: #EAF8F5;
}

.xula-ruffin-card p::-webkit-scrollbar-thumb {
    background: #00A887;
    border-radius: 20px;
}

.xula-ruffin-card__button {
    margin-top: auto;
    padding: 0 0 5px;
    color: #007D69;
    background: transparent;
    border: 0;
    border-bottom: 2px solid #FFC530;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.xula-ruffin-card__button::after {
    content: " \00BB";
}

.xula-ruffin-card__button:hover,
.xula-ruffin-card__button:focus-visible {
    color: #C16C29;
    border-color: #C16C29;
}

/* ---------- 5. Biography modal ---------- */

.xula-ruffin-modal {
    width: min(680px, calc(100% - 40px));
    max-width: 680px;
    max-height: calc(100vh - 40px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: #25332F;
    background: #FFF6D4;
    border: 0;
    border-top: 9px solid #00A887;
    border-radius: 14px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.xula-ruffin-modal::backdrop {
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(3px);
}

.xula-ruffin-modal__content {
    max-height: calc(100vh - 49px);
    padding: 55px 58px 58px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.xula-ruffin-modal__close {
    position: absolute;
    top: 22px;
    right: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #000000;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 125, 105, 0.25);
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.xula-ruffin-modal__close:hover,
.xula-ruffin-modal__close:focus-visible {
    color: #FFFFFF;
    background: #007D69;
}

.xula-ruffin-modal__year {
    display: block;
    margin: 0 55px 12px 0;
    color: #007D69;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.xula-ruffin-modal__affiliation {
    margin: 18px 0 22px;
    color: #007D69 !important;
    font-weight: 700;
}

.xula-ruffin-modal p {
    color: #414141;
    font-size: 17px;
    line-height: 1.75;
}

.xula-ruffin-modal__bio {
    max-height: min(42vh, 420px);
    padding: 2px 18px 2px 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #00A887 rgba(0, 125, 105, 0.12);
}

.xula-ruffin-modal__bio p {
    margin: 0;
    color: #414141;
    font-size: 17px;
    line-height: 1.78;
    text-align: left;
}

.xula-ruffin-modal__bio p + p {
    margin-top: 1.15em;
}

.xula-ruffin-modal__bio::-webkit-scrollbar {
    width: 9px;
}

.xula-ruffin-modal__bio::-webkit-scrollbar-track {
    background: rgba(0, 125, 105, 0.12);
    border-radius: 10px;
}

.xula-ruffin-modal__bio::-webkit-scrollbar-thumb {
    background: #00A887;
    border-radius: 10px;
}

.xula-ruffin-modal__continue {
    min-height: 50px;
    margin-top: 10px;
    padding: 13px 25px;
    color: #FFFFFF;
    background: #007D69;
    border: 2px solid #007D69;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.xula-ruffin-modal__continue:hover,
.xula-ruffin-modal__continue:focus-visible {
    color: #000000;
    background: #FFC530;
    border-color: #FFC530;
}

/* ---------- 6. Tablet: 991px and below ---------- */

@media (max-width: 991px) {

    .xula-ruffin-intro__grid {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 45px;
    }

    .xula-ruffin-intro__portrait {
        min-height: 410px;
        box-shadow: 12px 12px 0 #FFC530;
    }

    .xula-current-lecturer__grid {
        grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
        gap: 45px;
    }

    .xula-current-lecturer__portrait {
        min-height: 470px;
        box-shadow: 14px 14px 0 #FFC530;
    }

    .xula-ruffin-card-grid {
        grid-template-columns: 1fr;
    }

    .xula-ruffin-card {
        grid-template-columns: 155px minmax(0, 1fr);
    }

}

/* ---------- Mobile: 767px and below ---------- */

@media (max-width: 767px) {

    .xula-ruffin-intro,
    .xula-current-lecturer,
    .xula-past-lecturers {
        padding: 70px 0;
    }

    .xula-ruffin-intro h2,
    .xula-current-lecturer h2,
    .xula-ruffin-section-heading h2,
    .xula-ruffin-modal h2 {
        font-size: 31px;
        line-height: 1.2;
    }

    .xula-ruffin-intro__grid,
    .xula-current-lecturer__grid,
    .xula-ruffin-card-grid {
        grid-template-columns: 1fr;
    }

    .xula-ruffin-intro__grid {
        gap: 48px;
    }

    .xula-ruffin-intro__portrait {
        min-height: 430px;
        margin-right: 12px;
        box-shadow: 12px 12px 0 #FFC530;
    }

    .xula-current-lecturer__grid {
        gap: 48px;
    }

    .xula-current-lecturer__portrait {
        min-height: 440px;
        margin-right: 12px;
        box-shadow: 12px 12px 0 #FFC530;
    }

    .xula-current-lecturer__year {
        right: 18px;
        bottom: 18px;
    }

    .xula-current-lecturer__title,
    .xula-current-lecturer__bio > p,
    .xula-ruffin-intro__content p {
        font-size: 16px;
    }

    .xula-ruffin-section-heading {
        margin-bottom: 40px;
        text-align: left;
    }

    .xula-ruffin-card h3 {
        font-size: 21px;
    }

    .xula-ruffin-card {
        grid-template-columns: 105px minmax(0, 1fr);
        height: 320px;
    }

    .xula-ruffin-card__body {
        padding: 20px 18px;
    }

    .xula-ruffin-card__photo span {
        font-size: 38px;
    }

    .xula-ruffin-modal {
        width: calc(100% - 28px);
        max-height: calc(100vh - 28px);
    }

    .xula-ruffin-modal__content {
        max-height: calc(100vh - 37px);
        padding: 50px 24px 28px;
    }

    .xula-ruffin-modal__close {
        top: 18px;
        right: 18px;
        width: 38px;
        height: 38px;
        font-size: 27px;
    }

    .xula-ruffin-modal p {
        font-size: 16px;
        line-height: 1.7;
    }

    .xula-ruffin-modal__bio {
        max-height: 45vh;
        padding-right: 12px;
    }

    .xula-ruffin-modal__bio p {
        font-size: 16px;
        line-height: 1.7;
    }

    .xula-ruffin-modal__continue {
        width: 100%;
    }

}
