/* RESET & VARIABLES */
:root {
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --bg-light: #f4f4f4;
    --primary: #00E5FF; /* Ciano Elettrico Tech */
    --primary-dark: #00b8cc;
    --text-main: #e0e0e0;
    --text-dark: #333333;
    --gray-lines: #2a2a2a;
    --container-width: 1200px;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -1px; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--primary); }
h3 { font-size: 1.5rem; color: var(--primary-dark); }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--primary);
    color: var(--bg-darker);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    border: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    border: 2px solid var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--bg-darker);
}

/* HEADER */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-lines);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#navbar ul {
    display: flex;
    gap: 20px;
}

#navbar a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
}

#navbar a:hover { color: var(--primary); }

#mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

#mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 5px 0;
}

/* HERO SECTION */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #cccccc;
}

/* SECTIONS COMMON */
section {
    padding: 80px 0;
}

.section-dark { background-color: var(--bg-darker); }
.section-light { background-color: var(--bg-light); color: var(--text-dark); }
.section-gray { background-color: #252525; }

.dark-text { color: var(--text-dark); }
.section-title { margin-bottom: 2rem; border-left: 4px solid var(--primary); padding-left: 15px; }

/* LAYOUT GRIDS */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.tech-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border: 1px solid var(--gray-lines);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 3px solid var(--primary);
}

.icon-box {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    opacity: 1;
    margin-bottom: 10px;
}

.split-layout {
    display: flex;
    gap: 50px;
    align-items: center;
}

.text-side, .image-side { flex: 1; }

.tech-img {
    width: 100%;
    height: 400px;
    background: #000;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-family: monospace;
    letter-spacing: 2px;
}

.tech-list { margin-top: 20px; }
.tech-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}
.tech-list li::before {
    content: '>';
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* STEPS GRID */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.step {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-left: 2px solid var(--primary);
}
.step-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
    line-height: 1;
}

/* 1. Forza Titoli e Testi a diventare BIANCHI */
#domestico h2, 
#domestico h4, 
#domestico p {
    color: #ffffff !important; 
}

/* CTA PRE-FOOTER */
.cta-section {
    background: linear-gradient(45deg, var(--bg-darker), #1a2a2c);
    text-align: center;
    padding: 100px 0;
    border-top: 1px solid var(--gray-lines);
}
.cta-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.big-btn { padding: 15px 30px; font-size: 1rem; }

/* FOOTER */
footer {
    background-color: #050505;
    padding-top: 60px;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid var(--gray-lines);
}

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

.footer-logo {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { color: var(--primary); }

.contact-list li {
    display: flex;
    flex-direction: column;
}

.footer-bottom {
    background-color: #000;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #111;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    #navbar {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        flex-direction: column;
        display: none;
        border-bottom: 1px solid var(--primary);
    }
    #navbar.active { display: block; }
    #navbar ul {
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    #mobile-menu-btn { display: block; }
    .header-cta { display: none; } /* Nascosto su mobile header per pulizia */
    
    .content-grid, .split-layout, .steps-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    
    .hero h1 { font-size: 2rem; }
    .btn-outline { margin-left: 0; margin-top: 10px; }
    .hero-buttons { display: flex; flex-direction: column; }
    
    .image-side { order: -1; } /* Immagine sopra testo su mobile */
}

/* Contenitore per allineare */
.logo-container a {
    display: block;
    border: none;
}

/* Gestione dell'immagine logo */
.logo {
    height: 50px;       /* Altezza fissa ideale per header */
    width: auto;        /* Mantiene le proporzioni */
    display: block;
}

/* Su mobile riduciamo leggermente se necessario */
@media (max-width: 480px) {
    .logo {
        height: 40px;
    }
}

/* --- STILE SEZIONE APPROFONDIMENTI SEO --- */

.seo-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 3 colonne che diventano 1 su mobile */
    gap: 50px; /* Molto spazio tra le colonne per leggibilità */
    margin-top: 40px;
}

.seo-box h3 {
    color: var(--primary-dark); /* Titolo Ciano Scuro leggibile */
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee; /* Linea leggera di separazione */
    padding-bottom: 10px;
}

.seo-box p {
    color: #444; /* Grigio scuro per il testo lungo (non nero puro, stanca meno gli occhi) */
    font-size: 1rem;
    line-height: 1.8; /* Interlinea alta per facilitare la lettura */
    text-align: justify; /* Testo giustificato elegante */
}

/* Le parole chiave in grassetto nel testo */
.seo-box strong {
    color: #000;
    font-weight: 700;
}

/* Su mobile, togliamo il giustificato che può creare buchi */
@media (max-width: 768px) {
    .seo-box p {
        text-align: left;
    }
}

/* --- BOTTONE SOS SEMPLICE --- */

/* Nascondi su PC */
    
    .btn-sticky { display: none; }

@media (max-width: 768px) {
    
    .btn-sticky.ciano {
        display: flex;
        justify-content: center;
        align-items: center;
        
        position: fixed;
        bottom: 25px;
        right: 25px;   /* Basso a Destra */
        z-index: 9999;
        
        width: 65px;
        height: 65px;  
        
        background-color: var(--primary);
        color: var(--bg-darker);           
        
        border-radius: 50%;
        border: 2px solid #ffffff;
        
        text-decoration: none;
        font-weight: 800;   
        font-size: 13px;
        font-family: sans-serif;
        
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        
        /* Animazione */
        animation: pulse-ciano 2s infinite;
    }

    /* Animazione Onda Ciano */
    @keyframes pulse-ciano {
        0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
        70% { box-shadow: 0 0 0 15px rgba(0, 229, 255, 0); }
        100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
    }
}

/* --- STILE BADGE COMUNI (Pagine Provinciali) --- */

.comuni-grid {
    display: flex;
    flex-wrap: wrap;       /* Va a capo se non c'è spazio */
    justify-content: center; /* Centra tutto */
    gap: 12px;             /* Spazio tra i badge */
    max-width: 900px;
    margin: 0 auto;
}

.badge-city {
    background-color: #e0e0e0; /* Grigio chiaro */
    color: #333;               /* Testo scuro */
    padding: 8px 18px;
    border-radius: 25px;       /* Bordo arrotondato */
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
    cursor: default;
}

.badge-city:hover {
    background-color: #00E5FF; /* Diventa Ciano al passaggio mouse */
    color: #000;
    border-color: #00E5FF;
    transform: translateY(-2px); /* Si alza leggermente */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- GRIGLIA PROVINCE FOOTER --- */
.province-nav-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.prov-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.prov-link:hover {
    background-color: #00E5FF; /* Il tuo colore Ciano */
    color: #000;
    border-color: #00E5FF;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3);
}

/* Adattamento Mobile */
@media (max-width: 768px) {
    .prov-link {
        font-size: 0.9rem;
        padding: 8px 15px;
        flex: 1 1 calc(50% - 15px); /* Due colonne su mobile */
        text-align: center;
    }
}