/* CSS personalizzato per index2.html - Design moderno e animazioni */

/* Reset e base styles per assicurare compatibilità */
* {
    box-sizing: border-box;
}

/* HERO SECTION FIX - Regole con massima priorità */
.gradient-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: 500px !important;
    padding: 4rem 1.5rem !important;
    color: #ffffff !important;
}

/* Assicura che tutti gli elementi della hero siano visibili */
.gradient-hero,
.gradient-hero *,
.gradient-hero .container,
.gradient-hero .max-w-4xl,
.gradient-hero h1,
.gradient-hero p,
.gradient-hero div,
.gradient-hero span,
.gradient-hero svg {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    color: #ffffff !important;
}

/* Fix specifico per flex containers nella hero */
.gradient-hero .flex {
    display: flex !important;
}

/* Fix per SVG icons */
.gradient-hero svg {
    color: #86efac !important;
    fill: currentColor !important;
    display: inline-block !important;
}

/* Assicura che tutti gli altri elementi siano visibili di default */
section, div, h1, h2, h3, p, button {
    opacity: 1 !important;
    visibility: visible !important;
}

.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Classi di animazione */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 1; /* Assicura che l'elemento sia sempre visibile */
}

/* Fix per testo hero - assicura visibilità del testo con regole specifiche */
.hero-text {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
    z-index: 10 !important;
    position: relative !important;
}

.hero-subtitle {
    color: #ffffff !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    display: block !important;
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
    z-index: 10 !important;
    position: relative !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Fix per animazione pulse personalizzata */
.animate-pulse-custom {
    animation: pulse 3s infinite !important;
}

/* Fix specifico per i checkbox nella hero - li nascondiamo se non dovrebbero essere lì */
.gradient-hero input[type="checkbox"] {
    display: none !important;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-bounce-slow {
    animation: bounce 2s infinite;
}

.animate-pulse-slow {
    animation: pulse 3s infinite;
}

/* Delay per animazioni sequenziali */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Effetti hover migliorati */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Bottoni moderni */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Form styling migliorato */
.form-input-modern {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input-modern:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* Card con effetti */
.card-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Icone animate */
.icon-bounce:hover {
    animation: bounce 1s;
}

/* Testimonial styling */
.testimonial-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Progress steps */
.step-circle {
    transition: all 0.3s ease;
}

.step-circle.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animate-fadeInUp,
    .animate-slideInLeft,
    .animate-slideInRight {
        animation-duration: 0.6s;
    }
    
    .hover-lift:hover {
        transform: translateY(-4px);
    }
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

/* Form transition fixes */
.form-container {
    position: relative;
    min-height: 2000px; /* Aumentata significativamente l'altezza minima */
    overflow: visible; /* Cambiato da hidden a visible per evitare sovrapposizioni */
    padding-bottom: 200px; /* Aumentato padding per evitare sovrapposizioni */
    margin-bottom: 100px; /* Aggiunto margine inferiore */
}

#form1 {
    position: relative;
    z-index: 2;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.5s ease-in-out;
    min-height: 600px; /* Altezza minima per il primo form */
}

#form2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease-in-out;
    min-height: 1800px; /* Aumentata significativamente l'altezza minima per il secondo form */
    padding-bottom: 100px; /* Padding aggiuntivo per il secondo form */
}

#form2.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

#form1.hidden {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
    position: absolute; /* Cambiato da relative ad absolute quando nascosto */
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none; /* Previene interazioni quando nascosto */
}

/* Assicura che i form abbiano la stessa larghezza */
#form1, #form2 {
    box-sizing: border-box;
}

/* Previene overflow durante le transizioni */
.form-container .form {
    max-width: 100%;
}

/* Button styling improvements */
#next-button {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

/* Gradient button styling - Fix per testo bottone non visibile */
.gradient-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    position: relative !important;
}

.gradient-button * {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.gradient-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Fix specifico per il testo all'interno dei bottoni */
.gradient-button svg {
    color: #ffffff !important;
    fill: currentColor !important;
}

/* Gradient card styling */
.gradient-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Focus enhanced styling */
.focus-enhanced:focus {
    outline: none;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    transform: translateY(-1px);
}

/* Fallback per classi Tailwind essenziali */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #ffffff !important;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.leading-relaxed {
    line-height: 1.625;
}

.opacity-90 {
    opacity: 0.9;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-4 {
    gap: 1rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-light {
    font-weight: 300;
}

.block {
    display: block;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.text-green-300 {
    color: #86efac;
}

@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:py-24 {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
    
    .md\:text-6xl {
        font-size: 3.75rem;
        line-height: 1;
    }
    
    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .form-container {
        min-height: 2200px; /* Aumentata ulteriormente per desktop */
        overflow: visible;
        padding-bottom: 250px;
        margin-bottom: 150px;
    }
    
    #form2 {
        min-height: 2000px; /* Aumentata per desktop */
    }
    
    #next-button {
        max-width: 100%;
    }
    
    /* Assicura che l'hero sia visibile su mobile */
    .gradient-hero {
        min-height: 400px;
        padding: 2rem 0;
    }
    
    .hero-text {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }
}

@media (max-width: 768px) {
    .form-container {
        min-height: 2400px; /* Aumentata ancora di più per mobile */
        overflow: visible;
        padding-bottom: 300px;
        margin-bottom: 200px;
    }
    
    #form2 {
        min-height: 2200px; /* Aumentata per mobile */
    }
    
    #next-button {
        max-width: 100%;
    }
    
    /* Assicura che l'hero sia visibile su mobile */
    .gradient-hero {
        min-height: 400px !important;
        padding: 2rem 0 !important;
    }
    
    .hero-text {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }
}