/* Reset e variabili */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #7B68EE;
    --accent-color: #9D50FF;
    --gradient: linear-gradient(135deg, #4A90E2 0%, #7B68EE 50%, #9D50FF 100%);
    --gradient-hover: linear-gradient(135deg, #5BA3F5 0%, #8C79FF 50%, #AE61FF 100%);
    --dark-bg: #0A0E27;
    --card-bg: #1A1F3A;
    --card-hover: #252B4A;
    --text-primary: #FFFFFF;
    --text-secondary: #B8C1EC;
    --success: #4CAF50;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 10px rgba(74, 144, 226, 0.1);
    --shadow-md: 0 10px 30px rgba(74, 144, 226, 0.2);
    --shadow-lg: 0 20px 60px rgba(74, 144, 226, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body.loaded {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(10, 14, 39, 0.98);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

/* Logo con immagine - Clickable */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:active {
    transform: scale(0.95);
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    pointer-events: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
    pointer-events: none;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.logo-highlight {
    color: var(--secondary-color);
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(74, 144, 226, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(123, 104, 238, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(157, 80, 255, 0.1) 0%, transparent 50%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s infinite;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.5);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) translateX(30px) rotate(90deg);
    }

    50% {
        transform: translateY(-60px) translateX(-30px) rotate(180deg);
    }

    75% {
        transform: translateY(-30px) translateX(30px) rotate(270deg);
    }
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-line {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s both;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.title-main {
    display: block;
    font-size: 5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.4s both;
    background-size: 200% 200%;
    animation: fadeInUp 1s ease-out 0.4s both, gradientShift 3s ease infinite;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.6s both;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.7s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.8s both;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn-primary {
    background: var(--gradient);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--gradient);
    transform: translateY(-3px);
    border-color: transparent;
}

/* Scroll Indicator - FIX: z-index più basso */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 1;
    /* FIX: era troppo alto */
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: scroll 2s infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 0;
        top: 10px;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        top: 30px;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.title-decoration {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.title-decoration::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
    animation: expand 1s ease-out;
}

@keyframes expand {
    from {
        width: 0%;
    }

    to {
        width: 60%;
    }
}

/* ============================================
   SERVIZI
   ============================================ */
.servizi {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--card-bg) 50%, var(--dark-bg) 100%);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.servizio-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid rgba(74, 144, 226, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.servizio-card:hover .card-glow {
    opacity: 1;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.servizio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.servizio-card:hover::before {
    opacity: 0.05;
}

.servizio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: var(--card-hover);
}

.card-icon {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.servizio-card:hover .card-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 20px rgba(74, 144, 226, 0.5));
}

.servizio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.servizio-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.card-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.servizio-card:hover .tag {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--primary-color);
}

/* Coming Soon Card */
.coming-soon-card {
    position: relative;
}

.coming-soon-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(74, 144, 226, 0.6);
    }
}

.coming-soon-badge i {
    animation: rotate 2s linear infinite;
}

/* ============================================
   ABOUT
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ============================================
   ABOUT SECTION - FIX RESPONSIVO
   ============================================ */
.about-text {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.about-description strong {
    color: var(--primary-color);
    font-weight: 600;
    word-break: break-word;
}

/* Responsive About Section */
@media (max-width: 968px) {
    .about-description {
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .about-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }

    .about-features {
        gap: 0.8rem;
    }

    .feature-item {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .stats-container {
        gap: 1rem;
    }

    .stat-item {
        padding: 1.2rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 360px) {
    .about-description {
        font-size: 0.9rem;
    }
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    padding: 0.8rem;
    background: rgba(74, 144, 226, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(5px);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-placeholder {
    width: 350px;
    height: 350px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.pulse-ring {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: pulseRing 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
    opacity: 0;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    animation: floatIcon 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: -10%;
}

.floating-icon:nth-child(2) {
    top: 10%;
    right: -10%;
}

.floating-icon:nth-child(3) {
    bottom: 10%;
    left: -10%;
}

.floating-icon:nth-child(4) {
    bottom: 10%;
    right: -10%;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* ============================================
   CONTATTI
   ============================================ */
.contatti {
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--dark-bg) 100%);
}

.contatti-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contatto-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(74, 144, 226, 0.1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.contatto-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contatto-icon {
    font-size: 3.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.contatto-card:hover .contatto-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 20px rgba(74, 144, 226, 0.5));
}

.contatto-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contatto-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-action {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: var(--transition);
}

.card-action i {
    transition: transform 0.3s ease;
}

.contatto-card:hover .card-action {
    color: var(--secondary-color);
}

.contatto-card:hover .card-action i {
    transform: translateX(5px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--card-bg);
    padding: 4rem 0 1.5rem;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1.2rem;
}

.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: var(--shadow-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-links a i {
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(74, 144, 226, 0.1);
    color: var(--text-secondary);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-made {
    font-size: 0.9rem;
}

.footer-made i {
    color: #e74c3c;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Heart Easter Egg Animation */
#secretHeart {
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

#secretHeart:hover {
    transform: scale(1.2);
    color: #ff1493;
}

#secretHeart.clicked {
    animation: heartExplode 0.3s ease;
}

@keyframes heartExplode {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5) rotate(10deg);
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideUp 0.5s ease;
    box-shadow: 0 20px 60px rgba(74, 144, 226, 0.4);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

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

.modal-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.modal-body h2 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.modal-subtitle {
    color: var(--text-primary) !important;
    font-weight: 600;
    margin-bottom: 2rem !important;
}

/* ============================================
   EASTER EGG 1 - LOGO
   ============================================ */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow:
        0 0 10px var(--primary-color),
        0 0 20px var(--primary-color),
        0 0 30px var(--primary-color);
    animation: firework 1.5s ease-out infinite;
}

.firework:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.firework:nth-child(2) {
    left: 50%;
    animation-delay: 0.5s;
}

.firework:nth-child(3) {
    left: 80%;
    animation-delay: 1s;
}

@keyframes firework {
    0% {
        top: 100%;
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 20%;
        opacity: 0;
        transform: scale(20);
    }
}

.ascii-art {
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.ascii-art pre {
    color: var(--primary-color);
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 0;
    font-family: 'Courier New', monospace;
    text-align: left;
}

.secret-message {
    color: var(--secondary-color) !important;
    font-style: italic;
    font-size: 1.1rem !important;
    margin-top: 1.5rem !important;
}

/* ============================================
   EASTER EGG 2 - HEART (Secret) - RESPONSIVO COMPLETO
   ============================================ */
.secret-content {
    max-width: 700px;
    width: 90%;
    background: #000000;
    border-color: #00ff00;
    overflow: hidden;
    padding: 2rem;
    box-sizing: border-box;
}

.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    overflow: hidden;
    font-size: 0.8rem;
}

.glitch-container {
    margin-bottom: 1.5rem;
    width: 100%;
    overflow: hidden;
}

.glitch {
    font-size: 1.8rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: #00ff00;
    letter-spacing: 2px;
    animation: glitch 1s linear infinite;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00de;
    clip: rect(24px, 9999px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00de;
    clip: rect(85px, 9999px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
            0.025em 0.04em 0 #fffc00;
    }

    15% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
            0.025em 0.04em 0 #fffc00;
    }

    16% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }

    49% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }

    50% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
            0 -0.04em 0 #fffc00;
    }

    99% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
            0 -0.04em 0 #fffc00;
    }

    100% {
        text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
            -0.04em -0.025em 0 #fffc00;
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(86px, 9999px, 74px, 0);
    }

    20% {
        clip: rect(40px, 9999px, 99px, 0);
    }

    40% {
        clip: rect(28px, 9999px, 23px, 0);
    }

    60% {
        clip: rect(15px, 9999px, 82px, 0);
    }

    80% {
        clip: rect(63px, 9999px, 35px, 0);
    }

    100% {
        clip: rect(19px, 9999px, 56px, 0);
    }
}

.terminal {
    background: #0a0a0a;
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    text-align: left;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.terminal-line {
    color: #00ff00;
    margin: 0.4rem 0;
    font-size: 0.85rem;
    white-space: pre;
    overflow-x: auto;
    display: block;
}

.typed-text {
    border-right: 2px solid #00ff00;
    animation: blink 0.7s infinite;
    display: inline;
    white-space: pre;
}

@keyframes blink {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: #00ff00;
    }
}

.secret-subtitle {
    color: #ff00de !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    margin: 1.5rem 0 !important;
    text-shadow: 0 0 10px #ff00de;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.4;
}

.secret-code {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 10px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    text-align: left;
    margin-top: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.code-line {
    color: #00ff00;
    margin: 0.3rem 0;
    font-size: 0.9rem;
    white-space: pre;
    display: block;
}

.code-line.indent {
    padding-left: 1.5rem;
    color: #00fff9;
}

/* Scrollbar personalizzata per terminal e code */
.terminal::-webkit-scrollbar,
.secret-code::-webkit-scrollbar {
    height: 6px;
}

.terminal::-webkit-scrollbar-track,
.secret-code::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.terminal::-webkit-scrollbar-thumb,
.secret-code::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 3px;
}

.terminal::-webkit-scrollbar-thumb:hover,
.secret-code::-webkit-scrollbar-thumb:hover {
    background: #00ff88;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .secret-content {
        width: 95%;
        padding: 1.5rem 1rem;
    }

    .glitch {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .terminal {
        padding: 0.8rem;
    }

    .terminal-line {
        font-size: 0.75rem;
    }

    .secret-subtitle {
        font-size: 1rem !important;
    }

    .code-line {
        font-size: 0.8rem;
    }

    .code-line.indent {
        padding-left: 1rem;
    }

    .matrix-bg {
        opacity: 0.05;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .secret-content {
        width: 98%;
        padding: 1.2rem 0.8rem;
    }

    .glitch {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
    }

    .terminal {
        padding: 0.6rem;
    }

    .terminal-line {
        font-size: 0.7rem;
    }

    .secret-subtitle {
        font-size: 0.95rem !important;
    }

    .code-line {
        font-size: 0.75rem;
    }

    .code-line.indent {
        padding-left: 0.8rem;
    }

    .matrix-bg {
        opacity: 0.03;
        font-size: 0.5rem;
    }

    /* Scrollbar più piccola su mobile */
    .terminal::-webkit-scrollbar,
    .secret-code::-webkit-scrollbar {
        height: 4px;
    }
}

/* Fix per schermi molto piccoli */
@media (max-width: 360px) {
    .secret-content {
        width: 100%;
        padding: 1rem 0.6rem;
        border-radius: 15px;
    }

    .glitch {
        font-size: 1rem;
    }

    .terminal-line {
        font-size: 0.65rem;
    }

    .secret-subtitle {
        font-size: 0.9rem !important;
    }

    .code-line {
        font-size: 0.7rem;
    }
}

/* ============================================
   LEGAL MODAL
   ============================================ */
.legal-content {
    max-width: 800px;
}

.legal-body {
    text-align: left;
}

.legal-body h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.legal-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-text h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.legal-text p {
    margin-bottom: 1rem;
}

.legal-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

.legal-text strong {
    color: var(--primary-color);
}

.legal-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-text a:hover {
    color: var(--secondary-color);
}

/* ============================================
   SCROLLBAR
   ============================================ */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-hover);
}

/* ============================================
   ANIMATIONS ON SCROLL
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {

    /* FIX: Menu mobile che sparisce */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(26, 31, 58, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .title-main {
        font-size: 3.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* FIX: About image responsive */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    /* FIX: Image placeholder responsive */
    .about-image {
        order: -1;
        /* Metti l'immagine prima del testo su mobile */
        margin-bottom: 2rem;
    }

    .image-placeholder {
        width: 250px;
        height: 250px;
        font-size: 5rem;
    }

    .pulse-ring {
        width: 250px;
        height: 250px;
    }

    /* FIX: Floating icons responsive */
    .floating-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .floating-icon:nth-child(1) {
        top: 5%;
        left: -5%;
    }

    .floating-icon:nth-child(2) {
        top: 5%;
        right: -5%;
    }

    .floating-icon:nth-child(3) {
        bottom: 5%;
        left: -5%;
    }

    .floating-icon:nth-child(4) {
        bottom: 5%;
        right: -5%;
    }

    .ascii-art pre {
        font-size: 0.5rem;
    }

    /* FIX: Secret Easter Egg responsive */
    .secret-content {
        padding: 2rem;
    }

    .glitch {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .terminal {
        padding: 1rem;
    }

    .terminal-line {
        font-size: 0.85rem;
    }

    .secret-subtitle {
        font-size: 1.1rem !important;
    }

    .code-line {
        font-size: 0.9rem;
    }

    .code-line.indent {
        margin-left: 1rem;
    }

    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2.5rem;
    }

    .title-line {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .servizi-grid,
    .contatti-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }

    .image-placeholder {
        width: 200px;
        height: 200px;
        font-size: 4rem;
    }

    .pulse-ring {
        width: 200px;
        height: 200px;
    }

    /* Nascondi completamente le icone floating su schermi piccoli */
    .floating-icons {
        display: none;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-body h2 {
        font-size: 1.5rem;
    }

    .glitch {
        font-size: 1.2rem;
    }

    .terminal-line {
        font-size: 0.75rem;
    }

    .code-line {
        font-size: 0.8rem;
    }
}