/* Hero Section */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* MAIA Highlight Section */
.maia-highlight-section {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3730a3 100%);
    animation: maia-glow 6s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes maia-glow {
    0% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    100% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.5), 0 0 60px rgba(59, 130, 246, 0.2);
    }
}

.maia-visual-container {
    position: relative;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
    animation: maia-float 4s ease-in-out infinite;
}

@keyframes maia-float {
    0%, 100% {
        transform: perspective(1000px) rotateY(-5deg) translateY(0px);
    }
    50% {
        transform: perspective(1000px) rotateY(-5deg) translateY(-10px);
    }
}

.maia-visual-container:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    animation-play-state: paused;
}

.maia-cta-primary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e3a8a;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    position: relative;
    overflow: hidden;
}

.maia-cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.maia-cta-primary:hover::before {
    left: 100%;
}

.maia-cta-primary:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
    color: #1e3a8a;
    text-decoration: none;
}

.maia-cta-secondary {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: white;
    font-weight: 500;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.maia-cta-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.maia-cta-secondary:hover::before {
    width: 100%;
}

.maia-cta-secondary:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Pulse animation for highlight badges */
.maia-highlight-section .animate-pulse {
    animation: maia-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes maia-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Service Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.service-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-card {
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    order: -1; /* Sposta questa card all'inizio */
    grid-column: span 2; /* Su schermi grandi, occupa due colonne */
    z-index: 1; /* Assicura che appaia sopra le altre card */
}

.featured-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card-content {
    padding: 1.5rem;
}

/* Stats Section */
.stats-section {
    background: #1a365d;
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

/* CTA Section */
.cta-section {
    background: white;
    margin-top: 4rem;
    padding: 3rem 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .featured-card {
        grid-column: span 1; /* Su mobile occupa tutta la larghezza */
        margin-bottom: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Fix specifici per il mobile menu */
@media (max-width: 768px) {
    .mobile-menu-hidden {
        display: none;
    }
    
    .mobile-menu-visible {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Styles for the mobile menu and hamburger button */
#mobile-menu-button {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
}

#mobile-menu-button svg {
    width: 24px;
    height: 24px;
}

#mobile-menu {
    display: none;
}

#mobile-menu.mobile-menu-visible {
    display: block;
}

/* Responsive adjustments for MAIA section */
@media (max-width: 1024px) {
    .maia-visual-container {
        transform: none;
    }
    
    .maia-visual-container:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 768px) {
    .maia-highlight-section {
        padding: 3rem 0;
    }
    
    .maia-highlight-section h2 {
        font-size: 2.5rem;
    }
    
    .maia-highlight-section h3 {
        font-size: 1.25rem;
    }
}
