.mainContent {
    background: white;
    padding-top: 2vh;
    padding-bottom: 12vh;
    min-height: 80vh;
}

/* ---------------- Team Logo ---------------- */

/* Style for "Team" */
#team {
    margin: 0;
    color: #1a1a2e;
    font-size: clamp(40px, 5vw, 70px);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

#team::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
}

.lead {
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------------- Section Headers ---------------- */
.section-header {
    text-align: center;
    margin: 60px 0 40px 0;
    padding: 0 20px;
    width: 100%; /* Force full width */
    flex-basis: 100%; /* In flexbox, take full row */
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 42px);
    color: #1a1a2e;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.section-header .section-line {
    width: 60px;
    height: 3px;
    margin: 0 auto 10px auto;
    border-radius: 2px;
}

.section-header p {
    color: #666;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* First section has less top margin */
.section-header:first-of-type {
    margin-top: 20px;
}

/* Section header carousel slides (mobile only) */
.carousel-item .section-header {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding: 40px 20px;
}

.carousel-item .section-header h2 {
    margin-bottom: 15px;
}

.carousel-item .section-header .section-line {
    margin-bottom: 15px;
}

/* Ensure section headers don't get card shadows in carousel */
.carousel-item:has(.section-header) {
    background: transparent;
    box-shadow: none;
}

/* ---------------- Desktop Team Grid ---------------- */
.desktop-grid {
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
    margin-top: 50px;
    margin: 50px auto 0 auto;
    max-width: 1400px;
    padding: 0 30px;
}

/* ---------------- Carousel Wrapper ---------------- */
.teamCarouselWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3vh auto 0 auto;
    margin-left: -15vw;
    width: 130%;
}

/* ---------------- Carousel ---------------- */
#teamCarousel {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}
.carousel-item {
    padding: 20px 0;
}
.cards-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
/* Previous and next arrow buttons */
.carousel-control-prev,
.carousel-control-next {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 40px;
}
.carousel-control-next {
    right: 40px;
}
/* Arrow image styling */
.carousel-arrow {
    width: 30px;
    height: 40px;
    display: block;
    filter: brightness(0) saturate(100%) invert(20%) sepia(60%) saturate(2000%)
        hue-rotate(200deg) brightness(85%) contrast(95%);
}

/* ---------------- Team Cards ---------------- */
/* Individual team member card styling */
.team-card {
    display: flex;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    margin: 0 auto;
    width: 15vw;
    height: 40vh;
    position: relative;
    min-width: 240px;
    min-height: 320px;
    max-height: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

.team-card:active {
    transform: translateY(-5px);
}

.gradient-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(26, 26, 46, 0.9) 0%,
        rgba(26, 26, 46, 0.6) 50%,
        transparent 100%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.team-card:hover .gradient-divider {
    opacity: 0.8;
}

.team-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

/* Text overlay at bottom of card */
.text-section {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.4rem 1rem 1.5rem 1rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    white-space: pre-line;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
}

.text-section2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    white-space: pre-line;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* ---------------- Pop-ups ---------------- */
/* Hidden by default, shown when card is clicked */
.pop-up {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2d3748;
    z-index: 20;
    border-radius: 16px;
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    overflow: auto;
    color: white;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pop-up p {
    line-height: 1.6;
    margin: 0;
}

/* Close button for pop-ups */
.pop-up .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.2);
    line-height: 0;
}

.pop-up .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Button to view all team members */
.viewButtonWrapper {
    margin-top: 50px;
    text-align: center;
}

.viewButton {
    background: #2d3748;
    border-radius: 50px;
    color: white;
    padding: 14px 40px;
    border: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.viewButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.4);
}

.viewButton:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

/* ---------------- No Team Message ---------------- */
.no-team-message {
    text-align: center;
    padding: 80px 30px;
    color: #666;
    font-size: 1.3rem;
    background: #f8f9fa;
    border-radius: 16px;
    margin: 20px;
}

.no-team-message p {
    margin: 15px 0;
    padding-bottom: 5vh;
}

.no-team-message p:first-child {
    font-weight: 700;
    font-size: 1.8rem;
    color: #1a1a2e;
    padding-bottom: 0;
}

/* ---------------- Responsive Adjustments ---------------- */
@media (max-width: 768px) {
    #team {
        font-size: clamp(32px, 14vw, 60px);
    }

    .lead {
        font-size: 1rem;
        padding: 0 20px;
    }

    .team-card {
        width: 85vw !important; /* Change this - controls the card width as % of screen */
        max-width: 240px !important; /* Change this - sets absolute maximum width */
        min-width: 240px;
    }

    .viewButton {
        padding: 12px 32px;
        font-size: 1rem;
    }

    #teamCarousel {
        padding: 0 20px;
    }

    .carousel-item {
        padding: 20px 5px;
    }

    .section-header {
        margin: 40px 0 30px 0;
    }
    
    .section-header h2 {
        font-size: clamp(24px, 6vw, 36px);
    }
}

/* Make the navbar dropdown overlay on mobile (alumni page only) */
@media (max-width: 767px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #212529; /* Match the navbar bg-dark color */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        z-index: 1029;
        padding-left: 1rem; /* Match container padding */
        padding-right: 1rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .navbar-collapse.collapsing,
    .navbar-collapse.show {
        background-color: #212529;
    }
}