/* Team Overlay component (square image cards; unique prefix: team-overlay-*) */
.team-overlay-section {
    background: #fff;
    padding: 70px 0;
}
.team-overlay-row {
    margin-bottom: 0;
}
.team-overlay-card {
    width: 100%;
    max-width: 360px;
}
.team-overlay-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    transform: translateZ(0);
}
/* Hover overlay: fades in over image */
.team-overlay-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
    pointer-events: none;
}
.team-overlay-card:hover .team-overlay-media::after {
    opacity: 1;
}
/* Square ratio box */
.team-overlay-media::before {
    content: "";
    display: block;
    padding-top: 100%;
}
.team-overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.team-overlay-img-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}
.team-overlay-caption {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 14px 14px 12px;
    max-width: 90%;
    text-align: left;
    z-index: 2;
}
/* Bottom-left shadow/gradient for text clarity */
.team-overlay-caption::before {
    content: "";
    position: absolute;
    inset: -10px -10px -10px -10px;
    background: radial-gradient(120% 120% at 0% 100%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}
.team-overlay-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.team-overlay-title {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.team-overlay-more {
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 600;
}
.team-overlay-more-link {
    color: var(--color-primary);
    text-decoration: none;
}
.team-overlay-more-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

@media (max-width: 991px) {
    .team-overlay-section {
        padding: 50px 0;
    }
    .team-overlay-card {
        max-width: 420px;
    }
}
@media (max-width: 576px) {
    .team-overlay-section {
        padding: 40px 0;
    }
    .team-overlay-name {
        font-size: 1.1rem;
    }
    .team-overlay-title {
        font-size: 0.9rem;
    }
}
