.team-section {
    background-color: #1a4d45;
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 40px;
    min-height: 500px;
}


.team-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 0.6fr 1.6fr;
    gap: 60px;
    height: 100%;
    flex: 1;
}


.team-left-col {
    position: relative;
    padding-right: 20px;
    z-index: 10;
    align-self: center;
    margin-top: 0;
    padding-bottom: 30px;
}

.team-subtitle {
    color: #eab465;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.team-title {
    font-family: 'Istok Web', serif;
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
}

.team-desc-box {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.05rem;
}

.team-desc-box h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 700;
    font-family: 'Istok Web', serif;
}

.team-desc-box p {
    margin-bottom: 20px;
}


.team-slider-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    cursor: grab;
    display: flex;
    align-items: flex-end;
    align-self: end;
    padding-bottom: 0;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -ms-overflow-style: none; scrollbar-width: none;
    scroll-behavior: auto !important;
    user-select: none;
    -webkit-user-select: none;
}

.team-slider-viewport::-webkit-scrollbar {
    display: none;
}

.team-slider-viewport.active {
    cursor: grabbing;
}

.team-track {
    display: inline-flex;
    gap: 0;
    align-items: flex-end;
    padding-bottom: 0;
    animation: none !important;
    transform: none !important;
}


.team-dots-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
}

.team-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.team-dot.active {
    background-color: #eab465;
    transform: scale(1.3);
}

.team-dot:hover {
    background-color: rgba(234, 180, 101, 0.6);
}


.team-card-wrapper {
    padding-right: 60px;
    display: inline-flex;
    align-items: flex-end;
}

.team-card {
    width: 720px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
    background: transparent !important;
    border: none;
    padding: 0;
    position: relative;
    cursor: pointer;
    transition: none !important;
    transform: none !important;
}

.team-card:hover {
    opacity: 1 !important;
    transform: none !important;
    background: transparent !important;
}

.team-card::before,
.team-card::after {
    display: none !important;
}


.team-img-wrapper {
    width: 340px;
    height: 450px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: transparent;
    position: relative;
    pointer-events: none;
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: none !important;
    transition: none !important;
}

.team-card:hover .team-img {
    filter: none !important;
}


.team-info {
    flex: 1;
    text-align: left;
    padding-bottom: 0;
    transform: translateY(-120px);
    white-space: normal;
    pointer-events: none;
}

.team-name {
    font-family: 'Istok Web',
    serif; font-size: 2rem;
    font-weight: 700; color: white;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.team-pos {
    color: #eab465;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(234, 180, 101, 0.3); padding-bottom: 15px;
}

.team-bio-short {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.read-more-link {
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    opacity: 0.7;
    transition: none !important;
}

.team-card:hover .read-more-link {
    color: white !important;
    opacity: 0.7 !important;
}


.bio-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bio-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bio-modal-content {
    background: rgba(26, 77, 69, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 20px;
    padding: 50px;
    position: relative;
    overflow-y: auto;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    transform: scale(0.95); /* Sedikit zoom out saat hidden */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    pointer-events: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.bio-modal-overlay.active .bio-modal-content {
    transform: scale(1);
}

.bio-modal-content::-webkit-scrollbar {
    width: 8px;
}

.bio-modal-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    z-index: 100;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-name { font-family: 'Istok Web', serif;
    font-size: 2.5rem;
    color: white;
    margin: 0 0 10px 0;
    }

.modal-pos {
    color: #eab465;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-bottom: 30px;
}

.modal-bio-text {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.1rem;
}


@media (max-width: 1024px) {

    .team-section {
        min-height: auto;
        padding: 60px 0 40px 0;
    }

    .team-container {
        display: block;
        width: 100%;
        padding: 0;
        overflow: hidden;
    }

    .team-left-col {
        padding: 0 20px 30px 20px;
        text-align: center;
    }

    .team-title {
        font-size: 2.4rem;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .team-desc-box {
        font-size: 1rem;
        line-height: 1.7;
    }


    .team-slider-viewport {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;

        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;

        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .team-slider-viewport::-webkit-scrollbar {
        display: none;
    }

    .team-track {
        display: flex;
        gap: 0;
        width: max-content;
        padding: 0;
    }

    .team-card-wrapper {
        padding: 0;
    }

    .team-card {
        width: 100vw;
        min-width: 100vw;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        padding: 0 20px;
        box-sizing: border-box;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .team-img-wrapper {
        width: 100%;
        max-width: 260px;
        aspect-ratio: 3 / 4;
        height: auto;
        border-radius: 12px;
        overflow: hidden;
        margin: 0 auto;
        box-shadow: none !important;
        border: none !important;
    }

    .team-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .team-info {
        width: 100%;
        max-width: 300px;
        transform: none;
        padding-bottom: 0;
        pointer-events: auto;
        margin: 0 auto;
    }

    .team-name {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    .team-pos {
        font-size: 0.85rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
        display: block;
        margin-left: auto; margin-right: auto;
        border-bottom: 1px solid rgba(234, 180, 101, 0.5);
        width: max-content;
    }

    .team-bio-short {
        font-size: 0.9rem;
        line-height: 1.5;
        -webkit-line-clamp: 5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #cccccc;
        margin-bottom: 15px;
    }

    .team-dots-wrapper {
        bottom: 20px;
    }

    .bio-modal-content {
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        width: 90%;
        max-height: 80vh;
        text-align: left;
    }
    .bio-modal-content .modal-pos {
         margin-left: 0;
    }
}

@media (min-width: 1025px) {

    .team-container {

        display: grid !important;
        grid-template-columns: 0.6fr 1.6fr !important;
        min-width: 0 !important;
    }

    .team-container > * {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .team-slider-viewport {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Safari Mac Bug Fix */
    @supports (-webkit-appearance: none) and (not (overflow: -webkit-marquee)) and (not (-ms-ime-align: auto)) {
        .team-section {
            min-height: 500px !important;
        }
    }
}