/* RESET GENERALE & STILI PRECEDENTI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #0F0A1C; /* Deep Purple Night */
    color: #F1EDFA; /* Ice White */
    overflow-x: hidden;
    padding-top: 80px; /* Spazio per la navbar fissa */
}

/* NAVBAR SYSTEM */
.navbar {
    background-color: rgba(15, 10, 28, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: #F1EDFA;
    letter-spacing: -0.5px;
}

.nav-menu a {
    color: #A49DB5;
    text-decoration: none;
    margin: 0 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #FF2A85;
}

.btn-nav {
    padding: 0.6rem 1.2rem;
    border: 1px solid #FF2A85;
    color: #FF2A85;
    font-size: 0.9rem;
}
.btn-nav:hover {
    background-color: #FF2A85;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 42, 133, 0.3);
}

/* HERO SECTION */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    background-color: rgba(139, 92, 246, 0.15);
    color: #8B5CF6; /* Neon Violet */
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #FF2A85, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    color: #A49DB5;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #FF2A85; /* Cyber Pink */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 42, 133, 0.3);
}

.btn-primary:hover {
    background-color: #e01f70;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 42, 133, 0.5);
}

.btn-secondary {
    border: 1px solid rgba(241, 237, 250, 0.2);
    color: #F1EDFA;
}

.btn-secondary:hover {
    background-color: rgba(241, 237, 250, 0.05);
    border-color: #F1EDFA;
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-card {
    background-color: #1A1230; /* Dark Violet Slate */
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 2;
    overflow: hidden;
}

.card-header {
    background-color: rgba(15, 10, 28, 0.6);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}
.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.card-title {
    font-size: 0.8rem;
    color: #6C6382;
    margin-left: 1rem;
    font-family: monospace;
}

.card-body {
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
}

.code-line {
    margin-bottom: 0.5rem;
    color: #A49DB5;
}
.indent { margin-left: 1.5rem; }
.code-keyword { color: #FF2A85; }
.code-string { color: #27c93f; }
.code-builtin { color: #8B5CF6; }

.glow-sphere {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(255, 42, 133, 0.05) 70%, transparent 100%);
    filter: blur(40px);
    z-index: 1;
    border-radius: 50%;
}

/* ==========================================================================
   N_2. SEZIONE SERVIZI (NUOVA)
   ========================================================================== */
.services-section {
    padding: 6rem 2rem;
    background-color: #0F0A1C;
}

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

.service-card {
    background-color: #1A1230;
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: left;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.05);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: #A49DB5;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   2. SEZIONE PORTFOLIO (CAROSELLO 3D)
   ========================================================================== */
.portfolio-section {
    background-color: #1A1230; /* Fondo secondario staccato */
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.container-center {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-section h2, .services-section h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 5rem auto;
    color: #A49DB5;
    line-height: 1.6;
}

/* PALCOSCENICO 3D */
.carousel-stage {
    width: 100%;
    height: 350px;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    cursor: pointer;
}

/* IL CILINDRO CHE RUOTA */
.carousel-3d {
    width: 280px;
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* I SINGOLI SITI DEL CAROSELLO */
.carousel-item {
    position: absolute;
    width: 280px;
    height: 180px;
    left: 0;
    top: 0;
    transform: rotateY(calc(var(--item-index) * 120deg)) translateZ(240px);
    transition: all 0.3s ease;
}

/* Finestra stile Browser per i siti del portfolio */
.mockup-screen {
    background-color: #0F0A1C;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.screen-top {
    background-color: rgba(255,255,255,0.05);
    height: 20px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.screen-top span {
    width: 6px;
    height: 6px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.screen-content {
    height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.site-1 { background: linear-gradient(45deg, #1e1b4b, #311042); }
.site-2 { background: linear-gradient(45deg, #111827, #1e3a8a); }
.site-3 { background: linear-gradient(45deg, #1f2937, #115e59); }

.screen-content h3 { font-size: 1.2rem; margin-bottom: 0.3rem; color: #fff;}
.screen-content p { font-size: 0.8rem; color: #A49DB5; }

.carousel-hint {
    font-size: 0.85rem;
    color: #6C6382;
}

/* ==========================================================================
   3. SEZIONE CHI SIAMO
   ========================================================================== */
.about-section {
    padding: 8rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-visual {
    display: flex;
    justify-content: center;
}

.abstract-box {
    width: 350px;
    height: 350px;
    background-color: #1A1230;
    border-radius: 24px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.1);
}

.grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.floating-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #FF2A85, #8B5CF6);
    border-radius: 50%;
    top: 30%;
    left: 30%;
    filter: blur(10px);
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.about-content h2 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.05rem;
    color: #A49DB5;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-content .btn {
    margin-top: 1rem;
    display: inline-block;
}

/* ==========================================================================
   N_5. MAIN FOOTER (NUOVO)
   ========================================================================== */
.main-footer {
    background-color: #0A0615;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    padding: 4rem 2rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

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

.footer-brand p {
    color: #A49DB5;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.footer-bottom {
    border-top: 1px solid rgba(241, 237, 250, 0.05);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #6C6382;
    font-size: 0.85rem;
}

.footer-legal {
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-container, .about-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-buttons { justify-content: center; }
    .about-visual { order: 2; }
    .nav-menu { display: none; } /* Semplificazione mobile */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}