html {
     scroll-behavior:smooth;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Menu Mobile */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    box-shadow: 0 10px 10px rgba(0,0,0,0.05);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
}

.nav-menu.active { transform: translateY(0); }

nav a {
    text-decoration: none;
    color: #444;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-nav {
    background: #0056b3;
    color: #fff !important;
    padding: 12px;
    text-align: center;
    border-radius: 2px;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* --- SEZIONE HERO CON CORNICE REGALE --- */
.hero {
    padding: 100px 5% 70px;
    background: #fdfdfd;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid #0056b3;
    opacity: 0.3;
    pointer-events: none;
}

.hero h1 { font-size: 2.3rem; color: #1a1a1a; line-height: 1.3; }

.divider { 
    width: 100%;
    max-width: 150px;
    height: 6px; 
    margin: 25px 0;
    background-image: linear-gradient(90deg, #0056b3 25%, transparent 25%, transparent 50%, #0056b3 50%, #0056b3 75%, transparent 75%, transparent);
    background-size: 12px 6px;
}

.hero p { font-size: 1.1rem; color: #555; margin-bottom: 30px; }

/* Struttura Sezioni */
.sections { padding: 60px 5%; position: relative; }
.alternate { background-color: #f8fafc; }

.section-title { 
    text-align: center; 
    font-size: 1.7rem; 
    margin-bottom: 40px; 
    color: #1a1a1a;
}
.section-title::after {
    content: " ❖ ❖ ❖ ";
    display: block;
    font-size: 0.8rem;
    color: #0056b3;
    letter-spacing: 5px;
    margin-top: 10px;
}

.grid { display: grid; grid-template-columns: 1fr; gap: 25px; }

/* --- SCHEDE SERVIZI ACCORDION (CLICCABILI) --- */
.accordion-card { 
    background: #fff; 
    padding: 0 !important; /* Gestito dai blocchi interni */
    position: relative;
    border: 1px solid #ced4da;
    outline: 3px solid #fff;
    outline-offset: -8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: border-color 0.3s;
}

.accordion-card:hover {
    border-color: #0056b3;
}

.accordion-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background-image: linear-gradient(90deg, #0056b3 50%, #f8fafc 50%);
    background-size: 10px 4px;
    z-index: 10;
}

.card-header {
    padding: 30px;
}

.tap-hint {
    font-size: 0.75rem;
    color: #0056b3;
    font-weight: bold;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s;
}

/* Animazione freccia quando aperto */
.accordion-card.open .tap-hint {
    transform: rotate(180deg);
    color: #333;
}

/* Contenuto Nascosto di Base */
.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fdfdfd;
}

.content-inner {
    padding: 0 30px 30px 30px;
    border-top: 1px dashed #e9ecef;
    padding-top: 20px;
    font-size: 0.95rem;
    color: #444;
}

.content-inner p {
    margin-bottom: 12px;
}

.content-inner ul {
    margin-left: 20px;
    margin-top: 10px;
}

.content-inner li {
    margin-bottom: 8px;
}

.icon-box { font-size: 1.8rem; margin-bottom: 10px; }
.card h3 { color: #0056b3; font-size: 1.3rem; }

/* Card Semplice per Target */
.card-simple { 
    text-align: center; 
    padding: 30px; 
    background: #fff; 
    border: 1px solid #0056b3;
}

/* Sezione Fiducia */
.trust-container { display: flex; flex-direction: column; gap: 35px; }
.subtitle { color: #0056b3; font-weight: 700; font-size: 0.8rem; letter-spacing: 1px; }
.trust-text h2 { font-size: 1.8rem; margin: 10px 0 20px; color: #1a1a1a; }
.trust-text p { margin-bottom: 15px; color: #555; }
.trust-badge-box { display: flex; flex-direction: column; gap: 15px; }
.badge { background: #fff; padding: 15px; border: 1px solid #0056b3; font-size: 0.9rem; font-weight: 600; text-align: center; }

/* Contatti & Form */
.contact-section { padding: 60px 5%; background: #111; color: #fff; text-align: center; position: relative;}
.contact-section::after {
    content: "";
    position: absolute;
    top: 15px; left: 15px; right: 15px; bottom: 15px;
    border: 1px dashed rgba(255,255,255,0.15);
    pointer-events: none;
}

.contact-section h2 { font-size: 1.8rem; }
.contact-section p { color: #ccc; margin-bottom: 30px; font-size: 0.95rem; }
.contact-form { max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; position: relative; z-index: 5; }
.contact-form input, .contact-form textarea { padding: 14px; background: #222; border: 1px solid #444; color: #fff; border-radius: 0; font-size: 1rem; }
.btn { background: #0056b3; color: #fff; padding: 15px 30px; text-decoration: none; display: inline-block; font-weight: 700; text-transform: uppercase; border: none; cursor: pointer; text-align: center; }

.form-feedback { margin-top: 20px; padding: 15px; display: none; border-radius: 4px; font-weight: 600; }
.form-feedback.success { display: block; background: #d4edda; color: #155724; }

/* Footer Istituzionale */
footer { background: #0a0a0a; color: #aaa; padding: 40px 5% 20px; font-size: 0.85rem; border-top: 3px double #0056b3; }
.footer-content { display: flex; flex-direction: column; gap: 30px; margin-bottom: 30px; }
.footer-logo { font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: 5px; }
.footer-legal p { margin-bottom: 8px; font-size: 0.8rem; }
.footer-legal a { color: #0056b3; text-decoration: none; }
.footer-bottom { text-align: center; border-top: 1px solid #222; padding-top: 20px; color: #666; }

/* ==========================================
   COMPUTER E TABLET (Schermi Grandi)
   ========================================== */
@media (min-width: 768px) {
    header { padding: 25px 8%; }
    .menu-toggle { display: none; } 
    .nav-menu { position: static; transform: translateY(0); flex-direction: row; width: auto; padding: 0; box-shadow: none; gap: 0; }
    nav a { margin-left: 25px; }
    .btn-nav { padding: 10px 20px; }
    
    .hero { padding: 140px 8%; }
    .hero::after { top: 30px; left: 30px; right: 30px; bottom: 30px; }
    .hero h1 { font-size: 3.6rem; max-width: 750px; }
    
    .sections { padding: 100px 8%; }
    .section-title { font-size: 2.2rem; }
    .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 35px; }
    
    .trust-container { flex-direction: row; align-items: center; justify-content: space-between; }
    .trust-text { flex: 1; max-width: 550px; }
    .trust-badge-box { width: 300px; }
    
    .contact-section { padding: 100px 8%; }
    .contact-section::after { top: 30px; left: 30px; right: 30px; bottom: 30px; }
    .footer-content { flex-direction: row; justify-content: space-between; }
}

/* Stile per la nuova presentazione a nastro */
.slider-middle {
    width: 100%;
    height: 160px; 
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 3px solid #D4AF37; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.slide { display: none; width: 100%; align-items: center; justify-content: center; }
.active { display: flex; }
.foto-slide {
    width: 110px; height: 110px;
    border-radius: 50%;
    border: 3px solid #D4AF37;
    object-fit: cover;
    margin-right: 25px;
}
.testo-slide h2 { color: #002D62; font-size: 20px; margin: 0; }