/* MINIMAL PhD SCHOLARS BOX SIZE FIX - SAFE VERSION */

/* Make all PhD scholar columns equal height */
.phd-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.phd-section .col-lg-3,
.phd-section .col-md-6 {
    display: flex !important;
    margin-bottom: 30px !important;
}

/* Make team-item containers equal height */
.phd-section .team-item {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
}

/* Fixed height for image section */
.phd-section .team-item .overflow-hidden.position-relative {
    height: 280px !important;
    flex-shrink: 0 !important;
}

.phd-section .team-item .img-fluid {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
}

/* Flexible height for text content to fill remaining space */
.phd-section .team-item .text-center.border {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 200px !important;
}

/* Ensure text content flows properly within the fixed area */
.phd-section .team-item .text-center.border h5 {
    margin-bottom: 8px !important;
}

.phd-section .team-item .text-center.border small {
    margin-bottom: 12px !important;
    display: block !important;
}

.phd-section .team-item .text-center.border p {
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    font-size: 0.9rem !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .phd-section .team-item .overflow-hidden.position-relative {
        height: 250px !important;
    }
    
    .phd-section .team-item .text-center.border {
        min-height: 180px !important;
    }
}

@media (max-width: 767.98px) {
    .phd-section .team-item .overflow-hidden.position-relative {
        height: 300px !important;
    }
    
    .phd-section .team-item .text-center.border {
        min-height: 160px !important;
    }
}
