/* =========================================================
   FOOTER — linea Privacy / Cookie / Modifica consenso
   ========================================================= */

.footer-legal-line {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  text-align: center !important;
  width: 100% !important;
}

.footer-legal-line .elementor-widget {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.footer-legal-line p {
  margin: 0 !important;
  padding: 0 !important;
}

.footer-legal-line,
.footer-legal-line * {
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #ffffff !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}

.footer-legal-line a,
.footer-legal-line button,
.footer-legal-line .cn-revoke-cookie {
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #ffffff !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  text-transform: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
}

.footer-legal-line a:hover,
.footer-legal-line button:hover,
.footer-legal-line .cn-revoke-cookie:hover {
  text-decoration: underline !important;
  background: transparent !important;
  color: #ffffff !important;
}

@media (max-width: 767px) {
  .footer-legal-line {
    flex-wrap: wrap !important;
    gap: 4px !important;
    padding: 0 20px !important;
  }
}


/* =========================================================
   RIMOZIONE AREA COMMENTI INDESIDERATA DALLE PAGINE
   ========================================================= */

/* Nasconde ogni possibile area commenti su pagine statiche */
body.page #comments,
body.page .comments-area,
body.page .comment-respond,
body.page #respond,
body.page .comment-form,
body.page .comment-reply-title,
body.page .comments-title,
body.page .comment-list,
body.page .comment-navigation,
body.page .wp-block-comments,
body.page .wp-block-comments-title,
body.page .wp-block-post-comments,
body.page .wp-block-post-comments-form,
body.page .jetpack-comment-form,
body.page #jp-post-flair,
body.page .sharedaddy,
body.page .sd-sharing-enabled {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Nasconde eventuali aree commenti anche se il tema non assegna body.page */
#comments,
.comments-area,
.comment-respond,
#respond,
.comment-form,
.wp-block-comments,
.wp-block-post-comments,
.wp-block-post-comments-form,
.jetpack-comment-form {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}


/* =========================================================
   RIMOZIONE SPAZI BIANCHI RESIDUI PRIMA / DOPO IL FOOTER
   ========================================================= */

body.page main,
body.page .site-main,
body.page .wp-site-blocks,
body.page .entry-content,
body.page .post-content,
body.page .elementor,
body.page .elementor-location-footer {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Riduce eventuali spazi creati da contenitori vuoti */
body.page .entry-footer,
body.page .post-navigation,
body.page .navigation,
body.page .nav-links {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Evita barra bianca finale sotto il footer */
html,
body {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body > div:last-child:empty,
body > section:last-child:empty {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}