/* Custom CSS */

/* Smooth Reveal Animation Class */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Utilities if needed */
.text-stroke {
    -webkit-text-stroke: 1px currentColor;
    color: transparent;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    opacity: 0;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out both;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    opacity: 0;
}

/* Timeline Point Animations */
.timeline-point.active {
    background-color: #6EC1E4 !important;
    /* bg-primary */
    border-color: #6EC1E4 !important;
    /* blend border */
    transform: translateX(-0.5rem) scale(1.5) !important;
    /* -translate-x-2 is -0.5rem. We keep it and add scale */
    animation: pulse-blue 2s ease-out 1;
}

@media (min-width: 768px) {
    .timeline-point.active {
        transform: translateX(-0.5rem) scale(1.5) !important;
        /* md:-translate-x-2 is also -0.5rem */
    }
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(110, 193, 228, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(110, 193, 228, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(110, 193, 228, 0);
    }
}

/* Timeline Content Visibility */
.timeline-content.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Nascondere widget testuale extra di Iubenda (già presente icona) */
.iub__us-widget {
    display: none !important;
}

/* =========================================
   Accessibilità WCAG 2.2
   ========================================= */

/* Touch Targets — minimo 44x44px per link icona nel footer (WCAG 2.2) */
footer a[aria-label="LinkedIn"],
footer a[aria-label="Instagram"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

/* Focus Visible — outline globale per navigazione da tastiera */
*:focus-visible {
    outline: 2px solid #6EC1E4;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
details > summary:focus-visible {
    outline: 2px solid #6EC1E4;
    outline-offset: 3px;
}

/* Rimuove outline da bottoni interattivi mobile (evita bordo blu persistente al tap) */
#mobile-menu-toggle:focus-visible,
a[aria-label="Chatta su WhatsApp"]:focus-visible {
    outline: none;
}

/* Prefers Reduced Motion — disabilita animazioni per chi lo richiede */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .animate-fade-in-up,
    .animate-fade-in-down {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}