/* =========================================
   1. VARIABILI E RESET
   ========================================= */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #1976d2;
    --whatsapp-color: #25d366;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #e5e8ed;
    --bg-white: #f1f3f7;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

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

/* =========================================
   2. TIPOGRAFIA E COMPONENTI GLOBALI
   ========================================= */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary { background-color: var(--primary-color); color: var(--text-light); }
.btn-primary:hover { background-color: #b71c1c; }

.btn-whatsapp { background-color: var(--whatsapp-color); color: var(--text-light); }
.btn-whatsapp:hover { background-color: #128c7e; }

.btn-secondary { background-color: var(--secondary-color); color: var(--text-light); }
.btn-secondary:hover { background-color: #115293; }

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 300px;
    margin: 0.5rem;
}

.btn-call {
    background-color: var(--primary-color);
    color: var(--text-light);
}
.btn-call:hover {
    background-color: #b71c1c;
}

.special-contact-btn {
    background-color: var(--bg-white);
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.special-contact-btn:hover {
    background-color: var(--bg-light);
}

/* =========================================
   3. HEADER E NAVIGAZIONE
   ========================================= */
#main-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo-container img {
    height: 50px;
    width: auto;
}

#main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

#main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
}

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

#hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 50;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

#logo {
    height: 40px;
    width: auto;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/hero-bg.webp') center/cover no-repeat;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 5%;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* =========================================
   4.1 TRUST BANNER - ASSICURAZIONE
   ========================================= */
.trust-banner {
    background-color: #e3f2fd;
    color: var(--text-dark);
    padding: 1rem 5%;
    text-align: center;
    border-bottom: 1px solid #bbdefb;
}

.trust-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.05rem;
}

.trust-icon {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .trust-content {
        flex-direction: column;
        font-size: 1rem;
    }
}

/* =========================================
   5. SEZIONE SERVIZI
   ========================================= */
.services-section {
    padding: var(--spacing-lg) 5%;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    height: 60px;
    margin-bottom: 1rem;
}

.service-card img[src$=".svg"] {
    height: 40px;
    margin-bottom: 10px;
}

/* =========================================
   6. SEZIONE CHI SIAMO
   ========================================= */
.about-section {
    padding: var(--spacing-lg) 5%;
    background-color: var(--bg-white);
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* =========================================
   7. SEZIONE FAQ
   ========================================= */
.faq-section {
    padding: var(--spacing-lg) 5%;
    background-color: var(--bg-light);
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-content h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.faq-content > p {
    text-align: center;
    margin-bottom: 2rem;
    color: #555;
}

.faq-list details {
    background-color: var(--bg-white);
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    transition: box-shadow 0.3s ease;
}

.faq-list details:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.faq-list summary {
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 2rem;
    color: var(--text-dark);
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-list details[open] summary::after {
    content: "-";
}

.faq-list details p {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #444;
    line-height: 1.6;
}

/* =========================================
   8. CONTATTI E FOOTER
   ========================================= */
.contact-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    padding: var(--spacing-lg) 5%;
}

#main-footer {
    background-color: #222;
    color: #ccc;
    text-align: center;
    padding: 2rem 5%;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-brand {
    margin: 1.25rem 0;
    text-align: center;
}

.footer-brand p {
    margin: 0;
}

.footer-brand-title {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.footer-brand-name {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-top: 0.15rem;
}

.legal-links {
    margin-top: 1.25rem;
    font-size: 0.85rem;
}

.legal-links a {
    color: #ccc;
    text-decoration: underline;
    margin: 0 10px;
}

/* =========================================
   9. BARRA FISSA MOBILE (Chiamata + WhatsApp)
   ========================================= */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    z-index: 60;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.bar-btn {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.bar-call { background-color: var(--primary-color); }
.bar-wa { background-color: var(--whatsapp-color); }

@media (min-width: 769px) {
    .mobile-bottom-bar { display: none; }
}

/* =========================================
   10. MEDIA QUERIES (Per Smartphone)
   ========================================= */
@media (max-width: 768px) {
    body {
          padding-bottom: 58px;
      }

    #hamburger-menu {
        display: block;
        margin-left: auto;
        margin-right: 15px;
    }

    #main-nav ul {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s ease;
        padding-top: 80px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }

    #main-nav ul.active {
        left: 0;
    }

    #main-nav li {
        margin: 1.5rem 0;
    }

    .header-cta {
        display: none;
    }

    #hamburger-menu.is-active .bar:nth-child(2) { opacity: 0; }
    #hamburger-menu.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    #hamburger-menu.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* =========================================
   11. STILI SOTTOPAGINE E MEDIA
   ========================================= */
.page-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../assets/hero-bg.webp') center/cover no-repeat;
    padding: 6rem 5% 4rem;
    text-align: center;
    color: var(--text-light);
    background-color: var(--text-dark);
}

.service-details {
    padding: var(--spacing-lg) 5%;
    background-color: var(--bg-white);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2, .content-wrapper h3 {
    color: var(--primary-color);
    margin-top: 2rem;
}

.content-wrapper p, .content-wrapper ul {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-wrapper ul {
    padding-left: 1.5rem;
}

.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

figure {
    margin: 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.video-container {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.video-container video {
    border-radius: 4px;
    margin-top: 1rem;
    max-width: 100%;
}

.video-container iframe {width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: 4px;
    margin-top: 1rem;
}

/* =========================================
   12. ASIDE - ALTRI SERVIZI
   ========================================= */
.other-services {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.other-services h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.other-services ul {
    list-style: none;
    padding: 0;
}

.other-services li {
    margin-bottom: 0.8rem;
}

.other-services a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.other-services a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* =========================================
   13. ACCESSIBILITÀ
   ========================================= */
:focus-visible {
    outline: 3px dashed var(--primary-color);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================
   14. SERVIZIO ACCESSORIO (Taglio Chiavi)
   ========================================= */

.extra-service-banner {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
    transition: transform 0.3s ease;
}

.extra-service-banner:hover {
    transform: translateY(-3px);
}

.extra-service-icon {
    font-size: 3rem;
    line-height: 1;
}

.extra-service-text h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.extra-service-text p {
    margin-bottom: 0;
    color: var(--text-dark);
}

.extra-service-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border: 2px dashed var(--secondary-color);
    border-radius: 8px;
    text-align: center;
}

.extra-service-box h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.extra-service-box p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .extra-service-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
}

/* ==========================================================================
   15. STILI PER LA STAMPA
   ========================================================================== */
@media print {
    body {
        background-color: white !important;
        color: black !important;
        font-family: Georgia, "Times New Roman", serif !important;
        font-size: 12pt !important;
    }

    a, .btn, .bar-btn {
        text-decoration: underline !important;
        color: black !important;
        background: transparent !important;
        border: none !important;
    }

    #main-nav, 
    #hamburger-menu, 
    .header-cta, 
    .hero-actions, 
    .mobile-bottom-bar, 
    .contact-methods,
    #cookieyes {
        display: none !important;
    }
+
    .hero-section, 
    #main-footer,
    .trust-banner {
        background: transparent !important;
        color: black !important;
        padding: 0 !important;
    }
}