<style>
#rec2261941691 .t396__artboard {
overflow: hidden !important;
}

#rec2261941691 .team-card {
transition: transform 0.45s ease;
will-change: transform;
}

#rec2261941691 .team-prev,
#rec2261941691 .team-next {
cursor: pointer;
transition: opacity 0.25s ease;
}

#rec2261941691 .team-disabled {
opacity: 0.35 !important;
pointer-events: none !important;
}
</style>

<script>
(function () {
function initTeamSlider() {
const rec = document.querySelector('#rec2261941691');
if (!rec) return;

const cards = Array.from(rec.querySelectorAll('.team-card'));
const prevBtn = rec.querySelector('.team-prev');
const nextBtn = rec.querySelector('.team-next');

if (!cards.length || !prevBtn || !nextBtn) return;

let currentIndex = 0;

function getVisibleCount() {
return window.innerWidth <= 640 ? 1 : 3;
}

function getStep() {
if (cards.length < 2) return cards[0].getBoundingClientRect().width;
const first = cards[0].getBoundingClientRect();
const second = cards[1].getBoundingClientRect();
return second.left - first.left;
}

function updateSlider() {
const visibleCount = getVisibleCount();
const maxIndex = cards.length - visibleCount;
const step = getStep();

if (currentIndex < 0) currentIndex = 0;
if (currentIndex > maxIndex) currentIndex = maxIndex;

cards.forEach(function(card) {
card.style.transform = 'translateX(' + (-currentIndex * step) + 'px)';
});

prevBtn.classList.toggle('team-disabled', currentIndex === 0);
nextBtn.classList.toggle('team-disabled', currentIndex >= maxIndex);
}

prevBtn.addEventListener('click', function(e) {
e.preventDefault();
currentIndex--;
updateSlider();
});

nextBtn.addEventListener('click', function(e) {
e.preventDefault();
currentIndex++;
updateSlider();
});

window.addEventListener('resize', function() {
updateSlider();
});

updateSlider();
}

document.addEventListener('DOMContentLoaded', initTeamSlider);
window.addEventListener('load', initTeamSlider);
setTimeout(initTeamSlider, 800);
})();
</script>