/* ======================================================================
   1. VARIABILI E BASE
   ====================================================================== */
:root {
    --bg-white: #ffffff;
    --bg-light-grey: #f5f6f8;
    --text-black: #1a1a1a;
    --text-grey: #4a5568; 
    --primary-blue: #0056b3;
    --success-green: #28a745;
    --border-color: #e2e8f0;
}

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

body { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg-light-grey); 
    color: var(--text-black); 
    padding-bottom: 90px; 
    -webkit-font-smoothing: antialiased;
}

/* ======================================================================
   2. HEADER E BRANDING
   ====================================================================== */
header { 
    background-color: var(--primary-blue); 
    color: var(--bg-white); 
    padding: 2.5rem 1.5rem; 
    text-align: center; 
}

.header-content { 
    max-width: 850px; 
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
}

.logo-svg {
    width: 32px;
    height: 32px;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--bg-white);
}

header h1 { 
    font-size: 2rem; 
    line-height: 1.2; 
    margin-bottom: 0.8rem; 
}

header p { 
    font-size: 1.1rem; 
    opacity: 0.9; 
}

/* ======================================================================
   3. SEZIONI SEO E CONTENUTI
   ====================================================================== */
.seo-box { 
    background: var(--bg-white); 
    padding: 1.8rem; 
    border-radius: 12px; 
    margin-bottom: 1.5rem; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
}

.seo-box h2 { 
    color: var(--primary-blue); 
    font-size: 1.4rem; 
    margin-bottom: 1rem; 
}

.seo-box p { 
    line-height: 1.6; 
    color: var(--text-grey); 
    margin-bottom: 1rem; 
    font-size: 1rem; 
}

.seo-box strong { 
    color: var(--text-black); 
}

/* ======================================================================
   4. SEZIONE IMMAGINE FINALE (Trust Section)
   ====================================================================== */
.final-trust-container {
    display: flex;
    flex-direction: column; 
    align-items: center;
}

.trust-text {
    padding: 2rem 1.5rem; 
    text-align: center; 
}

.trust-text h2 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.trust-text p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-grey);
}

/* Modifica Spazi e Bordi Immagine Mobile */
.trust-image {
    width: 100%;
    display: flex; 
    padding: 0 1.5rem 2rem 1.5rem; 
}

.trust-image img {
    width: 100%;
    height: auto;
    object-fit: cover; 
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* ======================================================================
   5. MENU DI NAVIGAZIONE E BOTTONI
   ====================================================================== */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    max-width: 850px; 
    background: var(--bg-white); 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    padding: 0.8rem 0; 
    border-top: 1px solid var(--border-color); 
    border-radius: 16px 16px 0 0;
    z-index: 100; 
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-decoration: none; 
    color: #718096; 
    font-size: 0.8rem; 
    font-weight: 600; 
    gap: 4px; 
}

.nav-item.active, .nav-item:hover { 
    color: var(--primary-blue); 
}

.nav-item .icon { 
    width: 24px; 
    height: 24px; 
}

/* Bottone Chiamata Centrale (Bottom Nav) */
.call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-btn .circle-icon {
    background-color: var(--success-green);
    color: var(--bg-white);
    width: 48px;  
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0; 
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.call-btn:hover .circle-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5);
}

.call-btn .circle-icon .icon {
    width: 22px; 
    height: 22px;
    margin-bottom: 0;
}

/* Menu Fullscreen (Altro) */
.fullscreen-menu {
    position: fixed; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    background-color: rgba(0,0,0,0.5); 
    z-index: 200; 
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; 
    justify-content: center;
}

.fullscreen-menu.open { 
    top: 0; 
}

.menu-content { 
    width: 100%; 
    max-width: 850px; 
    background: var(--bg-white); 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
}

.menu-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem; 
    background-color: var(--bg-light-grey); 
    border-bottom: 1px solid var(--border-color); 
}

.menu-header h2 { 
    font-size: 1.3rem; 
    color: var(--text-black); 
}

.close-btn { 
    background: none; 
    border: none; 
    font-size: 2.5rem; 
    color: var(--text-black); 
    cursor: pointer; 
    line-height: 1; 
}

.menu-links { 
    padding: 1rem 0; 
    display: flex; 
    flex-direction: column; 
}

.menu-links a {
    padding: 1.5rem; 
    text-decoration: none; 
    color: var(--text-black);
    font-size: 1.1rem; 
    border-bottom: 1px solid var(--border-color);
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-weight: 500;
}

.menu-links a:hover { 
    background-color: var(--bg-light-grey); 
    color: var(--primary-blue); 
}

.link-icon { 
    width: 24px; 
    height: 24px; 
    color: var(--primary-blue); 
}

/* ======================================================================
   6. CONTATTI E BOTTONI CTA
   ====================================================================== */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1.2rem;
}

.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px; 
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-contact svg { width: 22px; height: 22px; }
.btn-phone { background-color: var(--primary-blue); color: var(--bg-white); }
.btn-wa { background-color: #25D366; color: var(--bg-white); }
.btn-email { background-color: var(--text-black); color: var(--bg-white); }

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-blue);
    color: var(--bg-white);
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.3);
}

.btn-cta svg {
    width: 20px; 
    height: 20px;
    margin-right: 10px; 
}

/* ======================================================================
   7. GALLERIA, RECENSIONI E FAQ
   ====================================================================== */
/* Gallery */
.gallery-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem; 
    max-width: 850px;  
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.gallery-item {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 220px;
    object-fit: cover; 
    display: block;
    background-color: var(--bg-light-grey); 
}

.gallery-caption {
    padding: 12px 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-black);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* Immagini Servizi (Real Image) */
.service-image {
    width: 100%;
    background: transparent;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}

.real-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 2; 
}

/* Dashboard App */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
    margin-bottom: 2rem; 
}

.card { 
    background: var(--bg-white); 
    padding: 1.5rem; 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); 
}

.card h3 { font-size: 0.95rem; color: #718096; font-weight: normal; margin-bottom: 0.5rem; }
.card .value { font-size: 1.8rem; font-weight: 700; color: var(--text-black); margin-bottom: 0.3rem; }
.card .trend { font-size: 0.85rem; font-weight: 600; color: var(--success-green); }

/* FAQ */
.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    color: var(--text-black);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.faq-item h3::before {
    content: "Q:";
    color: var(--primary-blue);
    font-weight: 900;
}

.faq-item p {
    margin-bottom: 0;
    padding-left: 25px; 
}

/* Recensioni */
.reviews-section {
    padding: 50px 15px; 
    background-color: var(--bg-light-grey);
    text-align: center;
}

h2.section-title {
    margin-bottom: 30px;
    color: var(--text-black);
    font-size: 26px; 
    padding: 0 10px;
}

.reviews-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 25px;
    width: 100%;
    flex: 1 1 300px; 
    max-width: 350px;
    text-align: left;
    border-top: 5px solid var(--primary-blue);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    box-sizing: border-box; 
}

.stars {
    color: #ffcc00;
    font-size: 20px;
    margin-bottom: 10px;
}

.review-text {
    font-style: italic;
    color: var(--text-grey);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 16px; 
}

.review-author {
    font-weight: bold;
    color: var(--text-black);
    display: block;
}

.review-location {
    font-size: 0.9em;
    color: var(--primary-blue);
}

/* ======================================================================
   8. MEDIA QUERIES (ADATTAMENTI RESPONSIVE DESKTOP E MOBILE)
   ====================================================================== */

/* --- OTTIMIZZAZIONI MOBILE --- */
@media (max-width: 768px) {
    .reviews-section {
        padding: 30px 10px;
    }
    
    .review-card {
        max-width: 100%; 
        min-height: auto; 
        margin-bottom: 10px;
    }
    
    h2.section-title {
        font-size: 22px;
        margin-bottom: 25px;
    }
}

/* --- OTTIMIZZAZIONI DESKTOP --- */
@media (min-width: 768px) {
    header { padding: 4rem 1.5rem; }
    
    .bottom-nav { 
        border-radius: 0; 
        border-left: 1px solid var(--border-color); 
        border-right: 1px solid var(--border-color); 
    }

    .contact-section { 
        flex-direction: column; 
        text-align: center; 
    }
    
    .contact-content { 
        align-items: center; 
    }

    .contact-buttons { 
        flex-direction: row; 
        justify-content: center;
        width: 100%;
        margin-top: 2rem; 
        gap: 20px; 
    }
    
    .btn-contact { 
        flex: 1; 
        max-width: 260px; 
    }

    .service-highlight {
        display: flex; 
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .service-content {
        flex: 1;
    }
    
    .service-image {
        flex: 1;
        background: transparent;
        padding: 0;
    }

    /* Immagine finale Desktop - Modifica Spazi e Bordi */
    .final-trust-container {
        flex-direction: row; 
        align-items: stretch; 
    }

    .trust-text {
        flex: 1; 
        padding: 3rem; 
        text-align: left; 
        display: flex;
        flex-direction: column;
        justify-content: center; 
    }

    .trust-text h2 {
        font-size: 1.6rem;
    }

    .trust-image {
        flex: 1; 
        height: auto; 
        padding: 3rem 3rem 3rem 0; 
        align-items: center; 
    }
    
    .trust-image img {
        height: auto; 
        max-height: 100%; 
    }
}