/* ==========================================================================
   Info Esami — Premium modern layer
   Scroll progress, reveal animations, hero particles, FAQ easing
   ========================================================================== */

/* ---------- Scroll progress ---------------------------------------------- */
.ie-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ---------- Hero particles ----------------------------------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
}
.ie-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.ie-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.25;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
    animation: ie-particle-float 14s infinite linear;
}
@keyframes ie-particle-float {
    0% { transform: translateY(0) translateX(0); opacity: 0.15; }
    25% { opacity: 0.4; }
    50% { transform: translateY(-60px) translateX(25px); opacity: 0.25; }
    75% { opacity: 0.4; }
    100% { transform: translateY(0) translateX(0); opacity: 0.15; }
}

/* ---------- Reveal animations -------------------------------------------- */
.ie-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.ie-reveal.ie-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.ie-reveal.ie-delay-1 { transition-delay: 0.08s; }
.ie-reveal.ie-delay-2 { transition-delay: 0.16s; }
.ie-reveal.ie-delay-3 { transition-delay: 0.24s; }
.ie-reveal.ie-delay-4 { transition-delay: 0.32s; }
.ie-reveal.ie-delay-5 { transition-delay: 0.40s; }

/* ---------- Card & item hover -------------------------------------------- */
.section-card,
.exam-item,
.included-item,
.faq-item,
.step-list li {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease;
}
.section-card:hover,
.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -12px rgba(37, 99, 235, 0.18);
}
.exam-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px -10px rgba(37, 99, 235, 0.18);
    border-color: #93c5fd;
}
.included-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px rgba(16, 185, 129, 0.18);
}

/* ---------- FAQ smooth accordion ----------------------------------------- */
.faq-answer {
    display: block !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                padding 0.3s ease;
    padding: 0 20px;
}
.faq-item.active .faq-answer {
    max-height: 800px;
    opacity: 1;
    padding: 0 20px 16px;
}
.faq-toggle-icon,
.section-card-toggle {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- CTA pulse ----------------------------------------------------- */
.btn-cta {
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), 0 14px 36px -8px rgba(37, 99, 235, 0.45);
}
.btn-cta:active { transform: translateY(0); }

/* ---------- Step progress glow ------------------------------------------- */
.step-item.active .step-number {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18);
}
.step-item.completed .step-number {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.18);
}

/* Print neutral */
@media print {
    .ie-scroll-progress,
    .ie-hero-particles,
    .ie-particle { display: none !important; }
    .ie-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .faq-answer {
        display: block !important;
        grid-template-rows: none !important;
        opacity: 1 !important;
        overflow: visible !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ie-particle,
    .ie-reveal,
    .faq-answer,
    .section-card,
    .exam-item,
    .included-item,
    .faq-item,
    .step-list li {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
