
/* =========================================================
   HOME POLISH V1 — rifinitura homepage pubblica
   Obiettivo: consolidare la home senza toccare immagini e senza riscrivere i file storici.
   Quando la resa sarà approvata, queste regole potranno essere inglobate in public-home.css.
   ========================================================= */

html body.path-frontpage {
  --caritas-container: 1180px;
  --caritas-polish-red: #7b0500;
  --caritas-polish-red-dark: #5f0300;
  --caritas-polish-teal: #0f8b8d;
  --caritas-polish-gold: #d89a1d;
  --caritas-polish-text: #111827;
  --caritas-polish-muted: #4b5563;
}

html body.path-frontpage .caritas-front-page,
html body.path-frontpage .caritas-public-home,
html body.path-frontpage .caritas-front-main {
  background: #ffffff !important;
}

html body.path-frontpage .caritas-container {
  width: min(1180px, calc(100% - 48px)) !important;
}

html body.path-frontpage .caritas-public-band {
  background: #ffffff !important;
}

html body.path-frontpage .caritas-public-band--primary-access {
  padding-top: clamp(48px, 5vw, 76px) !important;
  padding-bottom: clamp(38px, 4.5vw, 64px) !important;
}

html body.path-frontpage .caritas-public-band--numbers,
html body.path-frontpage .caritas-public-band--featured,
html body.path-frontpage .caritas-public-band--map {
  padding-top: clamp(38px, 4vw, 58px) !important;
  padding-bottom: clamp(42px, 4.5vw, 68px) !important;
}

/* Watermark: più discreto, sempre decorativo e mai invadente. */
html body.path-frontpage::after {
  opacity: 0.065 !important;
  right: clamp(-170px, -8vw, -92px) !important;
  top: 57vh !important;
  width: clamp(430px, 34vw, 560px) !important;
  height: clamp(430px, 34vw, 560px) !important;
}

/* Barre sezione: stessa famiglia visiva, meno pesanti. */
html body.path-frontpage .caritas-primary-access-strip,
html body.path-frontpage .caritas-home-events-strip__head,
html body.path-frontpage .caritas-home-numbers-v2__strip,
html body.path-frontpage .caritas-featured-strip,
html body.path-frontpage .caritas-map-strip {
  min-height: 56px !important;
  margin-bottom: 20px !important;
  padding: 13px 18px 13px 24px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(123, 5, 0, 0.12) !important;
  background:
    linear-gradient(135deg, rgba(123, 5, 0, 0.075) 0%, rgba(255, 255, 255, 0.98) 47%, rgba(15, 139, 141, 0.055) 100%) !important;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.055) !important;
}

html body.path-frontpage .caritas-primary-access-strip::before,
html body.path-frontpage .caritas-home-events-strip__head::before,
html body.path-frontpage .caritas-home-numbers-v2__strip::before,
html body.path-frontpage .caritas-featured-strip::before,
html body.path-frontpage .caritas-map-strip::before {
  width: 6px !important;
  background: var(--caritas-polish-red) !important;
}

html body.path-frontpage .caritas-primary-access-strip::after,
html body.path-frontpage .caritas-home-events-strip__head::after,
html body.path-frontpage .caritas-home-numbers-v2__strip::after,
html body.path-frontpage .caritas-featured-strip::after,
html body.path-frontpage .caritas-map-strip::after {
  opacity: 0.75 !important;
}

html body.path-frontpage .caritas-primary-access-strip__title,
html body.path-frontpage .caritas-home-events-strip__title,
html body.path-frontpage .caritas-home-numbers-v2__title,
html body.path-frontpage .caritas-featured-strip__title,
html body.path-frontpage .caritas-map-strip__title {
  color: var(--caritas-polish-red) !important;
  font-size: clamp(1.16rem, 1.35vw, 1.48rem) !important;
  letter-spacing: -0.025em !important;
}

html body.path-frontpage .caritas-home-events-strip__title::after {
  display: none !important;
  content: none !important;
}

/* Pulsanti nelle barre: evita frecce duplicate e tiene l'allineamento pulito. */
html body.path-frontpage .caritas-home-events-strip__link,
html body.path-frontpage .caritas-featured-strip__link,
html body.path-frontpage .caritas-map-strip__link {
  min-height: 36px !important;
  padding: 0 15px !important;
  border-radius: 999px !important;
  background: var(--caritas-polish-red) !important;
  color: #ffffff !important;
  border: 1px solid var(--caritas-polish-red) !important;
  box-shadow: 0 8px 18px rgba(123, 5, 0, 0.16) !important;
}

html body.path-frontpage .caritas-home-events-strip__link span,
html body.path-frontpage .caritas-featured-strip__link span,
html body.path-frontpage .caritas-map-strip__link span {
  display: inline-flex !important;
  margin-left: 4px !important;
  line-height: 1 !important;
}

/* Card Volontariato / Sostienici: più ordinate in attesa delle immagini astratte. */
html body.path-frontpage .caritas-primary-actions-grid {
  gap: clamp(18px, 2.1vw, 26px) !important;
}

html body.path-frontpage .caritas-home-card {
  min-height: clamp(250px, 22vw, 318px) !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 38px rgba(16, 24, 39, 0.12) !important;
}

html body.path-frontpage .caritas-home-card__inner {
  min-height: clamp(250px, 22vw, 318px) !important;
  padding: clamp(20px, 2vw, 28px) !important;
}

html body.path-frontpage .caritas-home-card__overlay {
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.02) 0%, rgba(123, 5, 0, 0.18) 34%, rgba(92, 4, 0, 0.68) 100%) !important;
}

html body.path-frontpage .caritas-home-card__title {
  max-width: 92% !important;
  font-size: clamp(1.8rem, 2.65vw, 2.85rem) !important;
  line-height: 0.98 !important;
}

html body.path-frontpage .caritas-home-card__text {
  max-width: 92% !important;
  font-size: clamp(0.9rem, 1vw, 0.98rem) !important;
}

/* Agenda: regge meglio titoli lunghi e mantiene altezza coerente. */
html body.path-frontpage .caritas-home-events-strip {
  margin-top: clamp(30px, 4vw, 48px) !important;
  margin-bottom: 0 !important;
}

html body.path-frontpage #caritas-calendar-list.caritas-calendar-list,
html body.path-frontpage .caritas-home-events-strip #caritas-calendar-list {
  gap: 12px !important;
}

html body.path-frontpage .caritas-calendar-card {
  grid-template-columns: 92px minmax(0, 1fr) 6px !important;
  min-height: 92px !important;
  border-radius: 17px !important;
}

html body.path-frontpage .caritas-calendar-card__date {
  width: 92px !important;
  min-width: 92px !important;
  min-height: 92px !important;
}

html body.path-frontpage .caritas-calendar-card__content {
  padding: 15px 22px 15px 20px !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;
  font-size: clamp(0.98rem, 1.2vw, 1.12rem) !important;
  line-height: 1.18 !important;
}

html body.path-frontpage .caritas-calendar-card__meta {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

/* Numeri: più leggibilità e meno effetto “riquadro tecnico”. */
html body.path-frontpage .caritas-home-numbers-v2__header {
  margin-bottom: 20px !important;
}

html body.path-frontpage .caritas-home-numbers-v2__subtitle {
  max-width: 980px !important;
  margin-bottom: 12px !important;
  font-size: clamp(0.92rem, 1vw, 1.02rem) !important;
}

html body.path-frontpage .caritas-home-numbers-v2__grid {
  gap: clamp(14px, 1.7vw, 20px) !important;
}

html body.path-frontpage .caritas-home-numbers-v2-card {
  min-height: 166px !important;
  padding: clamp(22px, 2.1vw, 28px) !important;
  border-radius: 21px !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

html body.path-frontpage .caritas-home-numbers-v2-card__value {
  font-size: clamp(2.25rem, 3.4vw, 3.35rem) !important;
}

/* In evidenza: immagine più leggibile, titoli più disciplinati. */
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 {
  gap: clamp(16px, 1.8vw, 22px) !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 {
  min-height: 300px !important;
  border-radius: 23px !important;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.15) !important;
}

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 {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.30) 48%, rgba(0, 0, 0, 0.78) 100%) !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 {
  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-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 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Dove siamo: card più compatta e coerente con il resto. */
html body.path-frontpage .caritas-map-panel {
  border-radius: 26px !important;
  box-shadow: 0 18px 44px rgba(16, 24, 39, 0.08) !important;
}

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

html body.path-frontpage .caritas-map-panel__info h3 {
  font-size: clamp(1.45rem, 1.8vw, 2.05rem) !important;
}

html body.path-frontpage .caritas-map-panel__details p {
  padding: 13px 15px !important;
  border-radius: 16px !important;
}

@media (max-width: 980px) {
  html body.path-frontpage .caritas-primary-actions-grid,
  html body.path-frontpage .caritas-home-numbers-v2__grid,
  html body.path-frontpage .caritas-home-slot--numbers .field--name-field-card-numeri > .field__items {
    grid-template-columns: 1fr !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 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-container {
    width: min(100% - 28px, 1180px) !important;
  }

  html body.path-frontpage .caritas-public-band--primary-access,
  html body.path-frontpage .caritas-public-band--numbers,
  html body.path-frontpage .caritas-public-band--featured,
  html body.path-frontpage .caritas-public-band--map {
    padding-top: 32px !important;
    padding-bottom: 38px !important;
  }

  html body.path-frontpage .caritas-primary-access-strip,
  html body.path-frontpage .caritas-home-events-strip__head,
  html body.path-frontpage .caritas-home-numbers-v2__strip,
  html body.path-frontpage .caritas-featured-strip,
  html body.path-frontpage .caritas-map-strip {
    min-height: 54px !important;
    padding: 12px 12px 12px 20px !important;
    border-radius: 18px !important;
  }

  html body.path-frontpage .caritas-featured-strip,
  html body.path-frontpage .caritas-home-events-strip__head {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  html body.path-frontpage .caritas-home-events-strip__link,
  html body.path-frontpage .caritas-featured-strip__link {
    width: auto !important;
    min-height: 38px !important;
    padding: 0 12px !important;
    font-size: 0.76rem !important;
  }

  html body.path-frontpage .caritas-featured-strip__title,
  html body.path-frontpage .caritas-home-events-strip__title {
    white-space: nowrap !important;
    font-size: clamp(1.02rem, 4.4vw, 1.18rem) !important;
  }

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

  html body.path-frontpage .caritas-home-card__title {
    font-size: clamp(1.72rem, 9vw, 2.35rem) !important;
  }

  html body.path-frontpage .caritas-calendar-card {
    grid-template-columns: 74px minmax(0, 1fr) 5px !important;
    min-height: 94px !important;
  }

  html body.path-frontpage .caritas-calendar-card__date {
    width: 74px !important;
    min-width: 74px !important;
    min-height: 94px !important;
  }

  html body.path-frontpage .caritas-calendar-card__meta {
    white-space: nowrap !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;
  }

  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: auto !important;
    min-height: 278px !important;
  }

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

@media (max-width: 380px) {
  html body.path-frontpage .caritas-featured-strip__link span,
  html body.path-frontpage .caritas-home-events-strip__link span {
    display: none !important;
  }
}

/* =========================================================
   CTA FASCIA 1 — FINALE ROBUSTA V8
   File caricato dopo homepage.css e public-home.css.
   Serve a chiudere definitivamente i conflitti del vecchio bottone bianco.
   ========================================================= */
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  margin-top: 1.08rem !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-primary-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(92%, 520px) !important;
  min-height: 50px !important;
  padding: 0.58rem 1.45rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  text-align: center !important;
  text-decoration: none !important;
  font-size: clamp(1.12rem, 1.9vw, 1.52rem) !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.24) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

html body.path-frontpage .caritas-front-page .caritas-home-slot--volontariato .caritas-home-card__cta a,
html body.path-frontpage .caritas-front-page .caritas-home-primary-cta--volontariato {
  background: linear-gradient(135deg, #d89a1d 0%, #bf7d08 100%) !important;
}

html body.path-frontpage .caritas-front-page .caritas-home-slot--sostienici .caritas-home-card__cta a,
html body.path-frontpage .caritas-front-page .caritas-home-primary-cta--sostienici {
  background: linear-gradient(135deg, #0f8b8d 0%, #087274 100%) !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a:hover,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a:focus-visible,
html body.path-frontpage .caritas-front-page .caritas-home-primary-cta:hover,
html body.path-frontpage .caritas-front-page .caritas-home-primary-cta:focus-visible {
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  filter: brightness(1.05) !important;
  box-shadow: 0 19px 36px rgba(0, 0, 0, 0.29) !important;
  outline: 2px solid rgba(255, 255, 255, 0.7) !important;
  outline-offset: 3px !important;
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta {
    justify-content: stretch !important;
    margin-top: 0.95rem !important;
  }

  html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a,
  html body.path-frontpage .caritas-front-page .caritas-home-primary-cta {
    width: 100% !important;
    min-height: 46px !important;
    padding: 0.52rem 1rem !important;
    font-size: clamp(1.02rem, 5vw, 1.36rem) !important;
  }
}
/* FINE CTA FASCIA 1 — FINALE ROBUSTA V8
   ========================================================= */


/* =========================================================
   CTA FASCIA 1 — FIX DOPPIA PILLOLA
   Il wrapper Drupal .field__item non deve diventare un secondo bottone.
   ========================================================= */
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field__items,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field__item {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a::before,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a::after {
  content: none !important;
  display: none !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a > * {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}


/* =========================================================
   CTA FASCIA 1 — FIX FINALE V12
   - una sola pillola, non bottone dentro bottone;
   - colori coerenti con le etichette superiori:
     Volontariato = ocra, Sostienici = verde petrolio.
   ========================================================= */
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field__items,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta .field__item {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta {
  margin-top: 1.08rem !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(92%, 520px) !important;
  min-height: 50px !important;
  padding: 0.58rem 1.45rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  text-align: center !important;
  text-decoration: none !important;
  font-size: clamp(1.12rem, 1.9vw, 1.52rem) !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.24) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

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

html body.path-frontpage .caritas-front-page .caritas-home-slot--sostienici .caritas-home-card__cta a {
  background: linear-gradient(135deg, #0f8b8d 0%, #087274 100%) !important;
}

html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a::before,
html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 760px) {
  html body.path-frontpage .caritas-front-page .caritas-primary-actions-grid .caritas-home-card__cta a {
    width: 100% !important;
    min-height: 46px !important;
    padding: 0.52rem 1rem !important;
    font-size: clamp(1.02rem, 5vw, 1.36rem) !important;
  }
}
