/* teachers-grid.css — BEM styles for the ioann-presnya teachers_grid block (task 55). Widened to content width (task 196). */

.teachers-grid {
    max-width: var(--ip-content-max);
    margin: 0 auto;
}

.teachers-grid__head {
    display: flex;
    justify-content: center;
    padding: 10px 0 36px;
}

.teachers-grid__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 36px;
    line-height: 1;
    letter-spacing: -0.396px;
    color: #1b1b1b;
    text-transform: uppercase;
    margin: 0;
}

.teachers-grid__row {
    background: #ffffff;
    border-top: 1px solid #cecece;
    border-bottom: 1px solid #cecece;
    border-radius: 5px;
    padding: 28px 36px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

.teachers-grid__row + .teachers-grid__row {
    /* Avoid double border between rows: collapse adjacent borders visually. */
    margin-top: -1px;
}

.teachers-grid__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.teachers-grid__photo {
    width: 172px;
    height: 172px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.teachers-grid__photo--placeholder {
    display: block;
    background: #e6e6e6;
}

.teachers-grid__name {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1;
    color: #1b1b1b;
    margin: 0;
}

.teachers-grid__role {
    font-family: 'Golos Text', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    color: #333333;
    margin: 0;
    max-width: 274px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teachers-grid__contact {
    font-family: 'Golos Text', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
    color: #333333;
    text-decoration: none;
    max-width: 274px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teachers-grid__contact:hover {
    text-decoration: underline;
}

.teachers-grid__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 10px 20px;
    border: 1px solid #ddb6a6;
    border-radius: 5px;
    color: #af4409;
    text-decoration: none;
    font-family: 'Golos Text', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.05;
    white-space: nowrap;
}

.teachers-grid__cta:hover {
    background: #fdf5f2;
}

.teachers-grid__empty {
    text-align: center;
    color: #555555;
    padding: 36px 0;
    font-family: 'Golos Text', sans-serif;
    font-size: 16px;
}

/*
 * Mobile breakpoint — 767.99px is the template-wide standard (matches base.css and all other
 * ioann-presnya CSS files). Single column on mobile: a 2-up layout at 360px would leave
 * ~148px per column after gutters, which cannot fit the 172/140px circular photo without
 * shrinking it and would crowd name/role/contact text. Horizontal padding is reduced to
 * 16px to avoid compounding the 16px outer gutter already set by .content in base.css
 * (task 146) — using a larger value here would produce a doubled/uneven gutter.
 */
@media (max-width: 767.99px) {
    .teachers-grid__head {
        padding: 8px 0 24px;
    }

    .teachers-grid__title {
        font-size: 28px;
    }

    .teachers-grid__row {
        grid-template-columns: 1fr;
        padding: 24px 16px;
        gap: 28px;
    }

    .teachers-grid__photo,
    .teachers-grid__photo--placeholder {
        width: 140px;
        height: 140px;
    }
}
