/* =============================================================
   Team Page
   ============================================================= */

/* ── Hero banner ── */
.team-hero {
    background: linear-gradient(135deg, #191919 0%, #2d2d2d 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.team-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../../img/about-page/thecarsuperstore-Luxury-cars-for-sale-team.webp') center/cover no-repeat;
    opacity: 0.12;
}

.team-hero__content {
    position: relative;
    z-index: 2;
}

.team-hero__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary, #cf1b24);
    margin-bottom: 0.75rem;
}

.team-hero__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.team-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    max-width: 520px;
    margin: 0 auto;
}

/* ── Section wrapper ── */
.team-section {
    padding: 72px 0 80px;
    background: var(--color-bg, #ffffff);
}

/* ── Grid ── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 36px 28px;
}

/* ── Card ── */
.team-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    text-align: center;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.13);
}

/* Photo */
.team-card__photo-wrap {
    overflow: hidden;
    background: #f4f4f4;
}

.team-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.team-card:hover .team-card__photo {
    transform: scale(1.06);
}

/* Placeholder when no photo */
.team-card__photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d2d2d, #444);
    font-size: 3rem;
    color: rgba(255,255,255,0.35);
}

/* Info */
.team-card__info {
    padding: 20px 16px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.team-card__name {
    font-family: var(--font-primary, 'Work Sans', sans-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-headings, #191919);
    margin: 0;
    line-height: 1.3;
}

.team-card__divider {
    width: 28px;
    height: 2px;
    background: var(--color-primary, #cf1b24);
    border-radius: 2px;
    margin: 2px 0;
}

.team-card__job {
    font-size: 0.82rem;
    color: var(--color-text-light, #666);
    margin: 0;
    line-height: 1.4;
}

/* ── Department group ── */
.team-group {
    margin-bottom: 64px;
}

.team-group:last-child {
    margin-bottom: 0;
}

.team-group__header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.team-group__title {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--color-headings, #191919);
    white-space: nowrap;
    margin: 0;
    position: relative;
    padding-left: 16px;
}

.team-group__title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--color-primary, #cf1b24);
    border-radius: 2px;
}

.team-group__line {
    flex: 1;
    height: 1px;
    background: var(--color-border, #e5e5e5);
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
    .team-section { background: var(--color-bg-dark, #191919); }
    .team-card {
        background: #242424;
        box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    }
    .team-card__name { color: #f0f0f0; }
    .team-card__photo-wrap { background: #333; }
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 28px 20px;
    }
}

@media (max-width: 575px) {
    .team-hero { padding: 60px 0 48px; }
    .team-section { padding: 48px 0 56px; }
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 14px;
    }
    .team-card__name { font-size: 0.9rem; }
    .team-card__job  { font-size: 0.78rem; }
    .team-card__info { padding: 14px 10px 18px; }
}