/*
 * Homepage pubblica a fasce
 * Tema: Caritas Custom
 * Scopo: layout e stile specifico della homepage pubblica.
 * Questo file lavora insieme a design-system.css.
 */

/* ==========================================================================
   1. Struttura generale homepage pubblica
   ========================================================================== */

.caritas-public-home {
  background: #ffffff;
  color: var(--caritas-text);
}

.caritas-front-main {
  overflow: hidden;
}

.caritas-public-band {
  position: relative;
  padding: var(--caritas-section-space) 0;
}

.caritas-public-band + .caritas-public-band {
  margin-top: 0;
}

/* ==========================================================================
   2. Fascia 1 — Accessi principali
   ========================================================================== */

.caritas-public-band--primary-access {
  background: #ffffff;
  padding-top: 76px;
  padding-bottom: 76px;
}

/* ==========================================================================
   3. Fascia 2 — I numeri della Caritas
   ========================================================================== */

.caritas-public-band--numbers {
  background: #ffffff;
  padding-top: 86px;
  padding-bottom: 86px;
}

.caritas-impact-panel {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.4rem);
  border-radius: 36px;
  background:
    radial-gradient(circle at 100% 0%, rgba(123, 5, 0, 0.07) 0%, rgba(123, 5, 0, 0) 34%),
    radial-gradient(circle at 0% 100%, rgba(123, 5, 0, 0.05) 0%, rgba(123, 5, 0, 0) 32%),
    linear-gradient(180deg, #fffdfb 0%, #ffffff 100%);
  border: 1px solid rgba(123, 5, 0, 0.10);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.caritas-impact-panel::before {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(123, 5, 0, 0.055);
}

.caritas-impact-panel::after {
  content: "";
  position: absolute;
  left: -80px;
  bottom: -105px;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(123, 5, 0, 0.045);
}

.caritas-impact-panel__head,
.caritas-impact-panel__body {
  position: relative;
  z-index: 1;
}

.caritas-impact-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: end;
  margin-bottom: 34px;
}

.caritas-impact-panel__intro {
  max-width: 720px;
}

.caritas-impact-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: rgba(123, 5, 0, 0.08);
  color: var(--caritas-red);
  border: 1px solid rgba(123, 5, 0, 0.14);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.caritas-impact-panel__title {
  max-width: 760px;
  margin: 0;
  color: var(--caritas-text);
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.065em;
}

.caritas-impact-panel__title::after {
  content: "";
  display: block;
  width: 96px;
  height: 5px;
  margin-top: 1.05rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--caritas-red) 0%,
    #a30d06 70%,
    #c34036 100%
  );
}

.caritas-impact-panel__subtitle {
  max-width: 660px;
  margin: 1.05rem 0 0;
  color: #4b5563;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.7;
  font-weight: 500;
}

.caritas-impact-panel__note {
  position: relative;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(123, 5, 0, 0.10);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.caritas-impact-panel__note::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    var(--caritas-red) 0%,
    #a30d06 100%
  );
}

.caritas-impact-panel__note p {
  margin: 0;
  color: #374151;
  font-size: 1.02rem;
  line-height: 1.65;
  font-weight: 650;
}

.caritas-impact-panel__typing {
  min-height: 5.1em;
}

.caritas-impact-panel__typing.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.6ch;
  height: 1.05em;
  margin-left: 3px;
  transform: translateY(2px);
  border-right: 2px solid var(--caritas-red);
  animation: caritasTypingCursor 780ms steps(1) infinite;
}

.caritas-impact-panel__typing.is-complete::after {
  content: none;
}

@keyframes caritasTypingCursor {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.caritas-impact-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.caritas-impact-panel__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(123, 5, 0, 0.08);
  color: var(--caritas-red);
  border: 1px solid rgba(123, 5, 0, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.caritas-impact-panel__tags span.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.caritas-home-slot--numbers {
  min-height: 120px;
}

.caritas-numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.caritas-number-card {
  position: relative;
  min-height: 218px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(145deg, #7b0500 0%, #931009 55%, #7b0500 100%);
  color: #ffffff;
  overflow: hidden;
  box-shadow:
    0 18px 36px rgba(123, 5, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.caritas-number-card:nth-child(even) {
  background:
    radial-gradient(circle at 88% 82%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(145deg, #86110b 0%, #a0120b 58%, #7b0500 100%);
}

.caritas-number-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.20) 0%,
    rgba(255, 255, 255, 0.45) 48%,
    rgba(255, 255, 255, 0.16) 100%
  );
  opacity: 1;
}

.caritas-number-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 145px;
  height: 145px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  z-index: -1;
}

.caritas-number-card__value {
  position: relative;
  z-index: 1;
  display: block;
  color: #ffffff;
  font-size: clamp(2rem, 3.35vw, 3.35rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.045em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  margin-bottom: 0.85rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.caritas-number-card__label {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0;
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 850;
}

.caritas-number-card__text {
  position: relative;
  z-index: 1;
  max-width: 330px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ==========================================================================
   4. Fascia 3 — News e aggiornamenti
   ========================================================================== */

.caritas-public-band--news {
  background: #ffffff;
}

.caritas-home-slot--news {
  min-height: 120px;
}

.caritas-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.caritas-news-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid var(--caritas-border);
  border-radius: var(--caritas-radius-md);
  box-shadow: var(--caritas-shadow-soft);
  overflow: hidden;
}

.caritas-news-card__image {
  aspect-ratio: 16 / 9;
  background: var(--caritas-bg-soft);
  overflow: hidden;
}

.caritas-news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caritas-news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.caritas-news-card__date {
  margin-bottom: 10px;
  color: var(--caritas-red);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.caritas-news-card__title {
  margin: 0;
  color: var(--caritas-text);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 850;
}

.caritas-news-card__text {
  margin: 12px 0 0;
  color: var(--caritas-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.caritas-news-card__footer {
  margin-top: auto;
  padding-top: 18px;
}

/* ==========================================================================
   5. Fascia 4 — Dove siamo / Mappa
   ========================================================================== */

.caritas-public-band--map {
  background: #ffffff;
}

.caritas-home-slot--map {
  min-height: 180px;
}

.caritas-map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--caritas-border);
  border-radius: var(--caritas-radius-lg);
  box-shadow: var(--caritas-shadow-soft);
  overflow: hidden;
}

.caritas-map-panel__map {
  min-height: 360px;
  background: var(--caritas-bg-soft);
}

.caritas-map-panel__info {
  padding: 34px;
}

.caritas-map-panel__label {
  display: block;
  color: var(--caritas-red);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.caritas-map-panel__value {
  display: block;
  margin-top: 4px;
  color: var(--caritas-text);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
}

.caritas-map-panel__actions {
  margin-top: 24px;
}

/* ==========================================================================
   6. Footer pubblico
   ========================================================================== */

.caritas-public-footer {
  padding: 48px 0;
  background: var(--caritas-red);
  color: #ffffff;
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .caritas-impact-panel__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .caritas-impact-panel__note {
    max-width: 680px;
  }

  .caritas-numbers-grid,
  .caritas-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caritas-map-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .caritas-public-band--primary-access,
  .caritas-public-band--numbers {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .caritas-impact-panel {
    padding: 1.45rem;
    border-radius: 28px;
  }

  .caritas-impact-panel__title {
    font-size: clamp(2.3rem, 12vw, 3.4rem);
  }

  .caritas-impact-panel__note {
    padding: 22px;
    border-radius: 22px;
  }

  .caritas-impact-panel__typing {
    min-height: 6.2em;
  }

  .caritas-numbers-grid,
  .caritas-news-grid {
    grid-template-columns: 1fr;
  }

  .caritas-number-card {
    min-height: 190px;
    padding: 24px;
  }

  .caritas-number-card__value {
    font-size: clamp(2.4rem, 14vw, 3.3rem);
  }

  .caritas-map-panel__info {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caritas-impact-panel__typing.is-typing::after {
    animation: none;
  }

  .caritas-impact-panel__tags span {
    transition: none;
  }
}

/* =========================================================
   V22 — WATERMARK CARITAS SU TUTTO IL SITO
   Modifica chirurgica: rende visibile caritas-watermark.png
   su home e pagine interne senza toccare layout, card, form,
   footer o menu.
   ========================================================= */

html body .caritas-public-wrapper::before,
html body .caritas-front-page::before {
  display: none !important;
  content: none !important;
}

html body .caritas-front-main,
html body:not(.path-frontpage) .caritas-public-main {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  background: #ffffff !important;
}

html body .caritas-front-main::after,
html body:not(.path-frontpage) .caritas-public-main::after {
  content: "" !important;
  display: block !important;
  position: fixed !important;
  right: clamp(-260px, -10vw, -120px) !important;
  top: 36vh !important;
  width: clamp(600px, 55vw, 1000px) !important;
  height: clamp(600px, 55vw, 1000px) !important;
  background-image: url("../images/caritas-watermark.png") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: contain !important;
  opacity: 0.16 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

html body .caritas-front-main > *,
html body:not(.path-frontpage) .caritas-public-main > *,
html body .caritas-home-section > .caritas-container,
html body .caritas-public-band > .caritas-container,
html body .caritas-page-shell {
  position: relative !important;
  z-index: 2 !important;
}

html body .caritas-site-header {
  z-index: 999900 !important;
}

@media (max-width: 760px) {
  html body .caritas-front-main::after,
  html body:not(.path-frontpage) .caritas-public-main::after {
    right: -235px !important;
    top: 45vh !important;
    width: 410px !important;
    height: 410px !important;
    opacity: 0.10 !important;
  }
}

/* =========================================================
   V28 — HOME IN EVIDENZA: ripristino estetica pulita
   Obiettivo:
   - NON toccare la prima fascia;
   - mantenere il mosaico pulito visto prima della V26/V27;
   - aggiungere solo una barra editoriale sopra le card;
   - nessun bordo/pannello esterno attorno al mosaico;
   - 5 card in home: 1 grande + 1 normale + 3 normali.
   ========================================================= */

/* Fascia In evidenza: più compatta, senza intestazione classica sopra. */
html body.path-frontpage .caritas-public-band--featured,
html body.path-frontpage .caritas-home-section--featured {
  padding-top: 42px !important;
  padding-bottom: 56px !important;
  background: transparent !important;
}

/* La regione tecnica Home News non deve aggiungere margini strani. */
html body.path-frontpage .caritas-home-slot--featured,
html body.path-frontpage .caritas-home-slot--news.caritas-home-slot--featured {
  margin-top: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Nasconde titoli tecnici del blocco/vista e form esposti. */
html body.path-frontpage .caritas-home-slot--featured > h2,
html body.path-frontpage .caritas-home-slot--featured .block__title,
html body.path-frontpage .caritas-home-slot--featured .views-exposed-form,
html body.path-frontpage .caritas-home-slot--news.caritas-home-slot--featured > h2,
html body.path-frontpage .caritas-home-slot--news.caritas-home-slot--featured .block__title,
html body.path-frontpage .caritas-home-slot--news.caritas-home-slot--featured .views-exposed-form {
  display: none !important;
}

/* Barra editoriale moderna, semplice: niente pannelli, niente bordi attorno alle card. */
html body.path-frontpage .caritas-featured-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 0 18px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

html body.path-frontpage .caritas-featured-strip__title {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: clamp(1.18rem, 1.5vw, 1.6rem) !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -0.025em !important;
}

html body.path-frontpage .caritas-featured-strip__link,
html body.path-frontpage .caritas-featured-strip__link:visited {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

html body.path-frontpage .caritas-featured-strip__link:hover,
html body.path-frontpage .caritas-featured-strip__link:focus {
  color: #ffffff !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
}

/* Mosaico: riprende l'estetica pulita precedente, senza contenitore/bordo esterno. */
html body.path-frontpage .caritas-home-featured-view .view-content,
html body.path-frontpage .caritas-home-slot--featured .view-content,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .view-content {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row,
html body.path-frontpage .caritas-home-slot--featured .views-row,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row {
  position: relative !important;
  min-height: 320px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: #7b0500 !important;
  box-shadow: 0 22px 46px rgba(17, 24, 39, 0.16) !important;
  isolation: isolate !important;
  border: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Prima card larga due colonne: effetto editoriale come nello screenshot riuscito. */
html body.path-frontpage .caritas-home-featured-view .views-row:first-child,
html body.path-frontpage .caritas-home-slot--featured .views-row:first-child,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child {
  grid-column: span 2 !important;
}

/* Sicurezza: anche se la Vista torna a 6 elementi, in home si vedono solo 5. */
html body.path-frontpage .caritas-home-featured-view .views-row:nth-child(n+6),
html body.path-frontpage .caritas-home-slot--featured .views-row:nth-child(n+6),
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:nth-child(n+6) {
  display: none !important;
}

/* Immagine piena card. Include anche casi con link/picture generati da Drupal. */
html body.path-frontpage .caritas-home-featured-view .views-field-field-immagine-di-copertina,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-immagine-di-copertina,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-immagine-di-copertina {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-field-immagine-di-copertina .field-content,
html body.path-frontpage .caritas-home-featured-view .views-field-field-immagine-di-copertina a,
html body.path-frontpage .caritas-home-featured-view .views-field-field-immagine-di-copertina picture,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-immagine-di-copertina .field-content,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-immagine-di-copertina a,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-immagine-di-copertina picture,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-immagine-di-copertina .field-content,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-immagine-di-copertina a,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-immagine-di-copertina picture {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-field-immagine-di-copertina img,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-immagine-di-copertina img,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-immagine-di-copertina img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  transform: scale(1.01) !important;
  transition: transform 420ms ease !important;
}

/* Overlay elegante: nessun bordo, solo leggibilità del testo. */
html body.path-frontpage .caritas-home-featured-view .views-row::after,
html body.path-frontpage .caritas-home-slot--featured .views-row::after,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.34) 45%,
    rgba(0, 0, 0, 0.78) 100%
  ) !important;
  pointer-events: none !important;
}

/* Campi testuali: stessa impostazione della versione riuscita. */
html body.path-frontpage .caritas-home-featured-view .views-field-field-tipologia,
html body.path-frontpage .caritas-home-featured-view .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-featured-view .views-field-title,
html body.path-frontpage .caritas-home-featured-view .views-field-field-testo-breve,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--featured .views-field-title,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-testo-breve,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-title,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-testo-breve {
  position: relative !important;
  z-index: 3 !important;
  margin-left: 1.45rem !important;
  margin-right: 1.45rem !important;
  color: #ffffff !important;
}

/* Spinge i testi in basso come prima, senza usare un pannello/card interna. */
html body.path-frontpage .caritas-home-featured-view .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-tipologia {
  display: inline-flex !important;
  width: auto !important;
  margin-top: 11.5rem !important;
  margin-bottom: 0 !important;
  padding: 0.38rem 0.7rem !important;
  border-radius: 999px !important;
  background: rgba(216, 154, 29, 0.92) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia {
  margin-top: 12.5rem !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-data-pubblicazione {
  margin-top: 0.85rem !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-title,
html body.path-frontpage .caritas-home-slot--featured .views-field-title,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-title {
  margin-top: 0.35rem !important;
  max-width: 92% !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-title a,
html body.path-frontpage .caritas-home-slot--featured .views-field-title a,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-title a {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: clamp(1.35rem, 2vw, 2rem) !important;
  line-height: 1.08 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-title a,
html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-title a,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-title a {
  font-size: clamp(1.6rem, 2.5vw, 2.45rem) !important;
}

html body.path-frontpage .caritas-home-featured-view .views-field-field-testo-breve,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-testo-breve,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-testo-breve {
  margin-top: 0.75rem !important;
  margin-bottom: 1.45rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.98rem !important;
  line-height: 1.45 !important;
  max-width: 92% !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row:hover img,
html body.path-frontpage .caritas-home-slot--featured .views-row:hover img,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:hover img {
  transform: scale(1.07) !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row:hover,
html body.path-frontpage .caritas-home-slot--featured .views-row:hover,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:hover {
  box-shadow: 0 28px 58px rgba(17, 24, 39, 0.24) !important;
}

@media (max-width: 980px) {
  html body.path-frontpage .caritas-home-featured-view .view-content,
  html body.path-frontpage .caritas-home-slot--featured .view-content,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .view-content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body.path-frontpage .caritas-home-featured-view .views-row:first-child,
  html body.path-frontpage .caritas-home-slot--featured .views-row:first-child,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child {
    grid-column: span 2 !important;
  }
}

@media (max-width: 640px) {
  html body.path-frontpage .caritas-public-band--featured,
  html body.path-frontpage .caritas-home-section--featured {
    padding-top: 34px !important;
    padding-bottom: 40px !important;
  }

  html body.path-frontpage .caritas-featured-strip {
    min-height: 46px !important;
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  html body.path-frontpage .caritas-home-featured-view .view-content,
  html body.path-frontpage .caritas-home-slot--featured .view-content,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .view-content {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  html body.path-frontpage .caritas-home-featured-view .views-row,
  html body.path-frontpage .caritas-home-slot--featured .views-row,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row,
  html body.path-frontpage .caritas-home-featured-view .views-row:first-child,
  html body.path-frontpage .caritas-home-slot--featured .views-row:first-child,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child {
    grid-column: span 1 !important;
    min-height: 310px !important;
  }

  html body.path-frontpage .caritas-home-featured-view .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--featured .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia {
    margin-top: 10.5rem !important;
  }
}
/* =========================================================
   FIX MINIMO — Spegne watermark duplicato in homepage
   Il watermark valido resta quello globale in design-system.css
   ========================================================= */

html body.path-frontpage .caritas-front-main::before,
html body.path-frontpage .caritas-front-main::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}
/* =========================================================
   FIX MINIMO — Barra “In evidenza”
   Tocca solo la barra superiore, NON il mosaico sottostante.
   ========================================================= */

html body.path-frontpage .caritas-featured-strip {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  width: 100% !important;
  min-height: 60px !important;
  margin: 0 0 22px !important;
  padding: 14px 18px 14px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(123, 5, 0, 0.14) !important;
  background:
    linear-gradient(
      135deg,
      rgba(123, 5, 0, 0.08) 0%,
      rgba(255, 255, 255, 0.98) 44%,
      rgba(15, 139, 141, 0.06) 100%
    ) !important;
  color: #111827 !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.07) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-featured-strip::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 7px !important;
  background: #7b0500 !important;
}

html body.path-frontpage .caritas-featured-strip::after {
  content: "" !important;
  position: absolute !important;
  right: -60px !important;
  top: -80px !important;
  width: 190px !important;
  height: 190px !important;
  border-radius: 999px !important;
  background: rgba(123, 5, 0, 0.045) !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-featured-strip__title {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  color: #7b0500 !important;
  font-size: clamp(1.25rem, 1.6vw, 1.7rem) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
}

html body.path-frontpage .caritas-featured-strip__link,
html body.path-frontpage .caritas-featured-strip__link:visited {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0.66rem 1rem !important;
  border-radius: 999px !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 24px rgba(123, 5, 0, 0.18) !important;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease !important;
}

html body.path-frontpage .caritas-featured-strip__link:hover,
html body.path-frontpage .caritas-featured-strip__link:focus {
  background: #5f0300 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 13px 28px rgba(123, 5, 0, 0.22) !important;
}

@media (max-width: 640px) {
  html body.path-frontpage .caritas-featured-strip {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px 16px 16px 22px !important;
    border-radius: 20px !important;
  }

  html body.path-frontpage .caritas-featured-strip__link {
    width: 100% !important;
  }
}
/* =========================================================
   FIX MINIMO — Barra “Dove siamo”
   Sostituisce il vecchio header testuale della fascia mappa
   ========================================================= */

html body.path-frontpage .caritas-map-strip {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  width: 100% !important;
  min-height: 60px !important;
  margin: 0 0 22px !important;
  padding: 14px 18px 14px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(123, 5, 0, 0.14) !important;
  background:
    linear-gradient(
      135deg,
      rgba(123, 5, 0, 0.08) 0%,
      rgba(255, 255, 255, 0.98) 44%,
      rgba(15, 139, 141, 0.06) 100%
    ) !important;
  color: #111827 !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.07) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-map-strip::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 7px !important;
  background: #7b0500 !important;
}

html body.path-frontpage .caritas-map-strip::after {
  content: "" !important;
  position: absolute !important;
  right: -60px !important;
  top: -80px !important;
  width: 190px !important;
  height: 190px !important;
  border-radius: 999px !important;
  background: rgba(123, 5, 0, 0.045) !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-map-strip__title {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  color: #7b0500 !important;
  font-size: clamp(1.25rem, 1.6vw, 1.7rem) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
}

html body.path-frontpage .caritas-map-strip__link,
html body.path-frontpage .caritas-map-strip__link:visited {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0.66rem 1rem !important;
  border-radius: 999px !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 24px rgba(123, 5, 0, 0.18) !important;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease !important;
}

html body.path-frontpage .caritas-map-strip__link:hover,
html body.path-frontpage .caritas-map-strip__link:focus {
  background: #5f0300 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 13px 28px rgba(123, 5, 0, 0.22) !important;
}

@media (max-width: 640px) {
  html body.path-frontpage .caritas-map-strip {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px 16px 16px 22px !important;
    border-radius: 20px !important;
  }

  html body.path-frontpage .caritas-map-strip__link {
    width: 100% !important;
  }
}

/* =========================================================
   FIX — Colori definitivi badge "I numeri della Caritas"
   ========================================================= */

html body.path-frontpage .caritas-impact-panel__eyebrow {
  background: #7b0500 !important;
  color: #ffffff !important;
  border-color: #7b0500 !important;
  box-shadow: 0 10px 22px rgba(123, 5, 0, 0.14) !important;
}

html body.path-frontpage .caritas-impact-panel__tags span {
  color: #ffffff !important;
  border-color: transparent !important;
}

html body.path-frontpage .caritas-impact-panel__tags span:nth-child(1) {
  background: #7b0500 !important;
}

html body.path-frontpage .caritas-impact-panel__tags span:nth-child(2) {
  background: #d89a1d !important;
}

html body.path-frontpage .caritas-impact-panel__tags span:nth-child(3) {
  background: #0f8b8d !important;
}

/* =========================================================
   V51 — Prima fascia homepage: struttura pulita e compatta
   NOTA:
   - Sostituisce le prove V46/V47/V48/V49/V50.
   - Lavora sulla fascia "Partecipa alla vita della Caritas".
   - Non tocca "I numeri della Caritas", "In evidenza" e "Dove siamo".
   ========================================================= */

/* Sezione generale */
html body.path-frontpage .caritas-public-band--primary-access {
  padding-top: clamp(2.2rem, 4vw, 3.4rem) !important;
  padding-bottom: clamp(2.4rem, 4vw, 3.6rem) !important;
  background: #ffffff !important;
}

/* Contenitore della prima fascia: niente buchi verticali */
html body.path-frontpage .caritas-public-band--primary-access > .caritas-container {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: start !important;
}

/* Barra superiore coerente con "In evidenza" e "Dove siamo" */
html body.path-frontpage .caritas-primary-access-strip {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 60px !important;
  margin: 0 !important;
  padding: 14px 18px 14px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(123, 5, 0, 0.14) !important;
  background:
    linear-gradient(
      135deg,
      rgba(123, 5, 0, 0.08) 0%,
      rgba(255, 255, 255, 0.98) 44%,
      rgba(15, 139, 141, 0.06) 100%
    ) !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.07) !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-primary-access-strip::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 7px !important;
  background: #7b0500 !important;
}

html body.path-frontpage .caritas-primary-access-strip::after {
  content: "" !important;
  position: absolute !important;
  right: -60px !important;
  top: -80px !important;
  width: 190px !important;
  height: 190px !important;
  border-radius: 999px !important;
  background: rgba(123, 5, 0, 0.045) !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-primary-access-strip__title {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  color: #7b0500 !important;
  font-size: clamp(1.25rem, 1.6vw, 1.7rem) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
}

html body.path-frontpage .caritas-primary-access-strip__text {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0.66rem 1rem !important;
  border-radius: 999px !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 24px rgba(123, 5, 0, 0.18) !important;
}

/* Griglia delle due card */
html body.path-frontpage .caritas-primary-actions-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset blocchi Drupal dentro le card */
html body.path-frontpage .caritas-home-slot--volontariato,
html body.path-frontpage .caritas-home-slot--sostienici,
html body.path-frontpage .caritas-home-slot--volontariato .block,
html body.path-frontpage .caritas-home-slot--sostienici .block,
html body.path-frontpage .caritas-home-slot--volontariato .block-content,
html body.path-frontpage .caritas-home-slot--sostienici .block-content,
html body.path-frontpage .caritas-home-slot--volontariato .content,
html body.path-frontpage .caritas-home-slot--sostienici .content {
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}

/* Card Volontariato / Sostienici */
html body.path-frontpage .caritas-home-card {
  position: relative !important;
  display: block !important;
  min-height: 330px !important;
  height: 100% !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  background: #7b0500 !important;
  border: 1px solid rgba(123, 5, 0, 0.16) !important;
  box-shadow: 0 18px 42px rgba(16, 24, 39, 0.13) !important;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease !important;
}

html body.path-frontpage .caritas-home-card:hover,
html body.path-frontpage .caritas-home-card:focus-within {
  transform: translateY(-4px) !important;
  border-color: rgba(123, 5, 0, 0.28) !important;
  box-shadow: 0 26px 56px rgba(16, 24, 39, 0.17) !important;
}

html body.path-frontpage .caritas-home-card__image {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  margin: 0 !important;
}

html body.path-frontpage .caritas-home-card__image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  object-fit: cover !important;
  transform: scale(1.01) !important;
  transition: transform 520ms ease !important;
}

html body.path-frontpage .caritas-home-card:hover .caritas-home-card__image img {
  transform: scale(1.045) !important;
}

html body.path-frontpage .caritas-home-card__overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: block !important;
  background:
    linear-gradient(
      180deg,
      rgba(20, 20, 20, 0.03) 0%,
      rgba(123, 5, 0, 0.20) 30%,
      rgba(123, 5, 0, 0.58) 66%,
      rgba(70, 3, 0, 0.91) 100%
    ) !important;
}

html body.path-frontpage .caritas-home-card__inner {
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  min-height: 330px !important;
  height: 100% !important;
  padding: 24px !important;
  color: #ffffff !important;
}

html body.path-frontpage .caritas-home-card__label {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  display: inline-flex !important;
  width: fit-content !important;
  margin: 0 !important;
  padding: 0.52rem 0.92rem !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.01em !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22) !important;
}

html body.path-frontpage .caritas-home-slot--volontariato .caritas-home-card__label {
  background: linear-gradient(135deg, #d89a1d 0%, #b87907 100%) !important;
}

html body.path-frontpage .caritas-home-slot--sostienici .caritas-home-card__label {
  background: linear-gradient(135deg, #0f8b8d 0%, #086b6d 100%) !important;
}

html body.path-frontpage .caritas-home-card__title {
  max-width: 88% !important;
  margin: 0 0 0.55rem !important;
  color: #ffffff !important;
  font-size: clamp(2rem, 3vw, 3.25rem) !important;
  line-height: 0.96 !important;
  font-weight: 950 !important;
  letter-spacing: -0.055em !important;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.25) !important;
}

html body.path-frontpage .caritas-home-card__text {
  max-width: 86% !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.97) !important;
  font-size: 0.96rem !important;
  line-height: 1.42 !important;
  font-weight: 650 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.20) !important;
}

html body.path-frontpage .caritas-home-card__cta {
  margin-top: 0.95rem !important;
}

html body.path-frontpage .caritas-home-card__cta a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #7b0500 !important;
  text-decoration: none !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16) !important;
}

html body.path-frontpage .caritas-home-card__cta a:hover,
html body.path-frontpage .caritas-home-card__cta a:focus {
  background: #f7efed !important;
  color: #5f0300 !important;
}

/* =========================================================
   V62 — HOME AGENDA DEFINITIVA PULITA
   - sostituisce i vecchi blocchi calendario/flip;
   - fascia titolo come le altre sezioni;
   - data, mese e ora sempre visibili.
   ========================================================= */

html body.path-frontpage .caritas-home-slot--calendar,
html body.path-frontpage .caritas-home-events-strip,
html body.path-frontpage .caritas-events-panel,
html body.path-frontpage .caritas-home-events-strip__body,
html body.path-frontpage .caritas-events-panel__body,
html body.path-frontpage #caritas-calendar-list.caritas-calendar-list {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.path-frontpage .caritas-home-events-strip,
html body.path-frontpage .caritas-events-panel {
  position: relative !important;
  margin-top: clamp(34px, 5vw, 56px) !important;
  margin-bottom: clamp(34px, 5vw, 56px) !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

html body.path-frontpage .caritas-home-events-strip::before,
html body.path-frontpage .caritas-home-events-strip::after,
html body.path-frontpage .caritas-events-panel::before,
html body.path-frontpage .caritas-events-panel::after {
  content: none !important;
  display: none !important;
}

html body.path-frontpage .caritas-home-events-strip__head,
html body.path-frontpage .caritas-events-panel__head {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 60px !important;
  margin: 0 0 22px !important;
  padding: 14px 18px 14px 24px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(123, 5, 0, 0.14) !important;
  background: linear-gradient(135deg, rgba(123,5,0,.08), rgba(255,255,255,.98) 44%, rgba(15,139,141,.06)) !important;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.07) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-home-events-strip__head::before,
html body.path-frontpage .caritas-events-panel__head::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 7px !important;
  background: #7b0500 !important;
}

html body.path-frontpage .caritas-home-events-strip__head::after,
html body.path-frontpage .caritas-events-panel__head::after {
  content: "" !important;
  position: absolute !important;
  right: -60px !important;
  top: -80px !important;
  width: 190px !important;
  height: 190px !important;
  border-radius: 999px !important;
  background: rgba(123,5,0,.045) !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-home-events-strip__head > div,
html body.path-frontpage .caritas-events-panel__head > div {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

html body.path-frontpage .caritas-home-events-strip__eyebrow,
html body.path-frontpage .caritas-events-panel__eyebrow,
html body.path-frontpage .caritas-home-events-strip [class*="eyebrow"],
html body.path-frontpage .caritas-events-panel [class*="eyebrow"] {
  display: none !important;
}

html body.path-frontpage .caritas-home-events-strip__title,
html body.path-frontpage .caritas-events-panel__heading {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 0 7px !important;
  color: #7b0500 !important;
  font-size: clamp(1.25rem, 1.6vw, 1.7rem) !important;
  line-height: 1.05 !important;
  font-weight: 950 !important;
  letter-spacing: -0.035em !important;
  white-space: nowrap !important;
}

html body.path-frontpage .caritas-home-events-strip__title::after,
html body.path-frontpage .caritas-events-panel__heading::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 58px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, #7b0500 0 34%, #0f8b8d 34% 66%, #d89a1d 66%) !important;
}

html body.path-frontpage .caritas-home-events-strip__link,
html body.path-frontpage .caritas-home-events-strip__link:visited,
html body.path-frontpage .caritas-events-panel__link,
html body.path-frontpage .caritas-events-panel__link:visited {
  position: relative !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid #7b0500 !important;
  background: #7b0500 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: .84rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  box-shadow: 0 10px 24px rgba(123,5,0,.18) !important;
}

html body.path-frontpage .caritas-home-events-strip__link:hover,
html body.path-frontpage .caritas-home-events-strip__link:focus,
html body.path-frontpage .caritas-events-panel__link:hover,
html body.path-frontpage .caritas-events-panel__link:focus {
  background: #5f0300 !important;
  border-color: #5f0300 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

html body.path-frontpage .caritas-home-events-strip #caritas-calendar-list,
html body.path-frontpage .caritas-events-panel #caritas-calendar-list,
html body.path-frontpage #caritas-calendar-list.caritas-calendar-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  width: 100% !important;
}

html body.path-frontpage .caritas-calendar-card {
  --agenda-edge-color: #7b0500;
  position: relative !important;
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) 7px !important;
  align-items: stretch !important;
  min-height: 96px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  border: 1px solid rgba(123,5,0,.12) !important;
  background: linear-gradient(90deg, #fff, #fff 62%, #ffffff) !important;
  box-shadow: 0 12px 28px rgba(31,41,55,.055), 0 3px 10px rgba(123,5,0,.035) !important;
  color: inherit !important;
  text-decoration: none !important;
}

html body.path-frontpage .caritas-calendar-card:hover,
html body.path-frontpage .caritas-calendar-card:focus-visible {
  transform: translateY(-2px) !important;
  border-color: rgba(123,5,0,.22) !important;
  box-shadow: 0 18px 38px rgba(31,41,55,.085), 0 5px 16px rgba(123,5,0,.06) !important;
  outline: none !important;
}

html body.path-frontpage .caritas-calendar-card--accent-teal { --agenda-edge-color: #0f8b8d; }
html body.path-frontpage .caritas-calendar-card--accent-gold { --agenda-edge-color: #d89a1d; }
html body.path-frontpage .caritas-calendar-card--accent-red { --agenda-edge-color: #7b0500; }

html body.path-frontpage .caritas-calendar-card__date {
  position: relative !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 96px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  height: auto !important;
  padding: 10px 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: radial-gradient(circle at 18% 12%, rgba(255,255,255,.20), transparent 34%), linear-gradient(180deg, #9b0b02, #7b0500 74%, #610300) !important;
  color: #fff !important;
  box-shadow: none !important;
  text-align: center !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-calendar-card__date::before {
  content: "" !important;
  position: absolute !important;
  left: -18px !important;
  top: -24px !important;
  width: 70px !important;
  height: 70px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.13) !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-calendar-card__date::after {
  content: "" !important;
  position: absolute !important;
  inset: auto 12px 8px !important;
  height: 30px !important;
  border-radius: 999px 999px 0 0 !important;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 9px) !important;
  opacity: .24 !important;
  pointer-events: none !important;
}

html body.path-frontpage .caritas-calendar-date-face {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
  transition: none !important;
}

html body.path-frontpage .caritas-calendar-date-face--time::before,
html body.path-frontpage .caritas-calendar-date-divider {
  content: "" !important;
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 32px !important;
  height: 2px !important;
  min-height: 2px !important;
  margin: 7px 0 6px !important;
  border-radius: 999px !important;
  background: #d89a1d !important;
}

html body.path-frontpage .caritas-calendar-date-big,
html body.path-frontpage .caritas-calendar-card__day {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: 2rem !important;
  line-height: .92 !important;
  font-weight: 950 !important;
  letter-spacing: -.055em !important;
}

html body.path-frontpage .caritas-calendar-date-small,
html body.path-frontpage .caritas-calendar-card__month {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  margin: 4px 0 0 !important;
  color: rgba(255,255,255,.96) !important;
  font-size: .82rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}

html body.path-frontpage .caritas-calendar-date-face--time .caritas-calendar-date-small {
  display: none !important;
}

html body.path-frontpage .caritas-calendar-date-time,
html body.path-frontpage .caritas-calendar-date-big--time {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  margin: 0 !important;
  color: #fff !important;
  font-size: .92rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: -.025em !important;
}

html body.path-frontpage .caritas-calendar-card__content {
  position: relative !important;
  z-index: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 16px 24px 16px 22px !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-calendar-card__title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 0 6px !important;
  color: #7b0500 !important;
  font-size: clamp(1rem, 1.55vw, 1.25rem) !important;
  line-height: 1.16 !important;
  font-weight: 900 !important;
  letter-spacing: -.025em !important;
  text-decoration: none !important;
  word-break: normal !important;
  hyphens: none !important;
}

html body.path-frontpage .caritas-calendar-card__meta {
  display: block !important;
  max-width: 96% !important;
  margin: 0 !important;
  color: #0f6f71 !important;
  font-size: .9rem !important;
  line-height: 1.35 !important;
  font-weight: 620 !important;
  white-space: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

html body.path-frontpage .caritas-calendar-card__decor {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

html body.path-frontpage .caritas-calendar-card__decor span {
  display: block !important;
  height: 2px !important;
  border-radius: 999px !important;
}
html body.path-frontpage .caritas-calendar-card__decor span:nth-child(1) { width: 34px !important; background: #d89a1d !important; }
html body.path-frontpage .caritas-calendar-card__decor span:nth-child(2) { width: 14px !important; background: #0f8b8d !important; }
html body.path-frontpage .caritas-calendar-card__decor span:nth-child(3) { width: 24px !important; background: rgba(123,5,0,.25) !important; }

html body.path-frontpage .caritas-calendar-card__edge {
  width: 7px !important;
  min-height: 100% !important;
  background: linear-gradient(180deg, transparent, var(--agenda-edge-color) 16% 84%, transparent) !important;
}

html body.path-frontpage .caritas-calendar-card__time-source,
html body.path-frontpage .caritas-calendar-card__arrow {
  display: none !important;
}

@media (max-width: 980px) {
  html body.path-frontpage .caritas-calendar-card { grid-template-columns: 86px minmax(0, 1fr) 6px !important; }
  html body.path-frontpage .caritas-calendar-card__date { width: 86px !important; min-width: 86px !important; }
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-home-events-strip,
  html body.path-frontpage .caritas-events-panel { margin-top: 34px !important; margin-bottom: 34px !important; }
  html body.path-frontpage .caritas-home-events-strip__head,
  html body.path-frontpage .caritas-events-panel__head { min-height: 54px !important; padding: 13px 12px 13px 18px !important; border-radius: 18px !important; gap: 12px !important; }
  html body.path-frontpage .caritas-home-events-strip__title,
  html body.path-frontpage .caritas-events-panel__heading { font-size: 1.08rem !important; white-space: normal !important; }
  html body.path-frontpage .caritas-home-events-strip__link,
  html body.path-frontpage .caritas-events-panel__link { min-height: 34px !important; padding: 0 12px !important; font-size: .76rem !important; }
  html body.path-frontpage .caritas-calendar-card { grid-template-columns: 76px minmax(0, 1fr) 5px !important; min-height: 96px !important; border-radius: 16px !important; }
  html body.path-frontpage .caritas-calendar-card__date { width: 76px !important; min-width: 76px !important; min-height: 96px !important; padding: 9px 6px !important; }
  html body.path-frontpage .caritas-calendar-date-big,
  html body.path-frontpage .caritas-calendar-card__day { font-size: 1.55rem !important; }
  html body.path-frontpage .caritas-calendar-date-small,
  html body.path-frontpage .caritas-calendar-card__month { font-size: .68rem !important; }
  html body.path-frontpage .caritas-calendar-date-time,
  html body.path-frontpage .caritas-calendar-date-big--time { font-size: .74rem !important; }
  html body.path-frontpage .caritas-calendar-card__content { padding: 13px 12px 13px 14px !important; }
  html body.path-frontpage .caritas-calendar-card__title { font-size: .92rem !important; }
  html body.path-frontpage .caritas-calendar-card__meta { max-width: 100% !important; font-size: .78rem !important; }
}

@media (max-width: 420px) {
  html body.path-frontpage .caritas-home-events-strip__head,
  html body.path-frontpage .caritas-events-panel__head { flex-wrap: nowrap !important; }
  html body.path-frontpage .caritas-calendar-card { grid-template-columns: 70px minmax(0, 1fr) 4px !important; min-height: 94px !important; }
  html body.path-frontpage .caritas-calendar-card__date { width: 70px !important; min-width: 70px !important; }
  html body.path-frontpage .caritas-calendar-date-big,
  html body.path-frontpage .caritas-calendar-card__day { font-size: 1.42rem !important; }
  html body.path-frontpage .caritas-calendar-date-small,
  html body.path-frontpage .caritas-calendar-card__month { font-size: .62rem !important; }
  html body.path-frontpage .caritas-calendar-date-time,
  html body.path-frontpage .caritas-calendar-date-big--time { font-size: .68rem !important; }
}

/* ---------------------------------------------------------
   Dove siamo / mappa interattiva
   --------------------------------------------------------- */
html body.path-frontpage .caritas-public-band--map {
  background: #ffffff !important;
  padding-top: clamp(2.5rem, 4vw, 4rem) !important;
  padding-bottom: clamp(2.8rem, 4.5vw, 4.6rem) !important;
}

html body.path-frontpage .caritas-home-slot--map {
  min-height: 180px !important;
}

html body.path-frontpage .caritas-map-panel {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.28fr) minmax(390px, .82fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(123, 5, 0, 0.045), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #fffdfc 100%) !important;
  border: 1px solid rgba(123,5,0,.12) !important;
  border-radius: 28px !important;
  box-shadow: 0 22px 52px rgba(16,24,39,.09) !important;
  overflow: hidden !important;
  isolation: isolate !important;
}

html body.path-frontpage .caritas-map-panel::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 7px !important;
  border-radius: 28px 0 0 28px !important;
  background: #7b0500 !important;
  z-index: 5 !important;
}

html body.path-frontpage .caritas-map-panel__map {
  position: relative !important;
  min-height: 430px !important;
  background:
    linear-gradient(135deg, rgba(123,5,0,.08), rgba(15,139,141,.07)),
    #f8fafc !important;
  overflow: hidden !important;
}

html body.path-frontpage .caritas-map-panel__canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 430px !important;
  z-index: 1 !important;
}

html body.path-frontpage .caritas-map-panel__canvas .maplibregl-marker {
  z-index: 30 !important;
}

html body.path-frontpage .caritas-map-panel__canvas .maplibregl-marker svg {
  filter: drop-shadow(0 14px 20px rgba(123, 5, 0, .32)) !important;
}

html body.path-frontpage .caritas-map-panel__fallback {
  position: absolute !important;
  left: 24px !important;
  bottom: 24px !important;
  z-index: 4 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 15px !important;
  border-radius: 999px !important;
  background: rgba(123, 5, 0, 0.92) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: .84rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 26px rgba(123,5,0,.20) !important;
  backdrop-filter: blur(8px) !important;
}

html body.path-frontpage .caritas-map-panel__fallback:hover,
html body.path-frontpage .caritas-map-panel__fallback:focus {
  background: #5f0300 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

html body.path-frontpage .caritas-map-panel__info {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 24px !important;
  padding: clamp(1.8rem, 2.35vw, 2.6rem) !important;
  border-left: 1px solid rgba(123,5,0,.10) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(123,5,0,.065), transparent 38%),
    rgba(255,255,255,.94) !important;
}

html body.path-frontpage .caritas-map-panel__info-head {
  margin: 0 !important;
}

html body.path-frontpage .caritas-map-panel__eyebrow,
html body.path-frontpage .caritas-map-panel__label {
  display: block !important;
  color: #7b0500 !important;
  font-size: .78rem !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
}

html body.path-frontpage .caritas-map-panel__info h3 {
  margin: .65rem 0 .75rem !important;
  color: #111827 !important;
  font-size: clamp(1.55rem, 2vw, 2.25rem) !important;
  line-height: 1.08 !important;
  font-weight: 950 !important;
  letter-spacing: -.04em !important;
}

html body.path-frontpage .caritas-map-panel__info-head p {
  margin: 0 !important;
  color: #4b5563 !important;
  font-size: 1rem !important;
  line-height: 1.62 !important;
  font-weight: 650 !important;
}

html body.path-frontpage .caritas-map-panel__details {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

html body.path-frontpage .caritas-map-panel__details p {
  margin: 0 !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(123,5,0,.10) !important;
  border-radius: 18px !important;
  background: #fffdfc !important;
}

html body.path-frontpage .caritas-map-panel__value {
  display: block !important;
  max-width: 100% !important;
  margin-top: 6px !important;
  color: #111827 !important;
  font-size: .96rem !important;
  line-height: 1.42 !important;
  font-weight: 800 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

html body.path-frontpage .caritas-map-panel__details a[href^="mailto:"] .caritas-map-panel__value {
  white-space: nowrap !important;
  font-size: .88rem !important;
  letter-spacing: -0.015em !important;
}

html body.path-frontpage a.caritas-map-panel__value:hover,
html body.path-frontpage a.caritas-map-panel__value:focus {
  color: #7b0500 !important;
}

html body.path-frontpage .caritas-map-panel__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
}

html body.path-frontpage .caritas-map-panel__button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 17px !important;
  border-radius: 999px !important;
  text-decoration: none !important;
  font-size: .9rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

html body.path-frontpage .caritas-map-panel__button--primary {
  background: #7b0500 !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(123,5,0,.20) !important;
}

html body.path-frontpage .caritas-map-panel__button--primary:hover,
html body.path-frontpage .caritas-map-panel__button--primary:focus {
  background: #5f0300 !important;
  color: #ffffff !important;
}

html body.path-frontpage .caritas-map-panel__button--secondary {
  background: rgba(123,5,0,.08) !important;
  color: #7b0500 !important;
  border: 1px solid rgba(123,5,0,.14) !important;
}

html body.path-frontpage .caritas-map-panel__button--secondary:hover,
html body.path-frontpage .caritas-map-panel__button--secondary:focus {
  background: rgba(123,5,0,.12) !important;
  color: #5f0300 !important;
}

html body.path-frontpage .caritas-map-marker {
  width: 52px !important;
  height: 52px !important;
  border-radius: 999px !important;
  background: #7b0500 !important;
  border: 5px solid #ffffff !important;
  box-shadow:
    0 18px 34px rgba(123, 5, 0, 0.36),
    0 0 0 12px rgba(123, 5, 0, 0.14) !important;
  position: relative !important;
  z-index: 40 !important;
}

html body.path-frontpage .caritas-map-marker::before {
  content: "" !important;
  position: absolute !important;
  inset: 12px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
}

html body.path-frontpage .caritas-map-marker::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  bottom: -12px !important;
  width: 20px !important;
  height: 20px !important;
  background: #7b0500 !important;
  transform: translateX(-50%) rotate(45deg) !important;
  border-radius: 3px !important;
  z-index: -1 !important;
  box-shadow: 8px 8px 18px rgba(123, 5, 0, 0.22) !important;
}

html body.path-frontpage .maplibregl-ctrl-attrib,
html body.path-frontpage .maplibregl-ctrl {
  font-family: inherit !important;
}

html body.path-frontpage .maplibregl-popup-content {
  border-radius: 16px !important;
  box-shadow: 0 18px 38px rgba(16,24,39,.16) !important;
  border: 1px solid rgba(123,5,0,.12) !important;
  padding: 14px 16px !important;
}

html body.path-frontpage .caritas-map-popup {
  color: #111827 !important;
  font-family: inherit !important;
}

html body.path-frontpage .caritas-map-popup strong {
  display: block !important;
  color: #7b0500 !important;
  font-size: .96rem !important;
  margin-bottom: 4px !important;
}

html body.path-frontpage .caritas-map-popup span {
  display: block !important;
  color: #4b5563 !important;
  font-size: .86rem !important;
  line-height: 1.35 !important;
}

@media (max-width: 1100px) {
  html body.path-frontpage .caritas-map-panel {
    grid-template-columns: 1fr !important;
  }

  html body.path-frontpage .caritas-map-panel__info {
    border-left: 0 !important;
    border-top: 1px solid rgba(123,5,0,.10) !important;
  }
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-map-panel {
    border-radius: 24px !important;
  }

  html body.path-frontpage .caritas-map-panel::before {
    border-radius: 24px 0 0 24px !important;
  }

  html body.path-frontpage .caritas-map-panel__map,
  html body.path-frontpage .caritas-map-panel__canvas {
    min-height: 330px !important;
  }

  html body.path-frontpage .caritas-map-panel__fallback {
    left: 18px !important;
    right: 18px !important;
    bottom: 18px !important;
    width: auto !important;
  }

  html body.path-frontpage .caritas-map-panel__info {
    padding: 24px !important;
  }

  html body.path-frontpage .caritas-map-panel__actions {
    flex-direction: column !important;
  }

  html body.path-frontpage .caritas-map-panel__button {
    width: 100% !important;
  }

  html body.path-frontpage .caritas-map-panel__details a[href^="mailto:"] .caritas-map-panel__value {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: .86rem !important;
  }
}

/* =========================================================
   V62 — Responsive prima fascia
   ========================================================= */

@media (max-width: 980px) {
  html body.path-frontpage .caritas-primary-actions-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-primary-access-strip {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px 16px 16px 22px !important;
    border-radius: 20px !important;
  }

  html body.path-frontpage .caritas-primary-access-strip__text {
    width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
  }

  html body.path-frontpage .caritas-home-card,
  html body.path-frontpage .caritas-home-card__inner {
    min-height: 330px !important;
    border-radius: 24px !important;
  }

  html body.path-frontpage .caritas-home-card__inner {
    padding: 20px !important;
  }

  html body.path-frontpage .caritas-home-card__title {
    max-width: 100% !important;
    font-size: clamp(1.9rem, 9vw, 2.55rem) !important;
  }

  html body.path-frontpage .caritas-home-card__text {
    max-width: 100% !important;
    font-size: 0.94rem !important;
  }
}

/* =========================================================
   FIX MAPPA — titolo e email senza sillabazioni brutte
   ========================================================= */

html body.path-frontpage .caritas-map-panel__info h3 {
  max-width: 360px !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  text-wrap: balance;
}

html body.path-frontpage .caritas-map-panel__info,
html body.path-frontpage .caritas-map-panel__info * {
  hyphens: none !important;
}

html body.path-frontpage .caritas-map-panel__details a[href^="mailto:"] .caritas-map-panel__value {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  font-size: .88rem !important;
  letter-spacing: -0.015em !important;
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-map-panel__details a[href^="mailto:"] .caritas-map-panel__value {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    font-size: .86rem !important;
  }
}

/* =========================================================
   V29 — HOME IN EVIDENZA: tipologia e data in alto
   --------------------------------------------------------------------------
   Sposta COMUNICATO / PUBBLICAZIONE / DOCUMENTO in alto
   e affianca la data nella stessa riga.
   Tocca solo la sezione "In evidenza" della homepage.
   ========================================================= */

/* Tipologia in alto a sinistra */
html body.path-frontpage .caritas-home-featured-view .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-tipologia,
html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-field-tipologia {
  position: absolute !important;
  top: 18px !important;
  left: 1.45rem !important;
  z-index: 4 !important;
  margin: 0 !important;
  display: inline-flex !important;
  width: auto !important;
  padding: 0.38rem 0.7rem !important;
  border-radius: 999px !important;
  background: rgba(216, 154, 29, 0.95) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

/* Data accanto alla tipologia */
html body.path-frontpage .caritas-home-featured-view .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--featured .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-data-pubblicazione {
  position: absolute !important;
  top: 21px !important;
  left: calc(1.45rem + 128px) !important;
  z-index: 4 !important;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.38) !important;
}

/* Riposiziona titolo e testo in basso dopo aver tolto la tipologia dal flusso */
html body.path-frontpage .caritas-home-featured-view .views-field-title,
html body.path-frontpage .caritas-home-slot--featured .views-field-title,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-title {
  margin-top: 13.4rem !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-title,
html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-title,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-title {
  margin-top: 14.2rem !important;
}

/* Mobile */
@media (max-width: 640px) {
  html body.path-frontpage .caritas-home-featured-view .views-field-field-data-pubblicazione,
  html body.path-frontpage .caritas-home-slot--featured .views-field-field-data-pubblicazione,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-field-data-pubblicazione {
    top: 20px !important;
    left: calc(1.45rem + 120px) !important;
    font-size: 0.8rem !important;
  }

  html body.path-frontpage .caritas-home-featured-view .views-field-title,
  html body.path-frontpage .caritas-home-slot--featured .views-field-title,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-field-title,
  html body.path-frontpage .caritas-home-featured-view .views-row:first-child .views-field-title,
  html body.path-frontpage .caritas-home-slot--featured .views-row:first-child .views-field-title,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row:first-child .views-field-title {
    margin-top: 12.7rem !important;
  }
}

/* =========================================================
   V30 — HOME IN EVIDENZA: badge tipologia + data unificato
   --------------------------------------------------------------------------
   La tipologia abbraccia anche la data.
   Colori:
   - Comunicato    → #7b0500
   - Pubblicazione → #0f8b8d
   - Documento     → #d89a1d
   ========================================================= */

html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia {
  position: absolute !important;
  top: 18px !important;
  left: 1.45rem !important;
  z-index: 4 !important;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: calc(100% - 2.9rem) !important;
  margin: 0 !important;
  padding: 0.42rem 0.78rem !important;
  border-radius: 999px !important;
  background: #d89a1d !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
}

html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia *,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia *,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia * {
  color: #ffffff !important;
  font: inherit !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

/* La data viene mostrata dentro lo stesso badge */
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after {
  content: attr(data-caritas-date) !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-left: 0.58rem !important;
  padding-left: 0.58rem !important;
  border-left: 1px solid rgba(255, 255, 255, 0.52) !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-size: 0.74rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

/* Nasconde il vecchio campo data separato, solo dopo che JS ha preparato il badge */
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-data-pubblicazione,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-data-pubblicazione {
  display: none !important;
}

/* Comunicato: rosso Caritas */
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-type-comunicato .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-type-comunicato .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-type-comunicato .views-field-field-tipologia {
  background: #7b0500 !important;
}

/* Pubblicazione: colore Comunità */
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-type-pubblicazione .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-type-pubblicazione .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-type-pubblicazione .views-field-field-tipologia {
  background: #0f8b8d !important;
}

/* Documento: colore attuale */
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-type-documento .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-type-documento .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-type-documento .views-field-field-tipologia {
  background: #d89a1d !important;
}

/* Mobile */
@media (max-width: 640px) {
  html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia {
    top: 16px !important;
    left: 1rem !important;
    max-width: calc(100% - 2rem) !important;
    font-size: 0.68rem !important;
    padding: 0.4rem 0.65rem !important;
  }

  html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after,
  html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after,
  html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia::after {
    font-size: 0.68rem !important;
    margin-left: 0.46rem !important;
    padding-left: 0.46rem !important;
  }
}

/* =========================================================
   V31 — HOME IN EVIDENZA: colore badge da variabile JS
   --------------------------------------------------------------------------
   Forza la pill tipologia+data a usare il colore assegnato dal JS.
   Serve a evitare che la vecchia regola gialla prevalga sulla prima card.
   ========================================================= */

html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready .views-field-field-tipologia,
html body.path-frontpage .caritas-home-featured-view .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--featured .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia,
html body.path-frontpage .caritas-home-slot--news .caritas-home-featured-view .views-row.caritas-featured-meta-ready:first-child .views-field-field-tipologia {
  background: var(--caritas-featured-badge-color, #d89a1d) !important;
  color: #ffffff !important;
}

/* =========================================================
   V63 — FIX MOBILE FASCIA "IN EVIDENZA"
   Obiettivo:
   - titolo e bottone sulla stessa riga anche da smartphone;
   - niente bottone largo al 100%;
   - niente fascia alta il doppio.
   ========================================================= */

@media (max-width: 640px) {
  html body.path-frontpage .caritas-featured-strip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 58px !important;
    padding: 10px 12px 10px 22px !important;
    border-radius: 20px !important;
  }

  html body.path-frontpage .caritas-featured-strip__title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: clamp(1.12rem, 4.6vw, 1.38rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  html body.path-frontpage .caritas-featured-strip__link,
  html body.path-frontpage .caritas-featured-strip__link:visited {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 40px !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    font-size: clamp(0.78rem, 3.2vw, 0.92rem) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

/* Smartphone molto stretti */
@media (max-width: 380px) {
  html body.path-frontpage .caritas-featured-strip {
    gap: 8px !important;
    padding: 9px 10px 9px 20px !important;
  }

  html body.path-frontpage .caritas-featured-strip__title {
    font-size: 1.08rem !important;
  }

  html body.path-frontpage .caritas-featured-strip__link,
  html body.path-frontpage .caritas-featured-strip__link:visited {
    min-height: 38px !important;
    padding: 0 11px !important;
    font-size: 0.78rem !important;
  }
}
