/* Team hero */
.team-hero {
    min-height: 100vh;
    background-image: url("../images/bg_8.jpg");
    background-repeat: no-repeat;
    background-position: top;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 0;
}

.team-hero::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--shade-of-black);
    opacity: 0.45;
    z-index: 1;
}

.team-hero-inner {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5rem;
}

.team-hero h1 {
    font-size: 2rem;
    color: white;
    text-align: center;
    font-family: var(--poppins);
    text-transform: capitalize;
    line-height: 1.3;
}

/* ── Team grid ─────────────────────────────── */
.team-section {
    padding-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* ── Card ──────────────────────────────────── */
.team-card {
    display: flex;
    flex-direction: column;
    background-color: rgb(30, 30, 30);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: rgba(229, 6, 47, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Image container – colored bg per person ─ */
.team-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.team-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Unique background colour per card */
.team-card:nth-child(1) .team-img-wrap { background-color: #c4894e; }
.team-card:nth-child(2) .team-img-wrap { background-color: #4e82c4; }
.team-card:nth-child(3) .team-img-wrap { background-color: #3faa80; }
.team-card:nth-child(4) .team-img-wrap { background-color: #b55a3a; }

/* ── Text area ─────────────────────────────── */
.team-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.25rem 1.25rem 1.5rem;
}

.team-info h3 {
    color: var(--white-color);
    font-size: 1rem;
    font-family: var(--poppins);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.team-role {
    display: block;
    color: rgba(246, 246, 246, 0.8);
    font-size: 0.78rem;
    font-family: var(--poppins);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bio-preview {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    line-height: 1.65;
    margin: 0.5rem 0 0;
    font-family: var(--roboto);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Read full bio button ──────────────────── */
.bio-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    color: rgba(246, 246, 246, 0.8);
    font-size: 0.8rem;
    font-family: var(--poppins);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.bio-btn span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.bio-btn:hover span {
    transform: translateX(4px);
}

/* ── Modal overlay ─────────────────────────── */
.bio-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.78);
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
}

.bio-modal.open {
    display: flex;
}

.bio-modal-box {
    background-color: rgb(28, 28, 28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.bio-modal-close {
    all: unset;
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 1;
    line-height: 1;
}

.bio-modal-close:hover {
    color: var(--white-color);
}

.bio-modal-header {
    padding: 1.75rem 3rem 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.bio-modal-header h3 {
    color: var(--white-color);
    font-size: 1.25rem;
    font-family: var(--poppins);
    font-weight: 700;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.bio-modal-header span {
    color: rgba(246, 246, 246, 0.8);
    font-size: 0.75rem;
    font-family: var(--poppins);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bio-modal-body {
    padding: 1.5rem 1.75rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bio-modal-body p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    line-height: 1.8;
    margin: 0;
    font-family: var(--roboto);
}

.modal-linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.55rem 1.1rem;
    background-color: #0a66c2;
    color: #ffffff;
    font-size: 0.82rem;
    font-family: var(--poppins);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 6px;
    text-decoration: none;
    align-self: flex-start;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-linkedin-link:hover {
    background-color: #004182;
    transform: translateY(-1px);
}

/* ── Tablet – horizontal cards, 2-col grid ─── */
@media (min-width: 600px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .team-card {
        flex-direction: row;
        align-items: stretch;
    }

    .team-img-wrap {
        width: 170px;
        aspect-ratio: unset;
    }

    .team-info {
        justify-content: center;
    }
}

/* ── Desktop tweaks ────────────────────────── */
@media (min-width: 768px) {
    .team-hero h1 {
        font-size: 3rem;
    }

    .team-img-wrap {
        width: 200px;
    }

    .team-info h3 {
        font-size: 1.05rem;
    }
}

@media (min-width: 960px) {
    .team-hero h1 {
        font-size: 3.5rem;
    }

    .team-img-wrap {
        width: 210px;
    }
}
