/* =========================================
   RESET E VARIABILI GLOBALI
   ========================================= */
:root {
    --primary: #2B9CB0; /* Azzurro/Ciano del tuo logo */
    --primary-dark: #227c8d;
    --black: #111111;
    --white: #FFFFFF;
    --gray: #F4F4F4;
}

html {
    scroll-behavior: smooth; /* Permette lo scorrimento fluido sui link interni */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    padding-bottom: 80px; /* Spazio per la sticky bar mobile */
}

a { text-decoration: none; color: inherit; }

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

/* =========================================
   HEADER E NAVIGAZIONE
   ========================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid #ddd;
    position: sticky; top: 0; z-index: 1000;
    padding: 10px 0;
}

.header-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo img { height: 45px; display: block; }

/* NAVIGAZIONE DESKTOP BASE */
.desktop-nav { display: none; }
.desktop-nav ul { list-style: none; display: flex; align-items: center; gap: 20px; }
.desktop-nav a { font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--primary); }

.btn-header {
    background: var(--primary); color: var(--white) !important;
    padding: 8px 15px; border-radius: 4px; transition: background 0.3s;
}
.btn-header:hover { background: var(--primary-dark); }

/* =========================================
   NUOVO MENU A TENDINA DESKTOP (ALTEZZE FORZATE)
   ========================================= */
.desktop-nav li.nav-dropdown { 
    position: relative; 
}

.desktop-nav ul.dropdown-content { 
    display: none !important; 
    position: absolute !important; 
    background-color: #fff !important; 
    min-width: 290px !important; 
    box-shadow: 0px 8px 20px rgba(0,0,0,0.15) !important; 
    z-index: 99 !important; 
    border-radius: 8px !important;
    top: 100% !important;
    left: 0 !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important; 
    flex-direction: column !important; 
}

.desktop-nav ul.dropdown-content::after {
    content: "";
    position: absolute;
    top: -20px; 
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.desktop-nav li.nav-dropdown:hover ul.dropdown-content { 
    display: block !important; 
}

.desktop-nav ul.dropdown-content li { 
    display: block !important; 
    width: 100% !important;
    height: 70px !important; 
    margin: 0 !important;
    padding: 0 !important;
}

.desktop-nav ul.dropdown-content li a { 
    color: #333 !important; 
    padding: 0 20px !important; 
    width: 100% !important;
    height: 100% !important; 
    display: flex !important;  
    align-items: center !important; 
    text-decoration: none !important; 
    text-align: left !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid #eee !important;
    white-space: normal !important; 
    line-height: 1.3 !important;
    box-sizing: border-box !important;
}

.desktop-nav ul.dropdown-content li:last-child a { 
    border-bottom: none !important; 
    border-radius: 0 0 8px 8px !important;
}

.desktop-nav ul.dropdown-content li:first-child a {
    border-radius: 8px 8px 0 0 !important;
}

.desktop-nav ul.dropdown-content li a:hover { 
    background-color: #f0f7ff !important; 
    color: var(--primary) !important; 
}

/* =========================================
   MENU MOBILE
   ========================================= */
.hamburger-btn { background: none; border: none; cursor: pointer; display: block; }

.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white); z-index: 2000;
    transform: translateX(-100%); transition: transform 0.3s ease;
    padding: 60px 20px; overflow-y: auto;
}
.mobile-menu-overlay.active { transform: translateX(0); }
.mobile-menu-overlay nav a {
    display: block; font-size: 1.4rem; font-weight: bold;
    padding: 15px 0; border-bottom: 1px solid #eee;
}
.mobile-menu-overlay nav a:hover { color: var(--primary); }

.close-menu-btn { position: absolute; top: 20px; right: 20px; font-size: 3rem; background: none; border: none; cursor: pointer; color: var(--black); }
.menu-divider { margin-top: 20px; color: var(--primary); font-weight: bold; font-size: 0.9rem; letter-spacing: 1px; }

/* =========================================
   SEZIONI PRINCIPALI
   ========================================= */
/* Hero generato con CSS gradient puro per evitare immagini esterne pesanti e velocizzare la pagina */
.hero-section {
    background: #222 url('hero-bg.webp') no-repeat center center/cover;
    color: var(--white); text-align: center; padding: 100px 20px;
}
.hero-section h1 { font-size: 2.8rem; margin-bottom: 20px; line-height: 1.2; }
.hero-sub { font-size: 1.1rem; max-width: 800px; margin: 0 auto; color: #ccc; }
.hero-sub strong { color: var(--white); }

.hero-actions { 
    display: flex; gap: 20px; justify-content: center; align-items: center;
    margin-top: 35px; flex-wrap: wrap;
}
.btn-hero {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: var(--white);
    border: 2px solid var(--primary);
    padding: 14px 30px; font-weight: bold; border-radius: 5px;
    text-transform: uppercase; font-size: 0.95rem; cursor: pointer;
    transition: all 0.3s ease; min-width: 220px;
}
.btn-hero:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); }

.btn-hero-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 2px solid var(--white); color: var(--white);
    padding: 14px 30px; font-weight: bold; border-radius: 5px;
    text-transform: uppercase; font-size: 0.95rem; cursor: pointer;
    transition: all 0.3s ease; min-width: 220px;
}
.btn-hero-secondary:hover { background: var(--white); color: var(--black); transform: translateY(-2px); }

/* Intro & Testi */
.intro-section { padding: 80px 20px; text-align: left; }
.text-center-box { max-width: 800px; margin: 0 auto; }
.text-center-box h2 { font-size: 2rem; margin-bottom: 20px; color: var(--primary-dark); }
.lead-text { font-size: 1.2rem; margin-bottom: 20px; color: #444; font-weight: bold; }

/* Griglia Servizi */
.methods-section { background-color: var(--gray); padding: 80px 0; }
.section-title { text-align: left; margin-bottom: 10px; font-size: 2rem; color: var(--black); }
.section-subtitle { text-align: left; margin-bottom: 40px; color: #666; font-size: 1.1rem; }

.methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.method-card {
    background: var(--white); padding: 30px; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s;
    border-bottom: 4px solid transparent;
}
.method-card:hover { transform: translateY(-5px); border-bottom-color: var(--primary); }
.method-card h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.3rem; }
.method-card p { font-size: 0.95rem; color: #555; margin-bottom: 20px; }
.tag { font-size: 0.8rem; background: #e0f7fa; color: #006064; padding: 5px 10px; border-radius: 20px; font-weight: bold; display: inline-block; }

/* Liste */
.benefit-list { list-style: none; padding-left: 0; }
.benefit-list li { margin-bottom: 15px; font-size: 1.05rem; position: relative; padding-left: 30px; }
.benefit-list li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: var(--primary); font-weight: bold; font-size: 1.2rem;
}

/* =========================================
   FAQ
   ========================================= */
.faq-section { padding: 80px 20px; }
.faq-item { border-bottom: 1px solid #eee; margin-bottom: 10px; }
.faq-question {
    width: 100%; background: none; border: none;
    padding: 20px 0; text-align: left; font-weight: bold; font-size: 1.1rem;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; -webkit-tap-highlight-color: transparent; color: var(--primary-dark);
}
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0; }
.faq-answer p { padding: 0 0 20px 0; color: #555; margin: 0; }

/* =========================================
   CONTATTI E MODULO
   ========================================= */
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }
.contact-info-box, .contact-form-box { flex: 1; min-width: 300px; }
.contact-info-box h2 { color: var(--primary-dark); font-size: 2rem; margin-bottom: 15px; }
.contact-form-box {
    background: var(--white); padding: 30px; border-radius: 10px;
    border-top: 4px solid var(--primary); box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 5px; font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 5px rgba(43, 156, 176, 0.2);
}

/* =========================================
   FOOTER E BARRA MOBILE
   ========================================= */
.site-footer {
    background-color: var(--black); color: #bbbbbb;
    padding-top: 60px; border-top: 4px solid var(--primary);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; padding-bottom: 40px; }
.footer-col h4 {
    color: var(--white); font-size: 1.1rem; margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid #333; padding-bottom: 10px; display: inline-block;
}
.footer-logo { display: flex; align-items: center; color: var(--white); font-weight: 800; font-size: 1.1rem; margin-bottom: 15px; }
.footer-desc { font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; max-width: 300px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #bbbbbb; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { background-color: #000; padding: 20px 0; text-align: center; font-size: 0.8rem; color: #666; border-top: 1px solid #222; }

/* STICKY BAR MOBILE */
.sticky-mobile-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--white); padding: 10px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999; display: flex; justify-content: center;
}
.sticky-mobile-bar a {
    background: var(--primary); color: var(--white);
    width: 100%; padding: 15px; text-align: center;
    font-weight: bold; font-size: 1.2rem; border-radius: 8px; transition: 0.3s;
}
.sticky-mobile-bar a:hover { background: var(--primary-dark); }

/* =========================================
   COOKIE BANNER
   ========================================= */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: #222; color: #fff; padding: 20px;
    z-index: 99999; box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 20px; font-size: 0.9rem; border-top: 3px solid var(--primary);
    
    transform: translateY(100%); 
    transition: transform 0.5s ease-in-out; 
}

.cookie-banner p { margin: 0; max-width: 800px; line-height: 1.5; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }

.cookie-banner.show { 
    transform: translateY(0); /* Riporta il banner in vista */
}

.cookie-btn-accept {
    background: var(--primary); color: white; border: none;
    padding: 10px 25px; border-radius: 5px; cursor: pointer;
    font-weight: bold; font-size: 0.9rem; transition: 0.3s;
}

.cookie-btn-accept:hover { background-color: white; color: var(--primary-dark); }

/* =========================================
   MEDIA QUERIES (Desktop specifici)
   ========================================= */
@media (min-width: 900px) {
    body { padding-bottom: 0; }
    .sticky-mobile-bar { display: none; }
    .hamburger-btn { display: none; }
    .desktop-nav { display: block; }
    .hero-section h1 { font-size: 3.5rem; }
}