/**
 * Teachers block.
 *
 * Values mirror the Tilda original (bebestschool.com, record rec507309563, a
 * Zero block): a 40 px #1cb65a heading, a 20 px paragraph, then three 360 px
 * columns 37 px apart on the 1200 px grid, each a 180 px round photo in a 200 px dashed ring, an
 * 18 px name, the languages in colour and 18 px copy, and a green 230 × 45
 * button under them. Below 960 px the teachers stack.
 */

.bbs-teachers {
    --bbs-teachers-green: #1cb65a;
    --bbs-teachers-green-hover: #169c4c;
    --bbs-teachers-yellow: #ffce35;
    --bbs-teachers-coral: #f66746;
    --bbs-teachers-pink: #f16698;

    padding: 7px 0 90px;
    background: #ffffff;
    color: #000000;
    font-family: 'ApercuPro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.bbs-teachers *,
.bbs-teachers *::before,
.bbs-teachers *::after {
    box-sizing: border-box;
}

.bbs-teachers__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bbs-teachers__title {
    margin: 0;
    color: var(--bbs-teachers-green);
    font-size: 40px;
    line-height: 1.55;
    font-weight: 700;
    text-align: center;
}

.bbs-teachers__intro {
    margin: 0;
    font-size: 20px;
    line-height: 1.55;
    font-weight: 400;
}

.bbs-teachers__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 48px 37px;
    margin-top: 15px;
}

.bbs-teachers__card {
    --bbs-teachers-accent: var(--bbs-teachers-green);

    display: flex;
    flex: 0 0 360px;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}

.bbs-teachers__card--yellow {
    --bbs-teachers-accent: var(--bbs-teachers-yellow);
}

.bbs-teachers__card--coral {
    --bbs-teachers-accent: var(--bbs-teachers-coral);
}

.bbs-teachers__card--pink {
    --bbs-teachers-accent: var(--bbs-teachers-pink);
}

/* A 180 px round photo inside a 200 px dashed ring. */
.bbs-teachers__figure {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    margin-bottom: 23px;
}

.bbs-teachers__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bbs-teachers__ring circle {
    fill: none;
    stroke: var(--bbs-teachers-accent);
    stroke-width: 2.5;
    stroke-dasharray: 20 5.79;
}

.bbs-teachers__photo {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}

.bbs-teachers__name,
.bbs-teachers__subject,
.bbs-teachers__bio {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 400;
}

.bbs-teachers__name {
    color: #2e2e2e;
}

.bbs-teachers__subject {
    color: var(--bbs-teachers-accent);
}

.bbs-teachers__bio {
    margin-top: 15px;
}

/* ── Button ── */
.bbs-teachers__actions {
    display: flex;
    justify-content: center;
    margin-top: 42px;
}

.bbs-teachers__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    min-height: 45px;
    padding: 6px 20px;
    border-radius: 20px;
    background: var(--bbs-teachers-green);
    color: #ffffff;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.bbs-teachers__btn:visited {
    color: #ffffff;
}

.bbs-teachers__btn:hover,
.bbs-teachers__btn:focus-visible {
    background: var(--bbs-teachers-green-hover);
    color: #ffffff;
    text-decoration: none;
}

.bbs-teachers__btn:focus-visible {
    outline: 2px solid var(--bbs-teachers-green);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .bbs-teachers__btn {
        transition: none;
    }
}

/* ── 1199 and below: the 960 px grid ── */
@media (max-width: 1199px) {
    .bbs-teachers {
        padding: 8px 0 46px;
    }

    .bbs-teachers__inner {
        max-width: 960px;
    }

    .bbs-teachers__intro {
        margin-top: 13px;
    }

    .bbs-teachers__grid {
        column-gap: 20px;
        margin-top: 9px;
    }

    .bbs-teachers__card {
        flex: 1 1 0;
    }
}

/* ── 959 and below: one under another ── */
@media (max-width: 959px) {
    .bbs-teachers {
        padding: 12px 0 30px;
    }

    .bbs-teachers__inner {
        max-width: 640px;
    }

    .bbs-teachers__intro {
        margin-top: 0;
    }

    .bbs-teachers__grid {
        flex-direction: column;
        align-items: center;
        row-gap: 50px;
        margin-top: 34px;
    }

    .bbs-teachers__card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 590px;
    }

    .bbs-teachers__actions {
        margin-top: 40px;
    }
}

@media (max-width: 639px) {
    .bbs-teachers {
        padding-top: 9px;
    }

    .bbs-teachers__inner {
        padding: 0 10px;
    }

    .bbs-teachers__title {
        font-size: 30px;
    }

    .bbs-teachers__intro {
        margin-top: 8px;
    }
}

/*
 * On a course page (bebestschool.com/spanish-course, rec744709733): an
 * 850 px band, the heading 40 / 62 px 60 px down, the rings 38 px under it,
 * three 360 px columns 48 px apart from 12 px in, the bio 320 px wide in
 * 18 / 28 px, the button 714 px down.
 */
.bbs-teachers.bbs-teachers--course {
    padding: 60px 0 91px;
}

.bbs-teachers--course .bbs-teachers__title {
    line-height: 62px;
}

.bbs-teachers--course .bbs-teachers__grid {
    justify-content: flex-start;
    gap: 48px;
    margin-top: 38px;
    padding-left: 12px;
}

.bbs-teachers--course .bbs-teachers__figure {
    margin-bottom: 2px;
}

.bbs-teachers--course .bbs-teachers__name,
.bbs-teachers--course .bbs-teachers__subject,
.bbs-teachers--course .bbs-teachers__bio {
    line-height: 28px;
}

.bbs-teachers--course .bbs-teachers__subject {
    margin-top: 1px;
}

.bbs-teachers--course .bbs-teachers__bio {
    max-width: 320px;
    margin-top: 5px;
}

.bbs-teachers--course .bbs-teachers__actions {
    margin-top: 38px;
}

@media (max-width: 1199px) {
    .bbs-teachers--course .bbs-teachers__grid {
        justify-content: center;
        padding-left: 0;
    }
}

/* The three columns span 1188 px of the 1200 px grid: no side gutter on a computer. */
@media (min-width: 1200px) {
    .bbs-teachers--course .bbs-teachers__inner {
        padding: 0;
    }
}



/*
 * "--small" (with "--course"): the Russian course pages of bebestschool.com
 * (rec744740415) — the heading 27 px down, names 20 / 31 px, the subject
 * 14 / 22 px, the text 16 / 25 px.
 */
@media (min-width: 1200px) {
    .bbs-teachers.bbs-teachers--course.bbs-teachers--small {
        padding-top: 27px;
    }

    .bbs-teachers--small .bbs-teachers__grid {
        margin-top: 44px;
    }

    .bbs-teachers--small .bbs-teachers__name {
        font-size: 20px;
        line-height: 31px;
    }

    .bbs-teachers--small .bbs-teachers__subject {
        margin-top: -1px;
        font-size: 14px;
        line-height: 22px;
    }

    .bbs-teachers--small .bbs-teachers__bio {
        margin-top: 10px;
        font-size: 16px;
        line-height: 25px;
    }

    .bbs-teachers--small .bbs-teachers__actions {
        margin-top: 40px;
    }
}

/*
 * "--framed", and every "--course" band: the photos come with their dashed
 * ring drawn in (bebestschool.com's course pages, 200 × 200 pictures) — no
 * ring of our own, the picture whole.
 */
.bbs-teachers--course .bbs-teachers__ring,
.bbs-teachers--framed .bbs-teachers__ring {
    display: none;
}

.bbs-teachers--course .bbs-teachers__photo,
.bbs-teachers--framed .bbs-teachers__photo {
    width: 200px;
    height: 200px;
    border-radius: 0;
    object-fit: contain;
}

/* "--small" with a line under the heading (the German course pages): the
   heading at the band's top, the photos 20 px under the line. */
@media (min-width: 1200px) {
    .bbs-teachers.bbs-teachers--course.bbs-teachers--small:has(.bbs-teachers__intro) {
        padding-top: 0;
    }

    .bbs-teachers--small:has(.bbs-teachers__intro) .bbs-teachers__grid {
        margin-top: 20px;
    }
}

/* "--ringed" (with "--course"): plain photos, the dashed ring the block's own
   in the teacher's colour (the English course pages of bebestschool.com). */
.bbs-teachers--course.bbs-teachers--ringed .bbs-teachers__ring {
    display: block;
}

.bbs-teachers--course.bbs-teachers--ringed .bbs-teachers__photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}
