/* Team Cards Styles - Final Version 9.0 (Guaranteed Fix) */

.team-preview__header {
    text-align: center;
    margin-bottom: 20px;
}

.team-cards {
    display: grid;
    gap: 60px 15px;
    padding: 60px 0;
    justify-items: center;
    /* Base: 1 column */
    grid-template-columns: 1fr;
}

/* --- Card Styles --- */
.team-card {
    background-color: #F5F7FA;
    border-radius: 4px;
    position: relative;
    height: 300px;
    width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.team-card--link { text-decoration: none; color: inherit; display: block; }

.team-card__background-shape { position: absolute; top: 110px; left: 0; width: 100%; height: 100px; background-color: #173750; z-index: 1; border-radius: 4px; }
.team-card__image { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 125px; height: 156px; z-index: 2; }
.team-card__image img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.team-card__content { position: absolute; top: 215px; bottom: 0; left: 0; right: 0; z-index: 3; padding: 5px 10px; text-align: center; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.team-card__name { color: #173750; font-family: 'Inter', sans-serif; font-size: 13px; text-transform: uppercase; line-height: 1.3; margin: 0 0 5px 0; }
.team-card__position { color: #173750; font-family: 'Inter', sans-serif; font-size: 11px; margin: 0; opacity: 0.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; height: 2.4em; line-height: 1.2em; }
.team-card__more-link { display: inline-block; color: #173750; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 11px; text-decoration: underline; margin-top: 8px; }

.team-card__meta {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.team-card__meta-item {
    display: inline-block;
    padding: 6px 12px;
    background: #d9e8f5;
    color: #173750;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(9px, 2.3vw, 11px);
    border-radius: 999px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.team-card__certificate {
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

/* --- Responsive Grid --- */

/* 2 columns for screens > 340px. This should be safe. */
@media (min-width: 340px) {
    .team-cards {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

/* Upscaling for larger viewports */
@media (min-width: 768px) {
    .team-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .team-card { height: 350px; width: 200px; }
    .team-card__background-shape { top: 130px; height: 110px; }
    .team-card__image { width: 160px; height: 200px; }
    .team-card__content { top: 245px; }
    .team-card__name { font-size: 15px; }
    .team-card__position { font-size: 13px; }
    .team-card__more-link { font-size: 13px; }
}
