/* Reset e impostazioni di base */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #f8fafc; color: #1e293b; line-height: 1.6; padding-bottom: 90px; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* Riquadro di Benvenuto Centrato e Moderno */
.dashboard-welcome-panel {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1.5px solid #bae6fd;
    border-radius: 20px;
    padding: 50px 30px;
    margin: 40px auto;
    max-width: 1100px;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dashboard-logo-wrapper { margin-bottom: 25px; }
.dashboard-main-logo { height: 130px; width: auto; object-fit: contain; border-radius: 12px; }

/* Tipografia del Benvenuto */
.dashboard-welcome-title { color: #0f172a; font-size: 36px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 12px; }
.brand-highlight { color: #0284c7; }
.dashboard-welcome-subtitle { color: #334155; font-size: 20px; font-weight: 600; max-width: 800px; margin-bottom: 10px; }
.dashboard-welcome-description { color: #64748b; font-size: 16px; font-weight: 400; max-width: 750px; margin-bottom: 30px; }

/* Pulsante Grande Animato del Sondaggio */
.btn-sondaggio-hero {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    font-size: 19px;
    font-weight: 800;
    padding: 16px 36px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: battitoEffetto 2.5s infinite;
}
.btn-sondaggio-hero:hover { transform: scale(1.03); box-shadow: 0 12px 30px rgba(2, 132, 199, 0.35); }
@keyframes battitoEffetto {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 10px 30px rgba(2, 132, 199, 0.4); }
    100% { transform: scale(1); }
}

/* Griglia Finestrelte Servizi */
.features-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; width: 100%; }

.feature-card { 
    background: #ffffff; 
    padding: 30px 25px; 
    border-radius: 16px; 
    width: 100%; 
    max-width: 340px; 
    text-align: center; /* Testo centrato */
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.03); 
    border: 1px solid #e2e8f0; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra orizzontalmente emoji e bottone */
    justify-content: space-between;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08); }

.card-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; margin-bottom: 20px; }

/* Colori personalizzati per le tre finestrelle */
.tax-card .card-icon { background-color: #e0f2fe; color: #0384c7; }
.consult-card .card-icon { background-color: #f0fdf4; color: #16a34a; }
.assoc-card .card-icon { background-color: #f3e8ff; color: #7c3aed; } 

.feature-card h3 { font-size: 19px; color: #0f172a; margin-bottom: 12px; font-weight: 700; }
.feature-card p { font-size: 14px; color: #475569; line-height: 1.6; margin-bottom: 15px; }

/* Piccolo tasto WhatsApp interno dedicato alle Associazioni (ora perfettamente centrato) */
.btn-wa-card-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: white !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    width: fit-content;
    margin-top: auto; 
    transition: background-color 0.2s, transform 0.2s;
}
.btn-wa-card-small:hover { background-color: #1ebd58; transform: translateY(-2px); }

/* Icone SVG */
.btn-icon { width: 24px; height: 24px; }

/* Pulsante fluttuante WhatsApp Globale */
.btn-consulenza-whatsapp { 
    position: fixed; bottom: 25px; right: 25px; background-color: #25D366; color: white; text-decoration: none; padding: 14px 28px; border-radius: 50px; font-weight: 700; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); z-index: 1000; display: flex; align-items: center; gap: 12px; font-size: 16px; transition: transform 0.2s, background-color 0.2s; 
}
.btn-consulenza-whatsapp:hover { background-color: #1ebd58; transform: scale(1.03); }

/* Sezione Catalogo e Ricerca */
.section-title { margin: 25px 0; color: #0f172a; text-align: center; font-size: 28px; font-weight: 800; }
.search-container { margin-bottom: 40px; text-align: center; }
#productSearch { width: 100%; max-width: 600px; padding: 15px 25px; font-size: 16px; border: 2px solid #e2e8f0; border-radius: 30px; outline: none; background-color: #ffffff; transition: border-color 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
#productSearch:focus { border-color: #0056b3; }

/* Griglia Prodotti */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-bottom: 60px; }
.product-card { background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03); border: 1px solid #edf2f7; display: flex; flex-direction: column; }
.product-img-container { width: 100%; height: 200px; background-color: #ffffff; padding: 15px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #f1f5f9; }
.product-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.badge-fiscale { background-color: #e2fbe8; color: #15803d; padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; align-self: flex-start; margin-bottom: 15px; display: inline-block;}
.product-content h3 { font-size: 19px; color: #0f172a; margin-bottom: 20px; font-weight: 700; }
.btn-apri { background-color: #0056b3; color: white; text-align: center; padding: 14px; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 16px; width: 100%; transition: background-color 0.2s; }
.btn-apri:hover { background-color: #004085; }

/* Finestre Modali con Scorrimento Interno */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(15, 23, 42, 0.65); align-items: center; justify-content: center; padding: 20px; }
.modal-content { background-color: #fff; padding: 45px 30px 35px 30px; border-radius: 20px; width: 100%; max-width: 750px; position: relative; max-height: 85vh; overflow-y: auto; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); animation: scivolaGiu 0.3s ease-out; }
@keyframes scivolaGiu { from {transform: translateY(-40px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }

.close-btn { 
    color: #94a3b8; position: absolute; top: 15px; right: 20px; font-size: 32px; font-weight: bold; cursor: pointer; line-height: 1; z-index: 100; background-color: #ffffff; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.08); transition: 0.2s;
}
.close-btn:hover { color: #1e293b; background-color: #f1f5f9; transform: scale(1.1); }

/* Dettagli interni Modale */
.modal-media-section { background-color: #f8fafc; padding: 15px; border-radius: 12px; margin: 15px 0; text-align: center; border: 1px solid #e2e8f0; }
.main-preview-box { width: 100%; height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; cursor: pointer; }
#modalFotoPrincipale { max-width: 100%; max-height: 290px; object-fit: contain; border-radius: 8px; transition: transform 0.2s; }
.zoom-hint { font-size: 12px; color: #64748b; margin-top: 8px; font-style: italic; }
.thumb-scroll-container { display: flex; gap: 10px; overflow-x: auto; padding: 10px 5px; margin-top: 10px; scroll-behavior: smooth; border-top: 1px solid #e2e8f0; }
.thumb-scroll-container::-webkit-scrollbar { height: 6px; }
.thumb-scroll-container::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.thumb-img { width: 85px; height: 65px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; opacity: 0.6; flex-shrink: 0; transition: 0.2s; }
.thumb-img:hover, .thumb-img.active { opacity: 1; border-color: #0056b3; }
.modal-descrizione { font-size: 15px; margin: 25px 0; color: #334155; border-left: 4px solid #0056b3; padding-left: 15px; font-weight: 500; }
.modal-dettagli h4 { color: #0056b3; margin-top: 20px; margin-bottom: 8px; font-size: 17px; font-weight: 700; }
.modal-dettagli ul { margin-left: 20px; margin-bottom: 15px; color: #334155; font-size: 15px; line-height: 1.7; }
.btn-modal-wa { background-color: #25D366; color: white; text-align: center; padding: 15px; text-decoration: none; border-radius: 10px; font-weight: bold; display: flex; margin-top: 30px; align-items: center; justify-content: center; gap: 12px; font-size: 16px; }

/* Moduli Sondaggio */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-weight: 700; color: #0f172a; margin-bottom: 8px; font-size: 15px; }
.form-group select, .form-group input { width: 100%; padding: 12px 16px; font-size: 15px; border: 2px solid #e2e8f0; border-radius: 8px; background-color: #f8fafc; color: #334155; outline: none; }
.btn-sondaggio-invia { width: 100%; background-color: #16a34a; color: white; font-size: 16px; font-weight: 700; padding: 14px; border: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }

.btn-invia-sondaggio {
    width: 100%; background-color: #16a34a; color: white; font-size: 16px; font-weight: 700; padding: 14px;
    border: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background-color 0.2s; margin-top: 25px;
}

/* Lightbox zoom */
.lightbox { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.98); align-items: center; justify-content: center; }
.lightbox-content-box { max-width: 85%; max-height: 85%; display: flex; align-items: center; justify-content: center; }
#lightboxImgGrande { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; animation: opacita 0.2s ease-in; }
@keyframes opacita { from {opacity: 0.5;} to {opacity: 1;} }
.close-lightbox { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 50px; font-weight: bold; cursor: pointer; }
.lightbox-arrow { position: absolute; background: rgba(255,255,255,0.08); border: none; color: white; font-size: 35px; padding: 15px 22px; cursor: pointer; border-radius: 50%; user-select: none; top: 50%; transform: translateY(-50%); transition: background 0.2s; }
.lightbox-arrow:hover { background: rgba(255,255,255,0.2); }
.arrow-left { left: 20px; }
.arrow-right { right: 20px; }

/* FOOTER (Logo a sinistra, contatti a destra) */
footer { background-color: #0f172a; color: #94a3b8; padding: 50px 0; font-size: 15px; border-top: 1px solid #1e293b; }
.footer-content { display: flex; align-items: center; justify-content: center; gap: 50px; flex-wrap: wrap; }
.footer-logo { max-height: 110px; width: auto; border-radius: 12px; background-color: #ffffff; padding: 5px; }
.footer-text-section { display: flex; flex-direction: column; text-align: left; }
.footer-details { display: flex; flex-direction: column; gap: 10px; }
.footer-details strong { color: #f8fafc; }
.footer-details a { color: #38bdf8; text-decoration: none; font-weight: 600; }
.footer-details a:hover { text-decoration: underline; }
.copyright-text { margin-top: 20px; font-size: 13px; color: #64748b; border-top: 1px solid #1e293b; padding-top: 15px; }

/* Tasto Instagram */
.btn-instagram-footer {
    display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #ffffff !important; padding: 12px 24px; border-radius: 8px; text-decoration: none !important; font-weight: 700; font-size: 15px; margin-top: 15px; transition: transform 0.2s, box-shadow 0.2s; width: fit-content;
}
.btn-instagram-footer:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(220, 39, 67, 0.4); }
.btn-instagram-footer .btn-icon { width: 20px; height: 20px; }

/* Responsive Cellulari */
@media (max-width: 768px) {
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .footer-text-section { text-align: center; }
    .btn-instagram-footer { margin: 15px auto 0 auto; }
    .feature-card { max-width: 100%; }
}
