/* --- Base Card Styles (Applies to both Grid and Carousel) --- */
/* Forces the slider track to line items up horizontally */
.mlf-team-carousel .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    /* Optional: prevents items from stretching to unequal heights */
    align-items: stretch; 
}

/* Ensures the items don't try to shrink */
.mlf-team-carousel .swiper-slide {
    flex-shrink: 0;
}

.slider-wrapper {
  display: flex;
  /* Prevents items from wrapping to the next line */
  flex-wrap: nowrap; 
  /* Hides the overflow so you only see the 3 items */
  overflow-x: hidden; 
}

.slider-item {
  /* flex-grow: 0, flex-shrink: 0, flex-basis: 33.33% */
  flex: 0 0 33.33%; 
  /* Optional: Add a little padding so they don't touch */
  padding: 0 10px; 
  box-sizing: border-box;
}

.mlf-team-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px;
}

.mlf-team-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.mlf-team-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.mlf-team-content {
    padding: 20px;
}

.mlf-team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1b4f3f; /* Your brand green */
    margin: 0 0 5px 0;
}

.mlf-team-designation {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.mlf-team-intro {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.mlf-team-socials a {
    display: inline-block;
    margin: 0 5px;
    color: #1b4f3f;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.mlf-team-socials a:hover {
    text-decoration: underline;
}

/* --- Grid Specific Styles --- */
.mlf-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* --- Carousel Specific Styles --- */
.mlf-team-carousel {
    padding-bottom: 50px; /* Make room for pagination dots */
    overflow: hidden; /* Important for Swiper */
}

.mlf-team-carousel .swiper-pagination-bullet-active {
    background: #1b4f3f; /* Brand color for active dot */
}


/* 1. Truncate text ONLY on the carousel layout */
.mlf-team-carousel .mlf-team-intro {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2. Position Arrows Bottom Center */
.mlf-team-carousel {
    padding-bottom: 60px; /* Make room for arrows */
    position: relative;
}
.mlf-swiper-nav {
    display: flex;
    justify-content: center;
    gap: 30px; /* Space between arrows */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}
/* Override default Swiper absolute positioning for the arrows */
.mlf-swiper-nav .swiper-button-prev,
.mlf-swiper-nav .swiper-button-next {
    position: static;
    margin: 0;
}

/* 3. Popup / Modal Styling */
.mlf-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.mlf-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.mlf-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}
.mlf-modal-content {
    position: relative;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px; /* Adjust as needed */
    width: 90%;
    z-index: 10000;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}
.mlf-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}
.mlf-modal-body img {
    max-width: 150px;
    border-radius: 50%;
    margin-bottom: 15px;
}