/* ----------------------------------------------------------
   TEAM PAGE
---------------------------------------------------------- */

.team-intro-text {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 4rem auto;
    color: #555;
    font-size: 1.05rem;
}

/* Featured principal card */
.team-principal {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto 5rem auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.team-principal-photo {
    flex: 0 0 320px;
}

.team-principal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 5;
}

.team-principal-info {
    padding: 2.5rem 2.5rem 2.5rem 0;
}

.team-principal-info .team-role {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.78rem;
    color: #b08d57;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-principal-info h2 {
    font-size: 2.1rem;
    margin-bottom: 0.8rem;
}

.team-principal-info p.team-bio {
    color: #555;
    margin-bottom: 1.4rem;
    font-size: 1.02rem;
}

.team-contact-links {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.team-contact-links a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #1a1a1a;
    font-weight: 500;
}

.team-contact-links .contact-icon {
    width: 16px;
    height: 16px;
    color: #b08d57;
}

/* Agent grid */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 2.2rem;
}

.agent-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.07);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    text-align: left;
    border-top: 3px solid transparent;
}

.agent-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.15);
    border-top-color: #b08d57;
}

.agent-photo-wrapper {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #eee;
    position: relative;
}

.agent-photo-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.agent-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.agent-card:hover .agent-photo-wrapper img {
    transform: scale(1.06);
}

/* Placeholder avatar for agents without a headshot on file */
.agent-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
    color: #fff;
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.agent-info {
    padding: 1.5rem 1.5rem 1.6rem 1.5rem;
}

.agent-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.agent-badge {
    display: inline-block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8a6d3f;
    background: rgba(176, 141, 87, 0.12);
    border: 1px solid rgba(176, 141, 87, 0.35);
    padding: 0.28rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.1rem;
}

.agent-contact {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.07);
}

.agent-contact-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: #444;
    line-height: 1.3;
    word-break: break-word;
}

.agent-contact-link:hover {
    color: #1a1a1a;
    opacity: 1;
}

.contact-icon {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    color: #b08d57;
    transition: transform 0.25s ease;
}

.agent-contact-link:hover .contact-icon {
    transform: scale(1.15);
}

@media (max-width: 800px) {
    .team-principal {
        flex-direction: column;
    }

    .team-principal-photo {
        flex: 0 0 auto;
        width: 100%;
    }

    .team-principal-info {
        padding: 2rem;
    }
}
