* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #e7e0d8;
    color: #0F122A;
}

/* ============================
       SECTION
       =============================*/
.teams-section {
    padding: 90px 20px;
    background: #e7e0d8;
}

.teams-container {
    max-width: 1500px;
    margin: 0 auto;
}

.teams-header {
    text-align: center;
    margin-bottom: 70px;
}

.teams-header h2 {
    font-size: 3rem;
    font-weight: 700;
}

.teams-header p {
    max-width: 700px;
    margin: 10px auto 0;
    font-size: 1.1rem;
    color: #444;
}

/* ============================
          GRID – 5 Columns Desktop
       =============================*/
.teams-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

@media (max-width: 1300px) {
    .teams-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================
          TEAM CARD – Full Background Image
       =============================*/
.team-card {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: 0.35s ease;
    background-size: cover !important;
    background-position: center !important;
}

a {
    text-decoration: none;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Black overlay for readability */
.team-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

/* Text content */
.team-content {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    color: #e7e0d8;
}

.team-name {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.team-description {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

.learn-more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 22px;
    border-radius: 30px;
    border: 2px solid #e7e0d8;
    background: transparent;
    color: #e7e0d8;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s ease;
}

.learn-more-btn:hover {
    background: #e7e0d8;
    color: #000;
    transform: translateX(5px);
}

/* ============================
       TEAM IMAGES
       =============================*/
.team-card:nth-child(1) {
    background-image: url('../media/expand.PNG');
}

.team-card:nth-child(2) {
    background-image: url('../media/beyond.PNG');
}

.team-card:nth-child(3) {
    background-image: url('../media/educational.PNG');
}

.team-card:nth-child(4) {
    background-image: url('../media/community.PNG');
}

.team-card:nth-child(5) {
    background-image: url('../media/creativity.PNG');
}

/* ============================
       MODAL POPUP WITH SLIDESHOW
       =============================*/
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #e7e0d8;
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    animation: pop 0.3s ease;
    text-align: center;
}

@keyframes pop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #6C7A89; /* match .popup-box h2 color in home.css */
}

/* SLIDESHOW CONTAINER */
.modal-slideshow {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    background:  #e7e0d8;
}

.modal-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.modal-slide.active {
    opacity: 1;
}

.modal-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal p {
    font-size: 1rem;
    color: #0A1B3D; /* match popup text color */
    line-height: 1.6;
    text-align: left;
    margin-bottom: 25px;
}

.close-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: #6C7A89; /* match .close-popup in home.css */
    color: #ffffff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #0A1B3D; /* match popup hover */
    transform: scale(1.05);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal {
        max-width: 90%;
        padding: 25px;
    }
    
    .modal-slideshow {
        height: 250px;
    }
    
    .modal h3 {
        font-size: 1.5rem;
    }
    
    .modal p {
        font-size: 0.95rem;
    }
}
