.home-button:after{ display:none; }
.sp-megamenu-parent .sp-dropdown .sp-dropdown-inner { background: #00b9ff; }
.sp-megamenu-parent .sp-dropdown li.sp-menu-item >a { color: #fff; cursor: pointer; font-size: 1.2rem; font-weight: 500; }
.sp-megamenu-parent .sp-dropdown li.sp-menu-item > a:hover, .sp-megamenu-parent .sp-dropdown li.sp-menu-item > a:visited { color: #fff; background-color: #0095d9; /* o il colore hover che preferisci */ font-weight: 600; /* opzionale */ }
.sp-copyright { font-size:19px !important; font-weight:300; text-align:center !important; line-height:normal !important; }

/* Reset lista */
.footer-social ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:12px;
}
.footer-social li{ list-style:none; }

/* Pill full-width, testo allineato e non tagliato */
.footer-social .social-link{
  display:block;               /* rende tutta la riga cliccabile */
  width:100%;                  /* stessa larghezza per tutte */
  padding:.8rem 1rem;
  border-radius:9999px;
  background:#4e86bd;
  color:#fff;
  text-decoration:none;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
  line-height:1.2;
  font-weight:600;
  letter-spacing:.2px;

  white-space:nowrap;          /* niente a capo */
  overflow:hidden;             /* evita sbordi */
  text-overflow:ellipsis;      /* … se lo spazio non basta */
}

/* Hover/Focus */
.footer-social .social-link:hover,
.footer-social .social-link:focus{
  background:#3c6c99;
  outline:none;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}

/* Variante responsive: in riga su desktop */
@media (min-width: 992px){
  .footer-social ul{
    grid-template-columns: 1fr; /* resta a colonna; cambia in repeat(3,auto) per averli affiancati */
    max-width: 260px;           /* opzionale: larghezza della colonna social */
  }
}
#sp-footer .sp-copyright {
    text-transform: none;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8faff;
  border-radius: 20px;
  margin-bottom: 12px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(31, 56, 104, 0.08);
  font-size: 1rem;
}
.contact-list .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}
.contact-list a {
  color: #4988C0;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-list a:hover,
.contact-list a:focus {
  color: #1F3868;
  text-decoration: underline;
}
.contact-list strong {
  color: #1F3868;
  min-width: 76px;
  font-size: 1rem;
}
.contact-list li.regions {
  align-items: flex-start; /* allinea l’etichetta in alto */
}

/* Wrapper a due card (responsive) */
.footer-contacts-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 20px;
}

/* Card generica */
.contact-card {
  flex: 1 1 320px;
  max-width: 420px;
  background: #f8faff;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(31, 56, 104, 0.08);
  padding: 20px 24px;
}

.contact-card h4 {
  color: #1F3868;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

/* Liste interne alle card */
.contact-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Elementi lista (regioni + contatti) */
.contact-card .region-list li,
.contact-card .contact-list li {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 5px rgba(31, 56, 104, 0.08);
}

/* Link */
.contact-card a {
  color: #4988C0;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-card a:hover,
.contact-card a:focus {
  color: #1F3868;
  text-decoration: underline;
}

/* Etichette dei contatti */
.contact-card .contact-list strong {
  color: #1F3868;
  display: inline-block;
  min-width: 90px;
  font-size: 1rem;
}


#sp-bottom2 .sp-module-content ul.nav.menu {
    display: flex;
    flex-direction: column;
    align-items: center;  /* Centra figli orizzontalmente */
    padding: 0;
    margin: 0 auto;
}

#sp-bottom2 .sp-module-content ul.nav.menu li {
    display: block;
    margin: 0 0 8px 0;
    padding: 0;
    width: 100%; /* full per il li, puoi anche non metterlo */
}

#sp-bottom2 .sp-module-content ul.nav.menu li a {
    display: block;
    width: 220px;           /* lunghezza fissa, oppure puoi usare 60% o max-width */
    max-width: 98vw;
    margin: 0 auto;         /* centra il bottone all’interno del li */
    background: #4988C0;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 18px;
    padding: 8px 0 7px 0;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(31, 56, 104, 0.10);
    cursor: pointer;
    outline: none;
}


/* ===================================================
   HELIX 3 EMPIRE TEMPLATE - HEADER COMPLETE FIX
   ================================================== */

/* === LOGO BASE STYLING === */
#sp-logo .logo img {
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
}

/* Logo container - centrato perfettamente */
#sp-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 60px !important;
    padding: 0 !important;
    text-align: center !important;
}

#sp-logo .sp-column {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

#sp-logo .logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

#sp-logo .logo h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* === HEADER CONTAINER === */
#sp-header {
    min-height: 65px !important;
    display: flex !important;
    align-items: center !important;
}

#sp-header .row {
    width: 100% !important;
    margin: 0 !important;
    align-items: center !important;
}

/* Container adjustments for better spacing */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* === MENU BASE STYLING === */
#sp-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sp-megamenu-parent {
    margin: 0;
    padding: 0;
}

/* === DESKTOP LARGE (1200px+) === */
@media (min-width: 1200px) {
    #sp-logo {
        justify-content: flex-start !important;
        padding-left: 30px !important;
    }
}

/* === DESKTOP MEDIUM (992px - 1199px) === */
@media (max-width: 1199px) and (min-width: 992px) {
    #sp-logo {
        flex: 0 0 35% !important;
        max-width: 35% !important;
        justify-content: flex-start !important;
        padding-left: 20px !important;
    }
    
    #sp-menu {
        flex: 0 0 65% !important;
        max-width: 65% !important;
    }
    
    .sp-megamenu-parent li {
        padding: 0 6px !important;
    }
    
    .sp-megamenu-parent li a {
        font-size: 13px !important;
        padding: 10px 6px !important;
    }
}

/* === TABLET LANDSCAPE (768px - 1023px) === */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Hide desktop menu and show mobile hamburger */
    .sp-megamenu-parent {
        display: none !important;
    }
    
    #offcanvas-toggler {
        display: block !important;
    }
    
    #sp-logo {
        flex: 0 0 70% !important;
        max-width: 70% !important;
        justify-content: center !important;
    }
    
    #sp-logo .logo img {
        max-height: 65px !important;
    }
    
    #sp-menu {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        justify-content: flex-end !important;
    }
}

/* === MOBILE BREAKPOINT (1024px) === */
@media (max-width: 1024px) {
    .sp-megamenu-parent {
        display: none !important;
    }
    
    #offcanvas-toggler {
        display: block !important;
    }
}

/* === TABLET PORTRAIT (768px - 991px) === */
@media (max-width: 991px) and (min-width: 768px) {
    #sp-logo {
        flex: 0 0 70% !important;
        max-width: 70% !important;
        justify-content: center !important;
    }
    
    #sp-logo .logo img {
        max-height: 60px !important;
    }
    
    #sp-menu {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        justify-content: flex-end !important;
        display: flex !important;
        align-items: center !important;
    }
    
    #offcanvas-toggler {
        font-size: 26px !important;
        padding: 15px !important;
        color: #333 !important;
    }
}

/* === MOBILE PORTRAIT (767px e sotto) === */
@media (max-width: 767px) {
    #sp-logo {
        flex: 0 0 70% !important;
        max-width: 70% !important;
        justify-content: center !important;
    }
    
    #sp-logo .logo img {
        max-height: 55px !important;
    }
    
    #sp-menu {
        flex: 0 0 30% !important;
        max-width: 30% !important;
        text-align: right !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }
    
    #offcanvas-toggler {
        font-size: 28px !important;
        padding: 15px !important;
        color: #333 !important;
        display: block !important;
    }
    
    /* Forza visualizzazione logo mobile */
    #sp-logo .sp-default-logo.d-block.d-lg-none,
    #sp-logo .logo .sp-default-logo.d-block.d-lg-none {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Assicura che il logo sia sempre visibile */
    #sp-logo .logo {
        display: block !important;
    }
    
    #sp-logo .logo img {
        display: block !important;
        visibility: visible !important;
    }
}

/* === MOBILE LANDSCAPE E PICCOLI SCHERMI (480px e sotto) === */
@media (max-width: 480px) {
    #sp-logo .logo img {
        max-height: 50px !important;
    }
    
    #sp-header {
        min-height: 70px !important;
    }
    
    #sp-logo {
        height: 70px !important;
        flex: 0 0 75% !important;
        max-width: 75% !important;
    }
    
    #sp-menu {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
    
    #offcanvas-toggler {
        font-size: 24px !important;
        padding: 10px !important;
    }
}

/* === EXTRA SMALL SCREENS (360px e sotto) === */
@media (max-width: 360px) {
    #sp-logo .logo img {
        max-height: 45px !important;
    }
    
    #sp-header {
        min-height: 65px !important;
    }
    
    #sp-logo {
        height: 65px !important;
    }
}

/* === FIX SPECIFICI HELIX 3 === */

/* Fix per sticky header */
#sp-header-sticky-wrapper {
    height: auto !important;
}

/* Fix per overflow nascosti */
#sp-header .row {
    overflow: visible !important;
}

/* Fix per z-index menu */
.sp-dropdown {
    z-index: 9999 !important;
}

/* Fix per allineamento verticale generale */
#sp-header * {
    box-sizing: border-box !important;
}

/* === OTTIMIZZAZIONI PERFORMANCE === */

/* Accelerazione hardware per transizioni fluide */
#sp-logo,
#sp-menu,
#offcanvas-toggler {
    transform: translateZ(0);
    backface-visibility: hidden;
}


/* ================================
   WHATSAPP CHAT UI ESSENZIALE
   ================================ */

/* === CONTAINER PRINCIPALE === */
.popup-top {
    background: #25cc63 !important;
    padding-left: 0 !important;           /* No padding, useremo il margin della foto */
    padding-right: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-shadow: none !important;
    position: relative !important;
    min-height: 80px !important;
    overflow: visible !important;
    pointer-events: auto !important;
    animation: fadeInUp 0.3s ease-out !important;
}

/* Header WhatsApp decorativo */
.popup-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #4988C0 0%, #133b5e 50%, #144b7b 100%);
    z-index: 1;
    pointer-events: none !important;
}

/* === FOTO OPERATORE (sempre tonda e allineata) === */
.whatsappchat .popup-section .popup .popuptext .popup-box .popup-top .image img {
    max-width: 60px!important;
}
.popup-top .image {
    width: 60px !important;
    height: 60px !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    margin: 12px 0 12px 16px !important; /* Spazio tra bordo e foto */
    position: relative !important;
    z-index: 2 !important;
    pointer-events: auto !important;
    display: block !important;
    background: #fff;
}
.popup-top .image img {
    width: 60px !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
}

/* Badge online: rimosso */
.popup-top .image::after {
    display: none !important;
}

/* === NOME, LABEL E INFO === */
.popup-top .content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding: 12px 8px 12px 12px !important;
    pointer-events: auto !important;
}
.popup-top .content .name {
    font-size: 16px !important;
    z-index: 3;
    font-weight: 500 !important;
    color: #ffffff !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
    pointer-events: auto !important;
}
.popup-top .content .label {
    background: rgb(21, 77, 174) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    display: inline-block !important;
    max-width: fit-content !important;
    backdrop-filter: blur(8px) !important;
    border: none !important;
    text-shadow: none !important;
    margin-top: 15px !important;
    pointer-events: auto !important;
}
.popup-top .content::after {
    display: none !important;
}

/* === PULSANTE CHIUDI === */
.popup-top .close_pop_wtc {
    background: transparent !important;
    border-radius: 0 !important;
    width: 48px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    z-index: 10 !important;
}
.popup-top .close_pop_wtc:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
.popup-top .close_pop_wtc svg {
    width: 18px !important;
    height: 18px !important;
    transition: all 0.2s ease !important;
    pointer-events: none !important;
}
.popup-top .close_pop_wtc svg circle {
    fill: transparent !important;
}
.popup-top .close_pop_wtc svg path {
    fill: #000000 !important;
}
.popup-top .close_pop_wtc:hover svg path {
    fill: #ffffff !important;
}

/* === BUTTON PRINCIPALE CHATTA CON NOI === */
.help_btn_116 {
    font-size: 20px !important;
    font-weight: 500 !important;
}

.whatsappchat img.is-analytics {
    display: inline-block;
    padding-right: 10px;
    max-width: 34px !important;
}

/* === RESPONSIVE === 
@media (max-width: 768px) {
    .popup-top .image {
        width: 50px !important;
        height: 50px !important;
        margin: 10px 0 10px 8px !important;
    }
    .popup-top .image img {
        width: 100% !important;
        height: 100% !important;
    }
    .popup-top .content {
        padding: 10px 6px 10px 10px !important;
    }
    .popup-top .content .name {
        font-size: 15px !important;
    }
    .popup-top .content .label {
        font-size: 10px !important;
    }
    .popup-top .close_pop_wtc {
        width: 44px !important;
        height: 56px !important;
        z-index: 10 !important;
    }
    .popup-top .close_pop_wtc svg {
        width: 16px !important;
        height: 16px !important;
    }
}*/

/* === ANIMAZIONE === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
