// Carrossel de depoimentos com efeito coverflow. function TestimonialCarousel() { const TOTAL = 15; const [active, setActive] = React.useState(0); // Armazena { w, h } natural de cada imagem após carregamento const [sizes, setSizes] = React.useState({}); const images = Array.from({ length: TOTAL }, (_, i) => `../../assets/depoimentos/${i + 1}.jpg`); const go = (dir) => setActive(a => (a + dir + TOTAL) % TOTAL); const offsetOf = (i) => { let off = ((i - active) % TOTAL + TOTAL) % TOTAL; if (off > TOTAL / 2) off -= TOTAL; return off; }; // Largura base por posição const baseW = (abs) => abs === 0 ? 500 : abs === 1 ? 310 : 240; // Dimensões reais usando o aspect ratio natural da imagem const dimsOf = (i, abs) => { const w = baseW(abs); const s = sizes[i]; if (!s) return { width: w, height: Math.round(w * 0.9) }; // fallback até carregar return { width: w, height: Math.round(w * s.h / s.w) }; }; const styleOf = (offset, i) => { const abs = Math.abs(offset); const sign = offset < 0 ? -1 : 1; const { width, height } = dimsOf(i, Math.min(abs, 2)); if (abs === 0) return { opacity: 1, width, height, tx: 0, z: 10, shadow: true }; if (abs === 1) return { opacity: 0.8, width, height, tx: sign * 455, z: 7, shadow: false }; return { opacity: 0, width, height, tx: sign * 680, z: 1, shadow: false }; }; // Altura do container acompanha a imagem central carregada const cs = sizes[active]; const containerH = cs ? Math.round(500 * cs.h / cs.w) + 40 : 480; return (
{t('A SBL administra todo o processo — da divulgação ao repasse — para que você só precise acompanhar os resultados.')}
{t('Existem três formas de anunciar. Cada uma tem um perfil diferente de segurança e rentabilidade — a escolha certa depende do seu objetivo.')}
{t('Experiências reais de quem já se hospedou em imóveis gerenciados pela SBL em João Pessoa.')}
{t('A SBL cobra apenas sobre o que você recebe — sem mensalidades fixas, sem taxas de adesão.')}