/* ===== OPZIONE 3: CARD CON DESIGN MODERNO E MICRO-INTERAZIONI ===== */

.service-card-compact {
    background: rgba(45, 55, 75, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Barra superiore colorata */
.service-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a9eff, #8b5cf6);
    z-index: 1;
}



/* Effetti hover della card */
.service-card-compact:hover {
    transform: translateY(-8px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(74, 158, 255, 0.2);
    background: rgba(55, 65, 85, 0.9);
}

/* Icona del servizio */
.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4a9eff 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.2);
}

/* Effetto glow per l'icona */
.service-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4a9eff, #8b5cf6);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card-compact:hover .service-icon::before {
    opacity: 0.5;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.service-card-compact:hover .service-icon {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

/* Contenuto della card */
.service-content {
    position: relative;
    z-index: 2;
}

.service-content h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.service-card-compact:hover .service-content h3 {
    background: linear-gradient(135deg, #4a9eff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

/* Card AI Premium - Stili speciali per posizione centrale */
.service-card-compact.ai-premium {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.15) 0%, 
        rgba(74, 158, 255, 0.1) 50%, 
        rgba(236, 72, 153, 0.15) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.service-card-compact.ai-premium::before {
    background: linear-gradient(90deg, #8b5cf6, #4a9eff, #ec4899, #8b5cf6);
    background-size: 300% 100%;
    height: 3px;
}

.service-card-compact.ai-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, 
        rgba(139, 92, 246, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}



.service-card-compact.ai-premium:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-12px) scale(1.02);
}

.service-card-compact.ai-premium:hover::after {
    opacity: 1;
}

.service-card-compact.ai-premium .service-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #4a9eff 50%, #ec4899 100%);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.service-card-compact.ai-premium:hover .service-icon {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
    transform: scale(1.15) rotate(-8deg);
}



.service-card-compact.ai-premium .service-content h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.4rem;
    text-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.service-card-compact.ai-premium:hover .service-content h3 {
    background: linear-gradient(135deg, #8b5cf6, #4a9eff, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    transform: translateY(-3px);
}

/* Stile speciale per la card AI al centro - stesse dimensioni */
.service-card-compact.ai-premium.left-spotlight {
    grid-column: 2; /* Posiziona al centro in una griglia a 3 colonne */
    transform: none; /* Rimuove la scala ingrandita */
    z-index: 10;
    position: relative;
}

.service-card-compact.ai-premium.left-spotlight::before {
    height: 4px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

/* Effetto spotlight per la card AI a sinistra */
.service-card-compact.ai-premium.left-spotlight::after {
    background: radial-gradient(circle at 50% 50%, 
        rgba(139, 92, 246, 0.15) 0%, 
        rgba(74, 158, 255, 0.1) 30%,
        transparent 70%);
}

.service-card-compact.ai-premium.left-spotlight:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.2);
}

/* Aggiungi un badge "AI" alla card premium */
.service-card-compact.ai-premium .ai-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    z-index: 3;
}

/* Layout grid standard con AI al centro - 4x2 per 8 card */
.services-grid-ai-left {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    align-items: start;
}

.services-grid-ai-left .service-card-compact:nth-child(2) {
    grid-column: 2;
}

/* Stile speciale per la card Cloud Computing a destra */
.service-card-compact.cloud-premium {
    background: linear-gradient(135deg, 
        rgba(74, 158, 255, 0.12) 0%, 
        rgba(59, 130, 246, 0.08) 50%, 
        rgba(96, 165, 250, 0.12) 100%);
    border: 2px solid rgba(74, 158, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.service-card-compact.cloud-premium::before {
    background: linear-gradient(90deg, #4a9eff, #3b82f6, #60a5fa, #4a9eff);
    background-size: 250% 100%;
    height: 3px;
}



.service-card-compact.cloud-premium:hover {
    border-color: rgba(74, 158, 255, 0.5);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(74, 158, 255, 0.25),
        0 0 30px rgba(74, 158, 255, 0.15);
    transform: translateY(-10px) scale(1.02);
}

.service-card-compact.cloud-premium .service-icon {
    background: linear-gradient(135deg, #4a9eff 0%, #3b82f6 50%, #60a5fa 100%);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.3);
}

.service-card-compact.cloud-premium:hover .service-icon {
    box-shadow: 0 10px 35px rgba(74, 158, 255, 0.5);
    transform: scale(1.1) rotate(-5deg);
}

/* Responsive per il layout AI al centro */
@media (max-width: 1024px) {
    .services-grid-ai-left {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .service-card-compact.ai-premium.left-spotlight {
        grid-column: 2;
        transform: none;
    }
    
    .service-card-compact.cloud-premium {
        grid-column: 3;
    }
}

@media (max-width: 768px) {
    .services-grid-ai-left {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .service-card-compact.ai-premium.left-spotlight {
        grid-column: 1;
        transform: none;
        order: 2; /* AI al centro anche su mobile */
    }
    
    .service-card-compact.ai-premium.left-spotlight:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .service-card-compact.cloud-premium {
        order: 3;
    }
}

/* Stili per le card enterprise esistenti */
.service-enterprise-card {
    background: rgba(45, 55, 75, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.service-enterprise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a9eff, #8b5cf6);
    z-index: 1;
}



.service-enterprise-card:hover {
    transform: translateY(-8px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(74, 158, 255, 0.2);
    background: rgba(55, 65, 85, 0.9);
}

.service-enterprise-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4a9eff 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.2);
}

.service-enterprise-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #4a9eff, #8b5cf6);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-enterprise-card:hover .service-enterprise-icon::before {
    opacity: 0.5;
}

.service-enterprise-icon i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.service-enterprise-card:hover .service-enterprise-icon {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

.service-enterprise-content h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    transition: all 0.3s ease;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.service-enterprise-card:hover .service-enterprise-content h3 {
    background: linear-gradient(135deg, #4a9eff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .service-card-compact,
    .service-enterprise-card {
        padding: 1.8rem;
    }
    
    .service-icon,
    .service-enterprise-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1.3rem;
    }
    
    .service-icon i,
    .service-enterprise-icon i {
        font-size: 1.4rem;
    }
    
    .service-content h3,
    .service-enterprise-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .service-card-compact,
    .service-enterprise-card {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .service-icon,
    .service-enterprise-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .service-icon i,
    .service-enterprise-icon i {
        font-size: 1.3rem;
    }
    
    .service-content h3,
    .service-enterprise-content h3 {
        font-size: 1.1rem;
    }
    
    .service-card-compact:hover,
    .service-enterprise-card:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 480px) {
    .service-card-compact,
    .service-enterprise-card {
        padding: 1.2rem;
    }
    
    .service-icon,
    .service-enterprise-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.8rem;
    }
    
    .service-icon i,
    .service-enterprise-icon i {
        font-size: 1.2rem;
    }
    
    .service-content h3,
    .service-enterprise-content h3 {
        font-size: 1rem;
    }
}

/* Miglioramenti per l'accessibilità */
.service-card-compact:focus,
.service-enterprise-card:focus {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

.service-card-compact:focus:not(:focus-visible),
.service-enterprise-card:focus:not(:focus-visible) {
    outline: none;
}

/* Animazioni ridotte per utenti che preferiscono meno movimento */
@media (prefers-reduced-motion: reduce) {
    .service-card-compact,
    .service-enterprise-card,
    .service-icon,
    .service-enterprise-icon,
    .service-content h3,
    .service-enterprise-content h3,
    .service-card-compact::before,
    .service-enterprise-card::before {
        transition: none;
    }
    
    .service-card-compact:hover .service-icon,
    .service-enterprise-card:hover .service-enterprise-icon {
        transform: scale(1.02);
    }
    
    .service-card-compact.ai-premium::before {
        animation: none;
    }
}

/* Performance optimization per dispositivi con GPU limitata */
.service-card-compact,
.service-enterprise-card {
    will-change: transform;
}

.service-card-compact:hover,
.service-enterprise-card:hover {
    will-change: transform, box-shadow;
}

/* Stili specifici per le card nel footer */
.footer .service-card-compact {
    background: rgba(20, 20, 20, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
}

.footer .service-card-compact:hover {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(74, 158, 255, 0.2);
}

/* Fix per compatibilità con stili esistenti */
.service-card-v3 {
    background: rgba(30, 30, 30, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    position: relative !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.service-card-v3::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #4a9eff, #8b5cf6) !important;
    z-index: 1 !important;
}



.service-card-v3:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(74, 158, 255, 0.3) !important;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(74, 158, 255, 0.1) !important;
    background: rgba(40, 40, 40, 0.9) !important;
}
