/* ============================================
   SEMPLICEMENTE730 — Foglio di stile personalizzato
   Complementare a Tailwind CSS
   ============================================ */

/* === VARIABILI CSS PERSONALIZZATE === */
:root {
    --primary-800: #1e3a8a;
    --primary-700: #1d4ed8;
    --primary-500: #3b82f6;
    --accent-500: #10b981;
    --accent-600: #059669;
    --transition-base: 0.3s ease;
}

/* === RESET E BASE === */
html {
    scroll-padding-top: 80px;
}

::selection {
    background-color: rgba(30, 58, 138, 0.15);
    color: #1e293b;
}

/* === SCROLL REVEAL ANIMATIONS === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Ritardo sequenziale per elementi in griglia */
.scroll-reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal-delay-2 { transition-delay: 0.2s; }
.scroll-reveal-delay-3 { transition-delay: 0.3s; }
.scroll-reveal-delay-4 { transition-delay: 0.4s; }

/* === HERO SECTION === */
@keyframes heroGlow {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.15; }
}

#hero .absolute.inset-0.opacity-10 > div {
    animation: heroGlow 6s ease-in-out infinite;
}

/* Hero text entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#hero p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#hero .flex.flex-col.sm\:flex-row {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

#hero .flex.flex-wrap {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* === NAVBAR === */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* === FEATURE CARDS (Sezione Perché sceglierci) === */
#perche-sceglierci .group:hover {
    transform: translateY(-4px);
}

#perche-sceglierci .group {
    transition: all 0.3s ease;
}

/* === COME FUNZIONA — Connessioni tra passi === */
#come-funziona .relative::after {
    content: '';
}

/* === FAQ ACCORDION ANIMAZIONI === */
.faq-content {
    transition: max-height 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.faq-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: #93c5fd;
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* === PRICING CARD (Acquisto diretto) === */
#acquista .bg-gradient-to-br {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#acquista .bg-gradient-to-br:hover {
    transform: translateY(-4px);
}

/* === FORM CONTATTO === */
#contact-form input:focus,
#contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#contact-form .success-message {
    animation: fadeInUp 0.4s ease-out;
}

/* === PULSANTI — Effetti aggiuntivi === */
a[class*="rounded-full"],
button[class*="rounded-full"] {
    transition: all 0.3s ease;
}

/* Pulse effect per CTA principali */
@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

#hero a.bg-accent-500 {
    animation: subtlePulse 3s ease-in-out infinite;
}

#hero a.bg-accent-500:hover {
    animation: none;
}

/* === BADGE TRUST === */
#hero .bg-white\/10 {
    transition: background-color 0.3s ease;
}

#hero .bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* === UTILITY: Gradiente testo === */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-800), var(--accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === SCROLLBAR PERSONALIZZATA === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* === MOBILE RESPONSIVE FIXES === */
@media (max-width: 640px) {
    /* Hero più compatto su mobile */
    #hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    /* Trust badges impilati su mobile */
    #hero .flex.flex-wrap {
        flex-direction: column;
    }

    /* Sezioni con padding ridotto */
    section {
        overflow-x: hidden;
    }

    /* Font ridotti leggermente */
    h1 { font-size: 2rem !important; }
}

@media (max-width: 1024px) {
    /* Frecce connessione nascote su tablet */
    .hidden.lg\:block {
        display: none;
    }
}

/* === ACCESSIBILITÀ === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Focus visible per accessibilità tastiera */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === PRINT STYLES === */
@media print {
    nav, #mobile-menu, .animate-bounce, #cta-finale, #contatti form {
        display: none !important;
    }

    section {
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
