* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #2C6BF6, #5234DB);
    border-radius: 4px;
}

/* Stile Sfondo con animazione combinata */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-container {
    position: relative;
    width: 100%;
    height: 100%;
    filter: blur(60px);
    animation: sway-group 40s ease-in-out infinite alternate;
}

.glow {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    width: 55vmax; 
    height: 55vmax;
}

.glow-1 {
    background: rgba(44, 107, 246, 0.5); /* Blu */
    animation: move-clockwise 60s linear infinite;
}

.glow-2 {
    background: rgba(82, 52, 219, 0.5); /* Viola */
    animation: move-clockwise 60s linear infinite;
    animation-delay: -15s;
}

.glow-3 {
    background: rgba(236, 72, 153, 0.4); /* Fucsia */
    animation: move-clockwise 60s linear infinite;
    animation-delay: -30s;
}

.glow-4 {
    background: rgba(239, 68, 68, 0.4); /* Rosso */
    animation: move-clockwise 60s linear infinite;
    animation-delay: -45s;
}

@keyframes move-clockwise {
    0%   { transform: translate(-50%, -50%) }
    25%  { transform: translate(50%, -50%) }
    50%  { transform: translate(50%, 50%) }
    75%  { transform: translate(-50%, 50%) }
    100% { transform: translate(-50%, -50%) }
}

@keyframes sway-group {
    from {
        transform: translateX(-15%);
    }
    to {
        transform: translateX(15%);
    }
}


/* Header */
header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
    width: auto;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #2C6BF6, #5234DB);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(to right, #2C6BF6, #5234DB);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(44, 107, 246, 0.4);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #414EE8, #2C6BF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #a1a1aa;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 0.8rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Services Section */
.services {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.services h2, .about-text h2, .tech-stack h2, .cta-section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #ffffff, #414EE8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text h2, .tech-stack h2, .cta-section h2 {
        margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(65, 78, 232, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(44, 107, 246, 0.3);
    box-shadow: 0 20px 40px rgba(44, 107, 246, 0.1);
}

/* Stile per le icone delle app */
.app-icon {
    width: 68px;
    height: 68px;
    border-radius: 12px; /* Angoli stondati */
    margin-bottom: 1.0rem;
    object-fit: cover;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.service-card p {
    color: #a1a1aa;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 8rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: #a1a1aa;
    margin-bottom: 1.5rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #2C6BF6, #5234DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat h2 {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #2C6BF6, #5234DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: #a1a1aa;
    font-size: 0.9rem;
}

/* Tech Stack */
.tech-stack {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    justify-items: center;
}

.tech-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4rem;
    max-width: 1200px;
}

.tech-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
    width: 200px;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: rgba(44, 107, 246, 0.3);
    box-shadow: 0 20px 40px rgba(44, 107, 246, 0.1);
}

.tech-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

/* CTA Section */
.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    background: linear-gradient(45deg, rgba(44, 107, 246, 0.1), rgba(82, 52, 219, 0.1));
}

.cta-section h2 {
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.2rem;
    color: #a1a1aa;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 6rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p,
.footer-section a {
    color: #a1a1aa;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: #414EE8;
}

.footer-logo {
    margin-bottom: 1rem;
    max-height: 35px;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a {
    color: #a1a1aa;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: #ffffff;
}
.social-icons svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stili Menu Mobile */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001; /* Assicura che l'icona sia sempre cliccabile */
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

/* Stile del popup mobile */
.mobile-nav-popup {
    /* Stato iniziale (nascosto sopra lo schermo) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    position: fixed;
    top: 6rem;
    left: 50%;
    transform: translate(-50%, -150%); /* Posizione iniziale fuori schermo */
    
    width: 90%;
    max-width: 500px; /* Limite per schermi mobile grandi */
    padding: 2.5rem 1.5rem; /* Spaziatura interna */
    
    /* Effetto vetro richiesto */
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Prefisso per compatibilità */
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px; /* Stondatura */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    
    /* Transizione fluida per l'apparizione */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

.mobile-nav-popup.active {
    /* Stato attivo (visibile) */
    transform: translate(-50%, 0); /* Posizione finale */
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-popup .mobile-nav-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1.5rem; /* Spazio tra i link */
}

.mobile-nav-popup .mobile-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 500;
}

.mobile-nav-popup .cta-button {
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    /* Nascondi elementi desktop */
    .nav-links {
        display: none;
    }
    nav > .cta-button { /* Seleziona solo il bottone diretto figlio di nav */
        display: none;
    }
    
    /* Mostra hamburger */
    .hamburger-menu {
        display: block;
    }

    /* Adatta il padding della navbar */
    nav {
        padding: 0.5rem 1.5rem;
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}


/* Sezione Contatti */
.contact-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 8rem 1rem 4rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    background: rgb(45 45 45 / 50%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem;
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        gap: 3rem;
    }
}

.contact-info h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info p {
    color: #a1a1aa;
    margin-bottom: 2rem;
    max-width: 400px;
}

.contact-details .detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-details .icon {
    color: #a1a1aa;
    width: 24px;
    height: 24px;
}

.contact-details a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #2C6BF6;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icons a {
    color: #a1a1aa;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: #ffffff;
}
.social-icons svg {
    width: 28px;
    height: 28px;
}

/* Stile testo supporto */
.support-info {
    font-size: 0.9rem;
    color: #a1a1aa;
    line-height: 1.8;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Allineamento centrato aggiunto */
    text-align: center;
}

.support-info a {
        color: #ffffff;
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
}

/* Modulo di contatto */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #a1a1aa;
}

.contact-form input, .contact-form textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #2C6BF6;
    box-shadow: 0 0 0 3px rgba(44, 107, 246, 0.3);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group label {
    margin-bottom: 0;
    color: #d1d5db;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.15em;
    height: 1.15em;
    cursor: pointer;
}