/* Team Section */
.team.section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
}

/* Container with side margins */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* FIX: Add vertical spacing between rows */
.row {
    margin-left: -10px;
    margin-right: -10px;
    row-gap: 30px !important;
    /* This adds space between rows */
}

.row>[class*='col-'] {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 30px !important;
    /* Additional safety margin */
}

/* Member Card with proper spacing */
.member-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Remove individual card margins since we're using row-gap */
.member-card {
    margin: 0;
    /* Remove horizontal margins */
    width: 100%;
    /* Full width */
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.member-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    border-bottom: 3px solid #28a745;
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.member-card:hover .member-image {
    transform: scale(1.05);
}

/* Overlay Effect */
.member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(40, 167, 69, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-card:hover .member-overlay {
    opacity: 1;
}

.member-social .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: #28a745;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.member-social .social-icon:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
}

/* Member Info */
.member-info {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.member-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.member-designation {
    font-size: 1rem;
    font-weight: 500;
    color: #28a745 !important;
    margin-bottom: 12px;
}

.member-department,
.member-email {
    font-size: 0.9rem;
    line-height: 1.4;
}

.member-email a {
    color: #6c757d;
    transition: color 0.3s ease;
}

.member-email a:hover {
    color: #28a745;
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 15px;
    padding: 60px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
    max-width: 500px;
}

.empty-icon {
    color: #dee2e6;
}

.empty-title {
    color: #6c757d;
    font-weight: 500;
}

/* View All Button */
.btn-view-all {
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    border-width: 2px;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .member-image-wrapper {
        height: 220px;
    }

    .container {
        max-width: 960px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
        row-gap: 25px !important;
    }

    .row>[class*='col-'] {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 25px !important;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .row {
        row-gap: 20px !important;
    }

    .row>[class*='col-'] {
        margin-bottom: 20px !important;
    }

    .member-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .team.section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .row {
        margin-left: -6px;
        margin-right: -6px;
        row-gap: 20px !important;
    }

    .row>[class*='col-'] {
        padding-left: 6px;
        padding-right: 6px;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .row {
        margin-left: -5px;
        margin-right: -5px;
        row-gap: 20px !important;
    }

    .row>[class*='col-'] {
        padding-left: 5px;
        padding-right: 5px;
        margin-bottom: 20px !important;
    }

    .member-card {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Animation Delay Classes */
[data-aos-delay="100"] {
    transition-delay: 100ms;
}

[data-aos-delay="200"] {
    transition-delay: 200ms;
}

[data-aos-delay="300"] {
    transition-delay: 300ms;
}

[data-aos-delay="400"] {
    transition-delay: 400ms;
}

/* Ensure all cards have same height */
.row>.d-flex {
    display: flex !important;
}

.member-card {
    flex: 1 0 auto;
}