/* =========================================
   VARIABILI GLOBALI E COLORI
   ========================================= */
:root {
    --primary: #0077b6;       /* Blu Oceano */
    --primary-dark: #03045e;  /* Navy profondo */
    --accent: #00b4d8;        /* Azzurro brillante */
    --bg-light: #f8fbff;      /* Sfondo chiarissimo */
    --text-main: #333333;
    --text-light: #666666;
    --danger: #dc3545;        
    --success: #28a745;       
    --marquee-height: 40px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: calc(var(--marquee-height) + 70px);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }

/* STRISCIA SCORREVOLE */
.marquee-container {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--marquee-height);
    background-color: var(--primary-dark); color: #fff; overflow: hidden;
    display: flex; align-items: center; z-index: 1000;
}
.marquee-text {
    white-space: nowrap; font-size: 0.95rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; animation: scroll-right-to-left 20s linear infinite;
}
.marquee-text span { color: var(--accent); }
@keyframes scroll-right-to-left { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* HEADER E MENU */
.main-header {
    position: fixed; top: var(--marquee-height); left: 0; width: 100%; height: 70px;
    background-color: #ffffff; box-shadow: 0 4px 15px rgba(0, 119, 182, 0.1);
    display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 999;
}
.logo-container { display: flex; align-items: center; height: 50px; }
.logo-container a { display: block; height: 100%; }
.logo-container img { height: 100%; width: auto; display: block; object-fit: contain; }

.desktop-nav { display: flex; gap: 25px; align-items: center; }
.nav-link { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary-dark); transition: color 0.3s ease; }
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.nav-link svg { width: 20px; height: 20px; stroke: currentColor; }
.call-btn-header { background-color: var(--primary); color: white !important; padding: 10px 20px; border-radius: 50px; box-shadow: 0 4px 10px rgba(0, 119, 182, 0.3); }
.call-btn-header:hover { background-color: var(--primary-dark); }

/* MENU MOBILE */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--primary-dark); }
.mobile-sidebar {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
    background-color: #ffffff; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 1001;
    transition: right 0.3s ease; padding: 80px 20px 20px 20px; display: flex; flex-direction: column; gap: 20px;
}
.mobile-sidebar.open { right: 0; }
.close-menu { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 2rem; color: var(--primary-dark); cursor: pointer; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(3, 4, 94, 0.5); z-index: 1000; display: none; opacity: 0; transition: opacity 0.3s ease; }
.overlay.active { display: block; opacity: 1; }

/* SEZIONI E CONTENUTI */
.section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.section-light { background-color: #ffffff; }

.hero-section { text-align: center; padding-top: 60px; }
.hero-subtitle { color: var(--accent); font-weight: 700; letter-spacing: 1px; }
.hero-title { font-size: 2.8rem; color: var(--primary-dark); margin: 15px 0; line-height: 1.2; }
.hero-desc { font-size: 1.2rem; color: var(--text-light); max-width: 800px; margin: 0 auto 30px auto; }

.section-title { font-size: 2.2rem; color: var(--primary-dark); text-align: center; margin-bottom: 40px; }

/* TABELLA COMPARATIVA */
.comparison-box { display: flex; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.comp-card { flex: 1; min-width: 300px; padding: 30px; border-radius: 12px; text-align: left; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.comp-bad { background-color: #fff5f5; border-top: 5px solid var(--danger); }
.comp-good { background-color: #f0f8ff; border-top: 5px solid var(--primary); }
.comp-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.comp-bad h3 { color: var(--danger); }
.comp-good h3 { color: var(--primary); }
.comp-list { list-style: none; }
.comp-list li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; }
.comp-list svg { flex-shrink: 0; width: 24px; height: 24px; }

/* FAQ CARDS */
.faq-card { background: #fff; padding: 30px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border-left: 4px solid var(--accent); }
.faq-card h3 { color: var(--primary); font-size: 1.4rem; margin-bottom: 10px; }

/* TECNOLOGIA GRID */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.tech-card { background: #fff; padding: 30px; border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0, 119, 182, 0.08); transition: transform 0.3s ease; border-bottom: 4px solid var(--primary); }
.tech-card:hover { transform: translateY(-5px); }
.tech-icon { background: var(--bg-light); width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; }
.tech-icon svg { width: 40px; height: 40px; stroke: var(--primary); fill: none; stroke-width: 1.5; }
.tech-card h3 { color: var(--primary-dark); margin-bottom: 15px; font-size: 1.3rem; }

/* CASI STUDIO */
.case-study { display: flex; align-items: center; gap: 40px; margin-bottom: 60px; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.04); }
.case-study:nth-child(even) { flex-direction: row-reverse; }
.case-image { flex: 1; min-width: 300px; }
.case-text { flex: 1; min-width: 300px; }
.case-text h3 { color: var(--primary-dark); font-size: 1.8rem; margin-bottom: 15px; }
.case-tag { display: inline-block; background: var(--bg-light); color: var(--primary); padding: 5px 15px; border-radius: 50px; font-weight: bold; margin-bottom: 15px; font-size: 0.9rem; }

/* CONTATTI CTA */
.cta-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; text-align: center; border-radius: 12px; padding: 60px 20px; margin: 40px 5%; box-shadow: 0 15px 40px rgba(0, 119, 182, 0.4); }
.cta-section h2 { font-size: 2.5rem; margin-bottom: 20px; color: #fff; }
.cta-section p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.cta-btn { display: inline-block; background: #fff; color: var(--primary-dark); padding: 18px 40px; font-size: 1.3rem; font-weight: bold; border-radius: 50px; transition: transform 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.cta-btn:hover { transform: scale(1.05); }

/* FOOTER */
footer { background: #111; color: #aaa; text-align: center; padding: 40px 20px; margin-top: 40px; }
footer h4 { color: #fff; font-size: 1.2rem; margin-bottom: 10px; }
footer p { margin-bottom: 10px; font-size: 0.95rem; }

/* WHATSAPP */
.wa-float { position: fixed; bottom: 20px; right: 20px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); z-index: 100; transition: transform 0.3s ease; }
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 35px; height: 35px; fill: currentColor; }

@media (max-width: 900px) {
    .desktop-nav { display: none; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 2rem; }
    .case-study, .case-study:nth-child(even) { flex-direction: column; text-align: center; gap: 20px; }
    .cta-section h2 { font-size: 2rem; }
}

/* FORM */

.form-input {
            width: 100%;
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1rem;
            font-family: inherit;
            box-sizing: border-box;
            background-color: #fcfcfc;
        }
        .form-input:focus {
            outline: none;
            border-color: var(--primary);
            background-color: #fff;
            box-shadow: 0 0 5px rgba(0, 119, 182, 0.2);
        }
        .form-submit {
            width: 100%;
            border: none;
            cursor: pointer;
            text-align: center;
        }
        
/* BANNER PRIVACY E COOKIE (MODALE) */

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); 
    z-index: 99999; 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cookie-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal {
    background: #ffffff;
    width: 90%;
    max-width: 650px;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    border-top: 6px solid var(--primary);
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.cookie-overlay.show .cookie-modal {
    transform: translateY(0);
}

.cookie-modal h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.cookie-modal p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-accetta {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.btn-accetta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-info {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 13px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-info:hover {
    background-color: var(--primary);
    color: #fff;
}