/*
 * Public Footer — Footer compatto unico Caritas
 * Versione 5
 */

.caritas-site-footer,
body.path-frontpage .caritas-site-footer {
  width: 100%;
  margin: 0;
  background:
    linear-gradient(135deg, #7b0500 0%, #8f0802 54%, #7b0500 100%);
  color: #ffffff;
  padding: 1.2rem 0 0.75rem;
  overflow: hidden;
}

.caritas-site-footer__inner {
  width: min(880px, calc(100vw - 48px));
  margin-inline: auto;
}

.caritas-site-footer__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0.8rem;
  align-items: stretch;
}

.caritas-site-footer__col {
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.085);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.caritas-site-footer__col h2 {
  margin: 0 0 0.55rem;
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.caritas-site-footer__col p {
  margin: 0 0 0.38rem;
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.9rem;
  line-height: 1.38;
}

.caritas-site-footer__col p:last-child {
  margin-bottom: 0;
}

.caritas-site-footer__col ul {
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.caritas-site-footer a,
.caritas-site-footer a:visited {
  color: #ffffff;
  font-weight: 850;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.2em;
}

.caritas-site-footer a:hover {
  text-decoration-color: #ffffff;
}

.caritas-site-footer__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.15rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  color: #7b0500 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.caritas-site-footer__drupal-region {
  margin-top: 0.7rem;
}

.caritas-site-footer__bottom {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

/* Compatibilità: se in home esiste un vecchio footer con classi diverse, lo riduciamo comunque. */
body.path-frontpage footer[role="contentinfo"]:not(.caritas-site-footer),
body.path-frontpage .site-footer:not(.caritas-site-footer),
body.path-frontpage .caritas-home-footer:not(.caritas-site-footer) {
  padding: 1.2rem 0 0.75rem !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  min-height: 0 !important;
}

@media (max-width: 860px) {
  .caritas-site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .caritas-site-footer__inner {
    width: min(100% - 28px, 880px);
  }

  .caritas-site-footer {
    padding-top: 1rem;
  }

  .caritas-site-footer__col {
    padding: 0.85rem;
  }
}

/* =========================================================
   V24 — Blocco finale footer unico
   Il footer deve restare sempre dentro la fascia rossa, in home e nelle pagine interne.
   ========================================================= */
html body .caritas-site-footer {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 1.15rem 0 0.75rem !important;
  background: linear-gradient(135deg, #7b0500 0%, #8f0802 54%, #7b0500 100%) !important;
  color: #ffffff !important;
  position: relative !important;
  z-index: 5 !important;
  overflow: hidden !important;
}

html body .caritas-site-footer__inner {
  width: min(880px, calc(100vw - 48px)) !important;
  margin: 0 auto !important;
}

html body .caritas-site-footer__grid {
  display: grid !important;
  grid-template-columns: 1.25fr 1fr 1fr !important;
  gap: 0.8rem !important;
}

html body .caritas-site-footer__button,
html body .caritas-site-footer__button:link,
html body .caritas-site-footer__button:visited {
  background: #ffffff !important;
  color: #7b0500 !important;
  text-decoration: none !important;
}

@media (max-width: 860px) {
  html body .caritas-site-footer__grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   V25 — Footer istituzionale aggiornato
   ========================================================= */
html body .caritas-site-footer__inner {
  width: min(1180px, calc(100vw - 48px)) !important;
}

html body .caritas-site-footer__brandline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 0 0.9rem !important;
  padding: 0.95rem 1rem !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
}

html body .caritas-site-footer__brandline strong {
  display: block !important;
  color: #ffffff !important;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem) !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
  letter-spacing: -0.025em !important;
}

html body .caritas-site-footer__brandline span {
  display: block !important;
  margin-top: 0.22rem !important;
  color: rgba(255, 255, 255, 0.84) !important;
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
}

html body .caritas-site-footer__col {
  min-height: 100% !important;
}

html body .caritas-site-footer__cta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.65rem !important;
  margin-top: 0.85rem !important;
}

html body .caritas-site-footer__button--ghost,
html body .caritas-site-footer__button--ghost:link,
html body .caritas-site-footer__button--ghost:visited {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

@media (max-width: 640px) {
  html body .caritas-site-footer__inner {
    width: min(100% - 28px, 1180px) !important;
  }

  html body .caritas-site-footer__brandline {
    padding: 0.85rem !important;
  }
}

