/* Team Section Base */
.team-modern {
    padding: 80px 0;
    background-color: var(--light-bg, #f8f9fa);
    position: relative;
    overflow: hidden;
}

/* Section Title Styling */
.team-modern .section-title {
    margin-bottom: 50px;
}

.team-modern .section-title .subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary-color, #1d60ec);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.team-modern .section-title h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #2d3748;
    position: relative;
    display: inline-block;
}

.team-modern .section-title h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background: var(--primary-color, #4361ee);
    border-radius: 2px;
}

.team-modern .section-title .section-description {
    max-width: 750px;
    margin: 25px auto 0;
    font-size: 16px;
    color: #6c757d;
    line-height: 1.5;
}

/* Featured Cards Layout */
.team-cards-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 40px;
}

/* Card Base Styling - Reduced Sizes */
.team-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Standard Card Sizing - Reduced */
.side-card {
    max-width: 260px;
    width: 100%;
}

/* Featured (Middle) Card Sizing - Reduced but still larger */
.featured-card {
    max-width: 320px;
    width: 100%;
    margin-top: -20px;
    margin-bottom: -20px;
    z-index: 2;
}

.featured-card .team-card {
    border: 2px solid var(--primary-color, #1d60ec);
    box-shadow: 0 12px 30px rgba(29, 96, 236, 0.15);
}

/* Team Image Container */
.team-image {
    position: relative;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    transition: transform 0.5s ease;
    height: auto;
    object-fit: cover;
}

/* Reduced image heights */
.side-card .team-image img {
    height: 220px;
}

.featured-card .team-image img {
    height: 280px;
}

.team-card:hover .team-image img {
    transform: scale(1.05);
}

/* Social Icons Styling - Smaller size */
.team-social {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.3s ease;
}

.team-card:hover .team-social {
    opacity: 1;
    transform: translateX(0);
}

.team-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Smaller */
    height: 32px; /* Smaller */
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: var(--primary-color, #1d60ec);
    font-size: 14px; /* Smaller */
    transition: all 0.3s ease;
}

.team-social a:hover {
    background-color: var(--primary-color, #1d60ec);
    color: #fff;
    transform: scale(1.1);
}

/* Content Styling - Reduced padding */
.team-content {
    padding: 18px;
    text-align: center;
}

.featured-card .team-content {
    padding: 22px;
}

/* Smaller text sizes */
.team-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #2d3748;
}

.featured-card .team-content h4 {
    font-size: 22px;
    margin-bottom: 5px;
}

.team-content .position {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--primary-color, #1d60ec);
    font-weight: 600;
}

.featured-card .team-content .position {
    font-size: 14px;
    margin-bottom: 12px;
}

.team-content .team-bio {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
}

.featured-card .team-content .team-bio {
    font-size: 13px;
}

/* Secondary Team Members Row */
.team-modern .row {
    margin-top: 40px;
    gap: 20px;
}

.team-modern .row .team-card {
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .team-cards-wrapper {
        gap: 15px;
    }

    .side-card {
        max-width: 240px;
    }

    .featured-card {
        max-width: 300px;
    }
}

@media (max-width: 991px) {
    .team-modern {
        padding: 60px 0;
    }

    .team-modern .section-title h2 {
        font-size: 32px;
    }

    .team-cards-wrapper {
        flex-direction: column;
        gap: 25px;
    }

    .side-card,
    .featured-card {
        max-width: 320px; /* More consistent size on tablet */
        margin-top: 0;
        margin-bottom: 0;
    }

    .side-card .team-image img,
    .featured-card .team-image img {
        height: 280px;
    }

    /* Adjust spacing for stacked layout */
    .team-modern .row {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .team-modern {
        padding: 50px 0;
    }

    .team-modern .section-title {
        margin-bottom: 40px;
    }

    .team-modern .section-title h2 {
        font-size: 28px;
    }

    .team-modern .section-title .section-description {
        font-size: 15px;
    }

    .side-card,
    .featured-card {
        max-width: 280px; /* Smaller on mobile */
    }

    .side-card .team-image img,
    .featured-card .team-image img {
        height: 240px;
    }
}

@media (max-width: 576px) {
    .team-modern .section-title h2 {
        font-size: 26px;
    }

    .side-card,
    .featured-card {
        max-width: 100%; /* Full width on very small screens */
    }

    .team-content h4 {
        font-size: 17px;
    }

    .featured-card .team-content h4 {
        font-size: 20px;
    }

    .team-content .position {
        font-size: 12px;
    }

    .featured-card .team-content .position {
        font-size: 13px;
    }

    .team-content .team-bio {
        font-size: 12px;
    }

    /* Adjust bottom row spacing */
    .team-modern .row [class*="col-"] {
        padding: 0 8px;
    }
}
