/* Global module - Team: photo cards; the bio opens on hover (tap on touch screens) */
/* Jumping to #our-team: stop below the floating sticky header. */
.el-team {
    scroll-margin-top: 110px;
}

.el-team-head {
    max-width: 760px;
    margin: 0 auto clamp(40px, calc(40px + 20 * (100vw - 1280px) / 640), 60px);
    text-align: center;
}

.el-team-title {
    margin: 0 0 16px;
}

.el-team-text {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(17px, 1.1vw, 19px);
    color: var(--el-color-muted);
}

/* The row is wider than the content area at 1920 (1725px, design), never wider than the screen. */
.el-team-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 1.25vw, 24px);
    width: min(1725px, 100vw - 2 * var(--el-gutter));
    margin: 0;
    margin-left: 50%;
    padding: 0;
    list-style: none;
    transform: translateX(-50%);
}

/* Fixed height, so opening the bio never changes the card size under the pointer. */
.el-team-card {
    position: relative;
    height: clamp(440px, calc(440px + 107 * (100vw - 1280px) / 640), 547px);
    overflow: hidden;
    border-radius: clamp(28px, 2.5vw, 48px);
    background: #cfd8e0;
}

.el-team-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.el-team-panel {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    padding: clamp(20px, 1.6vw, 30px) clamp(20px, 1.6vw, 30px) clamp(20px, 1.4vw, 26px);
    border-radius: clamp(24px, 2.1vw, 40px);
    background: rgba(236, 240, 244, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* h3 in the outline; sized like the design. */
.el-team-name {
    margin: 0;
    font-size: clamp(26px, calc(26px + 10 * (100vw - 1280px) / 640), 36px);
    line-height: 1.1;
}

.el-team-role {
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.4;
    color: #6b7a88;
}

.el-team-more {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.4s ease, opacity 0.3s ease;
}

.el-team-more-inner {
    min-height: 0;
    overflow: hidden;
}

.el-team-bio {
    margin: 0;
    padding-top: 20px;
    font-size: clamp(17px, calc(17px + 4 * (100vw - 1280px) / 640), 21px);
    line-height: 1.45;
    color: var(--el-color-navy);
}

.el-team-more .el-link-arrow {
    margin-top: clamp(24px, calc(24px + 24 * (100vw - 1280px) / 640), 48px);
    font-size: 17px;
}

/* Open: on hover or keyboard focus (desktop), or after a tap (.is-open, global_team.js). */
.el-team-card.has-more:hover .el-team-more,
.el-team-card.has-more:focus-within .el-team-more,
.el-team-card.is-open .el-team-more {
    grid-template-rows: 1fr;
    opacity: 1;
}

@media (hover: none), (max-width: 991px) {
    .el-team-card.has-more:hover:not(.is-open):not(:focus-within) .el-team-more {
        grid-template-rows: 0fr;
        opacity: 0;
    }
}

@media (max-width: 1199px) {
    .el-team-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .el-team-list {
        grid-template-columns: 1fr;
    }

    .el-team-card {
        height: 460px;
    }
}
