Dialoghi di diritto e giurisprudenza: l’IA su misura per il tuo studio legale.
/* Hide the manual line break by default */ .mobile-break { display: none; } /* Responsive adjustments for mobile */ @media (max-width: 768px) { .mobile-break { display: block; } h1 { font-size: 2.3rem !important; } #animated-text { width: 180px !important; } p { font-size: 75% !important; } } @media (max-width: 480px) { h1 { font-size: 1.8rem !important; } #animated-text { width: 140px !important; } } @media (max-width: 360px) { h1 { font-size: 1.6rem !important; } #animated-text { width: 120px !important; } } document.addEventListener("DOMContentLoaded", function () { const phrases = [ "il mondo legal.", "gli Avvocati.", "lo Studio Legale.", "la professione forense.", "il mondo legal." // repeat to mark cycle end ]; const animatedText = document.getElementById("animated-text"); const fadeDuration = 3000; // 3s fade-out, 3s fade-in let holdDelay = 1000; // hold before starting fade let index = 0; let cycle = 1; // total cycles (2 cycles for guests) function nextTransition(currentHold) { setTimeout(() => { // Fade out completely animatedText.style.opacity = "0"; setTimeout(() => { // Switch to next phrase index = (index + 1) % phrases.length; animatedText.innerHTML = phrases[index]; // Fade in completely animatedText.style.opacity = "1"; setTimeout(() => { // If we loop back to start, one cycle is complete if (index === 0) { if (cycle === 1) { cycle = 2; currentHold = 1500; // slightly longer hold for second cycle } else { return; // End after second cycle } } nextTransition(currentHold); }, fadeDuration); }, fadeDuration); }, currentHold); } // Start the animation sequence nextTransition(holdDelay); });