/* ===== Team Section Reset & Styles ===== */
.team-section,
.team-section * {
    margin: 0;
    padding: 0;
    box-sizing: border-box !important;
}

.team-section {
    width: 100vw !important;
    max-width: none !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px clamp(20px, 4vw, 48px) !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    background: #ffffff !important;
    font-family: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
    overflow: hidden;
}

/* Title */
.team-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 16px !important;
    text-align: center !important;
    line-height: 1.2 !important;
    padding: 0 20px !important;
}

/* Tags */
.team-tags {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    margin: 0 auto 56px auto !important;
    background-color: rgba(255, 167, 167, 0.24) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    border: none !important;
}

.team-tag {
    color: #FF0000 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    border-right: 1px solid rgba(255, 0, 0, 0.3) !important;
    padding: 0 12px !important;
}

.team-tag:first-child {
    padding-left: 0 !important;
}

.team-tag:last-child {
    border-right: none !important;
    padding-right: 0 !important;
}

/* Content Layout */
.team-content {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(28px, 4vw, 56px) !important;
}

/* Carousel Images */
.team-carousel {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 560px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 14px !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.team-thumb {
    flex: 0 0 130px !important;
    width: 130px !important;
    align-self: flex-end !important;
    cursor: pointer !important;
}

#thumbPrev {
    order: 1 !important;
}

#thumbNext {
    order: 2 !important;
}

.team-thumb img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, opacity 0.35s ease !important;
}

.team-active {
    flex: 0 0 180px !important;
    width: 180px !important;
    order: 3 !important;
    position: relative !important;
    z-index: 2 !important;
    align-self: flex-end !important;
    cursor: pointer !important;
}

.team-active img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease, opacity 0.35s ease !important;
    animation: teamSlideIn 0.5s ease forwards !important;
}

@media (min-width: 901px) {
    .team-thumb,
    .team-active {
        transition: transform 0.35s ease !important;
    }

    .team-thumb:hover,
    .team-active:hover {
        z-index: 4 !important;
    }

    .team-thumb:hover img,
    .team-active:hover img {
        transform: scale(1.05) !important;
        filter: brightness(1.03) saturate(1.03) !important;
        box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16) !important;
        opacity: 1 !important;
    }

    .team-thumb:active img,
    .team-active:active img {
        transform: scale(0.99) !important;
        filter: blur(2px) brightness(1.01) !important;
        box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1) !important;
    }

    .team-click-blur-target {
        transform: scale(0.99) !important;
        filter: blur(3px) brightness(1.01) !important;
        box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1) !important;
    }
}

.team-active-ring {
    display: none !important;
}

/* Info Card */
.team-info {
    flex: 1 1 auto !important;
    max-width: 520px !important;
    min-width: 360px !important;
    background: #ffffff !important;
    padding: clamp(28px, 3vw, 44px) !important;
    animation: teamFadeIn 0.5s ease forwards !important;
}

.team-name {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
}

.team-role {
    color: #FF0000 !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-bottom: 16px !important;
}

.team-bio {
    color: #4b5563 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
    padding-bottom: 24px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Contact */
.team-contact {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 24px !important;
    width: 100% !important;
}

.team-contact-link,
.team-contact-email {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.team-contact-link {
    color: #FF0000 !important;
}

.team-contact-email {
    color: #FF0000 !important;
}

.team-contact-link:hover,
.team-contact-email:hover {
    color: #cc0000 !important;
}

/* Navigation */
.team-nav {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.team-nav-prev,
.team-nav-next {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    outline: none !important;
}

.team-nav-prev {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
}

.team-nav-prev:hover {
    background: #e5e7eb !important;
}

.team-nav-next {
    background: #FF0000 !important;
    color: #ffffff !important;
}

.team-nav-next:hover {
    background: #cc0000 !important;
}

/* Animations */
@keyframes teamSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

@keyframes teamFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .team-section {
        padding: 48px 0 !important;
        min-height: auto !important;
        align-items: stretch !important;
    }

    .team-title {
        font-size: 1.6rem !important;
        margin-bottom: 12px !important;
        padding: 0 16px !important;
        width: 100% !important;
    }

    .team-tags {
        display: inline-flex !important;
        width: auto !important;
        max-width: calc(100vw - 32px) !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 32px !important;
        padding: 6px 10px !important;
        background-color: #FFA7A73D !important;
        border-radius: 6px !important;
        flex-wrap: nowrap !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden !important;
    }

    .team-tag {
        font-size: 0.62rem !important;
        line-height: 1 !important;
        padding: 0 7px !important;
        white-space: nowrap !important;
    }

    .team-content {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .team-carousel {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 240px !important;
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        margin: 0 auto !important;
        gap: 2px !important;
    }

    .team-thumb,
    .team-thumb-prev,
    .team-thumb-next,
    #thumbPrev,
    #thumbNext {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        width: 80px !important;
        height: 240px !important;
        flex: none !important;
        overflow: hidden !important;
        z-index: 1 !important;
        border-radius: 20px !important;
        transition: all 0.4s ease !important;
        transform: none !important;
    }

    #thumbPrev {
        left: 16px !important;
    }

    #thumbNext {
        right: 16px !important;
    }

    .team-thumb img {
        width: 100% !important;
        height: 240px !important;
        border-radius: 20px !important;
        box-shadow: none !important;
        opacity: 0.5 !important;
        filter: blur(2px) brightness(0.9) !important;
        transform: none !important;
        pointer-events: none !important;
        object-fit: cover !important;
        object-position: center !important;
        transition: all 0.4s ease !important;
    }

    #thumbPrev img,
    #thumbNext img {
        transform: none !important;
    }

    .team-active {
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 3 !important;
        flex: none !important;
        width: 180px !important;
        max-width: 180px !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
        transition: all 0.4s ease !important;
    }

    .team-active img {
        width: 100% !important;
        height: 240px !important;
        display: block !important;
        border-radius: 20px !important;
        object-fit: cover !important;
        object-position: center !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18) !important;
        transition: all 0.4s ease !important;
    }

    .team-info {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        text-align: left !important;
        background: #ffffff !important;
        padding: 24px 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .team-name,
    .team-role,
    .team-bio,
    .team-contact,
    .team-nav {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .team-name {
        text-align: center !important;
        font-size: 1.4rem !important;
    }

    .team-role {
        text-align: center !important;
        display: block !important;
        font-size: 0.85rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    .team-bio {
        text-align: left !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    .team-contact {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .team-contact-link,
    .team-contact-email {
        font-size: 0.85rem !important;
    }

    .team-nav {
        justify-content: center !important;
        width: 100% !important;
    }
}
