/* Page styles for team.html — uniform team-card grid on the Heritage theme.
   Uses the tokens from css/style.css (loaded before this file). */

/* responsive grid of identical cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 26px;
    width: 100%;
}

/* the Chairperson's card sits alone, centered, on the first row;
   everyone else flows into the rows below */
.team-card--chair {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(300px, 100%);
}

.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
/* sunrise top bar sweeps in on hover (same signature as the landing cards) */
.team-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--sunrise-bar); z-index: 1;
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s ease;
}
@media (hover: hover) and (pointer: fine) {
    .team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
    .team-card:hover::before { transform: scaleX(1); }
}

/* uniform portrait window — every photo crops to the same shape */
.team-card__photo {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}
.team-card__photo img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    display: block;
}

.team-card__body {
    padding: 18px 20px 20px;
    display: flex; flex-direction: column;
    flex: 1;
}
.team-card__name {
    font-family: var(--font-head);
    color: var(--iith-indigo);
    font-size: 1.08rem; line-height: 1.3;
    margin: 0 0 10px;
}
.team-card__role {
    color: var(--muted);
    font-size: .9rem; line-height: 1.45;
    padding: 7px 0;
    border-top: 1px dashed var(--line);
}
.team-card__role:first-of-type { color: var(--iith-vermillion-600); font-weight: 600; }

@media (max-width: 575.98px) {
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 16px; }
    .team-card__body { padding: 14px 14px 16px; }
    .team-card__name { font-size: 1rem; }
    .team-card__role { font-size: .84rem; padding: 5px 0; }
}
