/* ==========================================================================
   Parrocchia San Carlo Borromeo - Trento
   Child template di Cassiopeia che riproduce la grafica del sito 2020
   (template Hope/Helix3, preset 4): arancione #ff7e01, testata #595956,
   Poppins 300, menu Open Sans.
   ========================================================================== */

/* ---------- caratteri (ospitati nel sito, nessuna chiamata a Google) ---------- */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- colori: si cambiano solo qui ---------- */

:root {
  --sc-arancio: #ff7e01;          /* "major color" del preset 4 */
  --sc-arancio-scuro: #e06d00;
  --sc-testata: #595956;          /* testata */
  --sc-testata-fissa: rgba(89, 89, 86, .92);
  --sc-verde-acqua: #b1eddc;      /* sfondo sezione In evidenza */
  --sc-azzurro: #7acbf0;          /* riquadro testo delle schede In evidenza */
  --sc-grigio: #f3f5f7;
  --sc-verde-btn: #5cb85c;        /* pulsanti "success" di SP Page Builder */
  --sc-verde-btn-scuro: #449d44;
  --sc-testo: #000;
  --sc-testo-tenue: #595956;
  --sc-larghezza: 1170px;

  --cassiopeia-color-primary: var(--sc-testata);
  --cassiopeia-color-link: var(--sc-arancio);
  --cassiopeia-color-hover: var(--sc-arancio-scuro);
  --link-color: var(--sc-arancio);
  --link-color-rgb: 255, 126, 1;
  --link-hover-color: var(--sc-arancio-scuro);
  --body-font-family: "Poppins", sans-serif;
  --body-font-weight: 300;
  --body-color: var(--sc-testo);
}

html { overflow-x: hidden; }

body {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--sc-testo);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  color: var(--sc-testo);
}

h1, h2, h3, .h1, .h2, .h3 { margin-top: 30px; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.15; }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

strong, b { font-weight: 600; }

a { color: var(--sc-arancio); }
a:hover, a:focus { color: var(--sc-arancio-scuro); }

hr { border-top: 1px solid #000; opacity: 1; }

.major-color, mark { color: var(--sc-arancio); background: none; }

.btn-primary {
  --btn-bg: var(--sc-arancio);
  --btn-border-color: var(--sc-arancio);
  --btn-hover-bg: var(--sc-arancio-scuro);
  --btn-hover-border-color: var(--sc-arancio-scuro);
  --btn-active-bg: var(--sc-arancio-scuro);
  --btn-active-border-color: var(--sc-arancio-scuro);
}

/* ---------- testata: logo a sinistra, menu a destra ---------- */

.container-header {
  background: var(--sc-testata);
  background-image: none;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding: .75rem max(1rem, calc((100% - var(--sc-larghezza)) / 2));
}

.container-header .grid-child {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.container-header.position-sticky,
.container-header.sticky-top {
  background: var(--sc-testata-fissa);
  backdrop-filter: blur(4px);
}

.container-header .navbar-brand { padding: 0; margin: 0; }
.container-header .brand-logo img { max-height: 90px; width: auto; }
.container-header .site-description { display: none; }

.container-header .container-nav { margin-left: auto; padding: 0; }

.container-header .mod-menu,
.container-header .metismenu.mod-menu {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
}

.container-header .metismenu.mod-menu .metismenu-item > a,
.container-header .metismenu.mod-menu .metismenu-item > button,
.container-header .mod-menu > li > a {
  color: #fff;
  padding: .5rem 10px;
  font-weight: 400;
  text-decoration: none;
}

.container-header .metismenu.mod-menu .metismenu-item > a:hover,
.container-header .metismenu.mod-menu .metismenu-item.current > a,
.container-header .metismenu.mod-menu .metismenu-item.active > a,
.container-header .mod-menu > li.current > a {
  color: var(--sc-arancio);
  text-decoration: none;
}

.container-header .metismenu.mod-menu .metismenu-item.current > a::after,
.container-header .metismenu.mod-menu .metismenu-item > a::after { display: none; }

.container-header .navbar-toggler { color: #fff; border-color: rgba(255, 255, 255, .6); }

@media (max-width: 991.98px) {
  .container-header .container-nav { width: 100%; }
  .container-header .brand-logo img { max-height: 64px; }
}

/* ---------- area contenuti ---------- */

.site-grid { --sc-gutter: max(1rem, calc((100vw - var(--sc-larghezza)) / 2)); }

.com-content-article .page-header h1,
.com-content-article .page-header h2,
.com-content-category-blog .page-header h1 {
  margin-top: 0;
}

/* nelle pagine ex SP Page Builder niente riquadro intorno */
.itemid-437 .container-component,
.view-article .container-component > main { margin-top: 0; }

/* ---------- pagine ex SP Page Builder ---------- */

.sc-sezione { margin: 0 0 3rem; }

/* sezioni colorate e con foto: larghe quanto lo schermo, come in SP Page Builder */
.sc-sezione[style*="background"],
.sc-sezione--sfondo {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 70px max(1rem, calc((100vw - var(--sc-larghezza)) / 2));
}

.sc-sezione--sfondo {
  background-size: cover;
  background-position: center;
  color: #fff;
  position: relative;
  isolation: isolate;
}

.sc-sezione--sfondo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: -1;
}

.sc-sezione__titolo {
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 300;
  margin: 0 0 2.5rem;
  color: var(--sc-testo);
}

.sc-griglia {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 30px;
}

.sc-col { grid-column: span 12; min-width: 0; }

@media (min-width: 768px) {
  .sc-col-3 { grid-column: span 3; }
  .sc-col-4 { grid-column: span 4; }
  .sc-col-5 { grid-column: span 5; }
  .sc-col-6 { grid-column: span 6; }
  .sc-col-7 { grid-column: span 7; }
  .sc-col-8 { grid-column: span 8; }
  .sc-col-9 { grid-column: span 9; }
}

.sc-sezione img { max-width: 100%; height: auto; }
.sc-sezione img.vangelo { border-radius: 8px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.sppb-media-content h4 { margin: 1rem 0 .5rem; font-size: 1.5rem; }
.sppb-media-content h4 strong { font-weight: 400; }
.sppb-media-content a { text-decoration: none; }

.sc-immagine { margin: 0 0 1.5rem; }
.sc-immagine--didascalia { position: relative; }

.sc-immagine--didascalia figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
}

.sc-immagine--didascalia figcaption strong { font-size: 1.5rem; font-weight: 400; }

/* immagine + testo (ex "image content") */
.sc-media {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .sc-media { grid-template-columns: 1fr 1fr; }
  .sc-media--destra .sc-media__immagine { order: 2; }
}

.sc-media__immagine img { width: 100%; height: 100%; object-fit: cover; }
.sc-media__testo h2 { margin-top: 0; }

/* schede "Indirizzo / Telefono / Email" */
.sc-scheda { margin-bottom: 1.5rem; }

.sc-scheda__titolo {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 .25rem;
  color: var(--sc-testo);
}

.sc-scheda p { margin: 0; }

.sc-citazione {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.25;
  text-align: center;
  font-weight: 300;
  color: #fff;
  margin: 0;
}

.sc-citazione mark {
  color: #fff;
  background: none;
  border: 3px solid var(--sc-arancio);
  border-radius: 50%;
  padding: 0 .4em;
}

/* pulsanti come i "success" di SP Page Builder */
.sc-bottoni { text-align: center; margin: 1.5rem 0 0; }

.sc-bottoni .btn {
  display: block;
  width: 100%;
  padding: .75rem 1.5rem;
  background: var(--sc-verde-btn);
  border-color: var(--sc-verde-btn);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 4px;
  text-transform: uppercase;
  border-radius: 4px;
}

.sc-bottoni .btn:hover,
.sc-bottoni .btn:focus { background: var(--sc-verde-btn-scuro); border-color: var(--sc-verde-btn-scuro); color: #fff; }

.sc-mappa iframe { width: 100%; height: 575px; border: 0; display: block; }

.sc-video { position: relative; aspect-ratio: 16 / 9; }
.sc-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- home: slideshow a tutto schermo ---------- */

.sc-sezione:has(> .sc-hero) {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: calc(-1 * var(--cassiopeia-grid-gutter, 1em));
  padding: 0;
}

.sc-hero {
  position: relative;
  height: max(420px, min(100vh, 900px));
  overflow: hidden;
  background: #222;
}

.sc-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem max(1rem, calc((100vw - var(--sc-larghezza)) / 2));
  opacity: 0;
  transition: opacity 1.2s ease;
}

.sc-hero__slide:first-child,
.sc-hero.is-attivo .sc-hero__slide.is-visibile { opacity: 1; }

.sc-hero.is-attivo .sc-hero__slide:not(.is-visibile) { opacity: 0; }

.sc-hero__titolo {
  margin: 0;
  color: #fff;
  text-align: center;
  font-size: clamp(2.5rem, 7vw, 6.25rem);
  font-weight: 300;
  line-height: 1.1;
  /* contorno scuro come nel sito 2020 */
  text-shadow: 2px 0 0 #0f0f0f, -2px 0 0 #1e1c1c, 0 2px 0 #1e1b1b, 0 -2px 0 #201e1e,
    1px 1px #201f1f, -1px -1px 0 #111010, 1px -1px 0 #131212, -1px 1px 0 #1e1c1c;
}

.sc-hero.is-attivo .sc-hero__slide.is-visibile .sc-hero__titolo { animation: sc-entra .8s ease both .3s; }

@keyframes sc-entra {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: none; }
}

/* ---------- schede articoli in home ---------- */

.sc-schede {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

@media (min-width: 992px) {
  .sc-schede { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sc-scheda-articolo { display: flex; flex-direction: column; }

.sc-scheda-articolo__immagine {
  display: block;
  height: 202px;
  overflow: hidden;
  background: #e9ecef;
}

.sc-scheda-articolo__immagine img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.sc-scheda-articolo__corpo {
  padding: 20px 6px;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}

.sc-scheda-articolo__categoria { display: none; }

.sc-scheda-articolo__titolo {
  order: 1;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
  text-transform: uppercase;
}

.sc-scheda-articolo__titolo a { color: var(--sc-testo); text-decoration: none; }
.sc-scheda-articolo__titolo a:hover { color: var(--sc-arancio); }

.sc-scheda-articolo__data { order: 0; display: block; font-size: .875rem; color: var(--sc-testo-tenue); }
.sc-scheda-articolo__testo { order: 2; margin: .5rem 0 0; }
.sc-scheda-articolo__leggi { order: 3; margin-top: .75rem; font-weight: 300; color: var(--sc-arancio); text-decoration: none; }

/* "In evidenza" (sezione verde acqua): foto alte e riquadro azzurro che sale sulla foto */
.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__immagine { height: 320px; }

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__corpo {
  position: relative;
  z-index: 2;
  margin: -60px 15px 0;
  padding: 20px;
  background: var(--sc-azzurro);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  flex: 0 0 auto;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__categoria {
  display: block;
  order: -1;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: #fff;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__titolo {
  font-weight: 600;
  text-transform: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__data { order: 2; font-weight: 600; color: var(--sc-testo); }

/* ---------- elenco documenti (ex DOCman) ---------- */

.sc-documenti__filtro { max-width: 24rem; margin-bottom: 1rem; }

.sc-documenti__lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid #dfe3e6; }

.sc-documenti__voce {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid #dfe3e6;
}

.sc-documenti__icona {
  flex: 0 0 3rem;
  height: 3rem;
  border-radius: .375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  background: var(--sc-testo-tenue);
}

.sc-documenti__icona--pdf { background: #b3261e; }
.sc-documenti__icona--doc,
.sc-documenti__icona--docx { background: #1f5fb4; }
.sc-documenti__icona--jpg,
.sc-documenti__icona--jpeg,
.sc-documenti__icona--png { background: var(--sc-arancio); }

.sc-documenti__testo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-documenti__titolo { font-weight: 400; color: var(--sc-testo); }
.sc-documenti__data { font-size: .85rem; color: var(--sc-testo-tenue); }

.sc-documento { margin-top: 1.5rem; }

.sc-documento__link {
  display: inline-block;
  padding: .55rem 1.1rem;
  border-radius: 4px;
  background: var(--sc-arancio);
  color: #fff !important;
  text-decoration: none;
  font-weight: 400;
}

.sc-documento__link:hover { background: var(--sc-arancio-scuro); }

/* ---------- blog (Notiziario, Viaggi, Gallerie) ---------- */

.blog-item .item-image img,
.com-content-category-blog .item-image img {
  width: 100%;
  aspect-ratio: 370 / 285;
  object-fit: cover;
  object-position: top center;
}

.blog-item .item-title,
.blog-item h2 { font-size: 1.5rem; margin-top: 1rem; }

/* ---------- moduli laterali e piè di pagina ---------- */

.container-sidebar-right .card,
.container-bottom-a .card,
.container-bottom-b .card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.container-sidebar-right .card-header,
.container-bottom-a .card-header,
.container-bottom-b .card-header {
  background: transparent;
  border: 0;
  padding: 0 0 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  text-transform: uppercase;
  color: var(--sc-testo);
}

.container-sidebar-right .card-body,
.container-bottom-a .card-body { padding: 0; }

.container-bottom-a {
  padding-top: 100px;
  padding-bottom: 85px;
  border-top: 1px solid #e5e5e5;
}

.container-bottom-a .card:nth-child(2) .card-body,
.container-bottom-a .card:nth-child(3) .card-body {
  background: var(--sc-grigio);
  padding: 1rem;
}

.container-bottom-a .mod-menu { list-style: none; padding: 0; margin: 0; }
.container-bottom-a .mod-menu a { color: var(--sc-testo); text-decoration: none; line-height: 2; }
.container-bottom-a .mod-menu a:hover { color: var(--sc-arancio); }

.footer {
  background: var(--sc-testata);
  background-image: none;
  color: #fff;
  font-size: .875rem;
}

.footer a { color: #fff; }
.footer .grid-child { padding-top: 1.25rem; padding-bottom: 1.25rem; }

.back-to-top-link { background: var(--sc-arancio); }

@media (prefers-reduced-motion: reduce) {
  .sc-hero__slide { transition: none; }
  .sc-hero.is-attivo .sc-hero__slide.is-visibile .sc-hero__titolo { animation: none; }
}

/* sezioni colorate attaccate una all'altra, come le righe di SP Page Builder */
.sc-sezione[style*="background"],
.sc-sezione--sfondo,
.sc-sezione:has(> .sc-hero) { margin-bottom: 0; }

.sc-sezione[style*="background"] + .sc-sezione:not([style*="background"]),
.sc-sezione--sfondo + .sc-sezione:not([style*="background"]) { margin-top: 3rem; }

.footer .grid-child {
  padding-left: max(1rem, calc((100vw - var(--sc-larghezza)) / 2));
  padding-right: max(1rem, calc((100vw - var(--sc-larghezza)) / 2));
}
.footer .grid-child { max-width: none; }
.footer p { margin: 0; }

/* ---------- testata come nel sito 2020: 90px, semitrasparente, sopra lo slider ---------- */

@media (min-width: 992px) {
  .container-header,
  .container-header.position-sticky,
  .container-header.sticky-top {
    position: fixed !important;   /* Bootstrap forza "sticky" con !important */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 90px;
    padding-top: 0;
    padding-bottom: 0;
    flex-wrap: nowrap;
    background: rgba(89, 89, 86, .7);
    backdrop-filter: none;
  }

  .container-header .brand-logo img { max-height: 70px; }

  /* le altre pagine iniziano sotto la testata */
  .site-grid { padding-top: 90px; }

  /* in home lo slider parte dal bordo alto e passa sotto la testata */
  body:has(.sc-hero) .site-grid { padding-top: 0; }
  body:has(.sc-hero) .container-component,
  body:has(.sc-hero) .container-component > main { margin-top: 0; padding-top: 0; }
  .sc-sezione:has(> .sc-hero) { margin-top: 0; }
  .sc-hero { height: 100vh; min-height: 560px; }
}

/* in home nessuno spazio sopra lo slider anche su telefono */
body:has(.sc-hero) .container-component > main > .com-content-article:first-child,
body:has(.sc-hero) .com-content-article .com-content-article__body > .sc-sezione:first-child { margin-top: 0; }

/* ==========================================================================
   v1.3 - ritocchi sul confronto con il sito 2020
   ========================================================================== */

:root {
  --sc-evidenza-sfondo: linear-gradient(90deg, #dbf0fb 0%, #dfe9f5 55%, #e3e6ef 100%);
  --sc-evidenza-scheda: #93c9ee;
  --sc-notiziari-sfondo: linear-gradient(90deg, #f0dcc8 0%, #efd6a6 45%, #ecd170 100%);
  --sc-arancio-pulsante: #e47d1f;
}

/* ---------- testata: logo più grande, menu maiuscolo a destra ---------- */

@media (min-width: 992px) {
  .container-header {
    padding-left: max(1rem, calc((100vw - var(--sc-larghezza)) / 2));
    padding-right: 1.5rem;
  }
  .container-header .brand-logo img { height: 72px; max-height: 72px; width: auto; }
  .container-header .container-nav { margin-left: auto; }
}

.container-header .mod-menu,
.container-header .metismenu.mod-menu {
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  justify-content: flex-end;
}

.container-header .metismenu.mod-menu > .metismenu-item { padding: 0 12px; }
.container-header .metismenu.mod-menu > .metismenu-item:last-child { padding-right: 0; }

.container-header .metismenu.mod-menu .metismenu-item > a,
.container-header .metismenu.mod-menu .metismenu-item > button,
.container-header .mod-menu > li > a {
  padding: .5rem 0;
  font-weight: 400;
  letter-spacing: .01em;
}

/* ---------- slider: frecce laterali ---------- */

.sc-hero__freccia {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 3.25rem;
  height: 3.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
}

.sc-hero__freccia:hover,
.sc-hero__freccia:focus-visible { background: var(--sc-arancio); }
.sc-hero__freccia--prec { left: 1.5rem; }
.sc-hero__freccia--succ { right: 1.5rem; }

@media (max-width: 600px) {
  .sc-hero__freccia { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }
  .sc-hero__freccia--prec { left: .5rem; }
  .sc-hero__freccia--succ { right: .5rem; }
}

/* ---------- colori delle sezioni in home ---------- */

/* In evidenza */
.sc-sezione[style*="#b1eddc"] { background: var(--sc-evidenza-sfondo) !important; }

/* Notiziari e pulsante "Mostra tutti": stessa sfumatura, senza stacco */
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3),
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(4) {
  background: var(--sc-notiziari-sfondo) !important;
}
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) { padding-bottom: 30px; }
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(4) { padding-top: 0; }

.sc-sezione__titolo { font-size: clamp(1.75rem, 3vw, 2.25rem); text-transform: uppercase; }

/* ---------- schede: base comune ---------- */

.sc-scheda-articolo__immagine { height: 177px; }

/* ---------- In evidenza: carosello con trattini ---------- */

.sc-sezione[style*="#b1eddc"] .sc-schede {
  display: flex;
  gap: 27px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 12px;
}

.sc-sezione[style*="#b1eddc"] .sc-schede::-webkit-scrollbar { display: none; }

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo {
  flex: 0 0 calc((100% - 3 * 27px) / 4);
  scroll-snap-align: start;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

@media (max-width: 991.98px) { .sc-sezione[style*="#b1eddc"] .sc-scheda-articolo { flex-basis: calc((100% - 27px) / 2); } }
@media (max-width: 575.98px) { .sc-sezione[style*="#b1eddc"] .sc-scheda-articolo { flex-basis: 85%; } }

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__immagine { height: 230px; }

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__corpo {
  margin: 0;
  padding: 22px 18px 24px;
  background: var(--sc-evidenza-scheda);
  box-shadow: none;
  min-height: 157px;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__data {
  order: 0;
  font-size: .8rem;
  font-weight: 600;
  color: #333;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__titolo {
  order: 1;
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1.05;
  margin-top: .5rem;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__categoria {
  order: 2;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #8a9aa8;
}

/* scheda di don Lino: solo la foto, più alta e non cliccabile (come nel sito 2020) */
.sc-scheda-articolo:has(a[href*="donlino"]) { box-shadow: none !important; }
.sc-scheda-articolo:has(a[href*="donlino"]) .sc-scheda-articolo__corpo { display: none; }
.sc-scheda-articolo:has(a[href*="donlino"]) .sc-scheda-articolo__immagine { height: 282px; pointer-events: none; cursor: default; }

.sc-carosello__trattini {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -1rem 0 1.5rem;
}

.sc-carosello__trattini button {
  width: 28px;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.sc-carosello__trattini button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #333;
  opacity: .5;
}

.sc-carosello__trattini button.is-attivo { width: 44px; }
.sc-carosello__trattini button.is-attivo::after { height: 2px; opacity: 1; }

/* ---------- Notiziari ---------- */

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo { background: #fff; }

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__corpo { padding: 22px 6px 24px; }

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__titolo {
  order: 0;
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
}

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__data {
  order: 1;
  margin-top: .75rem;
  font-size: .8rem;
  color: #777;
}

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__testo { display: none; }

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__leggi { order: 2; margin-top: 1rem; }
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__leggi::after { content: " \2192"; font-weight: 600; }

/* pulsanti arancioni come nel sito 2020 */
.sc-bottoni .btn {
  background: var(--sc-arancio-pulsante);
  border-color: var(--sc-arancio-pulsante);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 6px;
  border-radius: 3px;
}

.sc-bottoni .btn:hover,
.sc-bottoni .btn:focus { background: #c9690f; border-color: #c9690f; }

/* evita che i margini interni "escano" dalle sezioni creando fasce bianche */
.sc-sezione { display: flow-root; }
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(4) .sc-bottoni { margin-top: 0; }

/* colonna centrale larga 1170px come nel sito 2020 */
@media (min-width: 1200px) {
  .site-grid {
    column-gap: 2em;
    grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(4, minmax(0, calc((var(--sc-larghezza) - 6em) / 4))) [main-end] minmax(0, 1fr) [full-end];
  }
}

/* ---------- slider come nel sito 2020: altezza data dal titolo (350px sopra), non dallo schermo ---------- */

:root { --sc-slider-altezza: 680px; }

.sc-hero { height: var(--sc-slider-altezza); min-height: 0; }

.sc-hero__slide {
  align-items: flex-start;
  padding-top: 350px;
}

@media (min-width: 992px) {
  .sc-hero { height: var(--sc-slider-altezza); min-height: 0; }
}

@media (max-width: 991.98px) {
  :root { --sc-slider-altezza: 480px; }
  .sc-hero__slide { padding-top: 200px; }
}

@media (max-width: 575.98px) {
  :root { --sc-slider-altezza: 380px; }
  .sc-hero__slide { padding-top: 150px; }
}

/* ---------- bordo inferiore dello slider: curva concava a strati sfumati (ex forma "clouds-opacity") ---------- */

.sc-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(50px, 9vw, 130px);
  z-index: 2;
  pointer-events: none;
  background: no-repeat bottom / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 130' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1' y1='0' y2='0'%3E%3Cstop offset='0' stop-color='%23dbf0fb'/%3E%3Cstop offset='.55' stop-color='%23dfe9f5'/%3E%3Cstop offset='1' stop-color='%23e3e6ef'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 130V18C360 92 1080 92 1440 18V130Z' fill='url(%23g)' opacity='.25'/%3E%3Cpath d='M0 130V46C380 112 1060 112 1440 46V130Z' fill='url(%23g)' opacity='.5'/%3E%3Cpath d='M0 130V72C400 128 1040 128 1440 72V130Z' fill='url(%23g)'/%3E%3C/svg%3E");
  filter: drop-shadow(0 -6px 10px rgba(0, 0, 0, .18));
}

/* spazio per le ombre dentro il carosello (che altrimenti le taglia) */
.sc-sezione[style*="#b1eddc"] .sc-schede { padding: 4px 4px 48px; margin: -4px -4px -36px; }

/* ---------- schede della stessa altezza, qualunque sia la lunghezza del titolo ---------- */

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo { align-self: stretch; }
.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo:has(a[href*="donlino"]) { align-self: flex-start; }

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__corpo { flex: 1 1 auto; }

/* titolo sempre su due righe di spazio, così le date e le categorie restano allineate */
.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__titolo { min-height: 2.1em; }

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo { height: 100%; }
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__titolo { min-height: 2.2em; }
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo__leggi { margin-top: auto; padding-top: 1rem; }

/* home, blocco "Santa Messa in streaming": titolo centrato (era la classe "youtube" nel sito 2020) */
body:has(.sc-hero) .sc-media__testo h2 { text-align: center; }


/* ---------- piè di pagina: quattro colonne uguali sulla larghezza della pagina ---------- */

.container-bottom-a {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  padding-left: 0;
  padding-right: 0;
}

.container-bottom-a > .card,
.container-bottom-a > .moduletable { width: auto; margin: 0; flex: none; }

@media (max-width: 991.98px) { .container-bottom-a { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .container-bottom-a { grid-template-columns: 1fr; } }

.container-bottom-a img { max-width: 100%; height: auto; }
.container-bottom-a a { overflow-wrap: anywhere; }

/* mappa dentro una colonna: più bassa che a tutta larghezza */
.sc-col .sc-mappa { margin-top: 1.5rem; }
.sc-col .sc-mappa iframe { height: 340px; }
.sc-mappa p { margin: .5rem 0 0; font-size: .9rem; }

/* ---------- testata delle pagine interne con immagine a tutta larghezza (ex Helix3 "Page Title") ---------- */

.container-banner { margin: 0; }

.sc-titolo-pagina {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem 1rem;
  background-size: cover;
  background-position: center;
  margin-bottom: 2.5rem;
}

.sc-titolo-pagina::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, .15);
}

.sc-titolo-pagina__testo {
  margin: 0;
  color: #fff;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.1;
  text-shadow: 2px 0 0 #0f0f0f, -2px 0 0 #1e1c1c, 0 2px 0 #1e1b1b, 0 -2px 0 #201e1e,
    1px 1px #201f1f, -1px -1px 0 #111010, 1px -1px 0 #131212, -1px 1px 0 #1e1c1c;
}

@media (min-width: 992px) {
  /* la testata passa sotto il menu semitrasparente, come lo slider in home */
  body:has(.sc-titolo-pagina) .site-grid { padding-top: 0; }
  .sc-titolo-pagina { min-height: 380px; padding-top: 110px; }
}

/* con la testata grande il titolo dell'articolo/categoria sotto non serve ripeterlo uguale */
body:has(.sc-titolo-pagina) .com-content-category-blog > .page-header:first-child,
body:has(.sc-titolo-pagina) .com-content-category > .page-header:first-child { display: none; }

/* ---------- menu nella colonna laterale (Info sacramenti): sottovoci sempre aperte ---------- */

.container-sidebar-right .mod-menu .mod-menu__sub,
.container-sidebar-left .mod-menu .mod-menu__sub {
  display: block !important;
  height: auto !important;
  visibility: visible !important;
  padding-left: 0;
  margin: .25rem 0 0;
  font-size: 1rem;
}

.container-sidebar-right .mod-menu .mod-menu__toggle-sub,
.container-sidebar-left .mod-menu .mod-menu__toggle-sub { display: none; }

.container-sidebar-right .mod-menu { list-style: none; padding: 0; margin: 0; flex-direction: column; }
.container-sidebar-right .mod-menu > li > a { font-weight: 600; color: var(--sc-testo); text-decoration: none; }
.container-sidebar-right .mod-menu__sub li a {
  display: block;
  padding: .35rem 0 .35rem .9rem;
  border-left: 2px solid #e5e5e5;
  color: var(--sc-testo);
  text-decoration: none;
}
.container-sidebar-right .mod-menu__sub li a:hover,
.container-sidebar-right .mod-menu__sub li.current > a,
.container-sidebar-right .mod-menu__sub li.active > a { color: var(--sc-arancio); border-left-color: var(--sc-arancio); }

/* blocco informazioni dell'articolo: niente parola "Dettagli" */
.article-info .article-info-term { display: none; }

/* ---------- articolo completo: immagine non più alta di 480px, intera e centrata ---------- */

.com-content-article .item-image,
.com-content-article figure.item-image { text-align: center; margin: 0 0 1.5rem; }

.com-content-article .item-image img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  border-radius: 4px;
}

/* solo l'articolo della home (quello con lo slider) non mostra titolo e dettagli */
.com-content-article:has(.sc-hero) > .page-header,
.com-content-article:has(.sc-hero) .article-info,
.com-content-article:has(.sc-hero) .pagenavigation { display: none; }

/* ---------- anteprime di Google Drive / Docs: proporzioni di un foglio A4, adattate allo schermo ---------- */

iframe[src*="drive.google.com"],
iframe[src*="docs.google.com"] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 210 / 297;
  max-height: 85vh;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* anteprime Drive: larghe quanto serve perché un foglio A4 intero stia nello schermo, centrate */
iframe[src*="drive.google.com"],
iframe[src*="docs.google.com"] {
  max-height: none;
  width: min(100%, calc((100vh - 120px) * 210 / 297));
  margin: 0 auto;
}

/* ==========================================================================
   Home: effetti al passaggio del mouse e riquadri di testo sfumati
   ========================================================================== */

/* --- schede (In evidenza e Notiziari) --- */
.sc-scheda-articolo {
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform;
}

.sc-scheda-articolo__immagine { overflow: hidden; }

.sc-scheda-articolo__immagine img {
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.sc-scheda-articolo:hover,
.sc-scheda-articolo:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18) !important;
}

.sc-scheda-articolo:hover .sc-scheda-articolo__immagine img,
.sc-scheda-articolo:focus-within .sc-scheda-articolo__immagine img {
  transform: scale(1.07);
  filter: saturate(1.08);
}

/* la scheda di don Lino (solo foto, non cliccabile) resta ferma */
.sc-scheda-articolo:has(a[href*="donlino"]):hover { transform: none; box-shadow: none !important; }
.sc-scheda-articolo:has(a[href*="donlino"]):hover .sc-scheda-articolo__immagine img { transform: none; filter: none; }

/* --- riquadro azzurro di In evidenza: sfumatura verso il basso --- */
.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo__corpo {
  background: linear-gradient(180deg, #93c9ee 0%, #a9d5f2 55%, #c4e3f7 100%);
  background-size: 100% 160%;
  background-position: 0 0;
  transition: background-position .5s ease;
}

.sc-sezione[style*="#b1eddc"] .sc-scheda-articolo:hover .sc-scheda-articolo__corpo {
  background-position: 0 100%;
}

/* --- riquadro bianco dei Notiziari: verso un avorio caldo --- */
body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf2 60%, #fbefd9 100%);
  background-size: 100% 160%;
  transition: transform .3s ease, box-shadow .3s ease, background-position .5s ease;
}

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo:hover {
  background-position: 0 100%;
}

body:has(.sc-hero) .com-content-article__body > .sc-sezione:nth-of-type(3) .sc-scheda-articolo:hover .sc-scheda-articolo__titolo a {
  color: var(--sc-arancio);
}

/* --- tre schede Vangelo / Formazione / Consigli --- */
body:has(.sc-hero) .sc-col > a:first-child {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

body:has(.sc-hero) .sc-col > a:first-child img.vangelo {
  display: block;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

body:has(.sc-hero) .sc-col:hover > a:first-child img.vangelo { transform: scale(1.06); }
body:has(.sc-hero) .sc-col:hover .sppb-media-content h4 a { color: var(--sc-arancio-scuro); }

@media (prefers-reduced-motion: reduce) {
  .sc-scheda-articolo,
  .sc-scheda-articolo__immagine img,
  .sc-scheda-articolo__corpo,
  body:has(.sc-hero) .sc-col > a:first-child img.vangelo { transition: none; }
  .sc-scheda-articolo:hover,
  .sc-scheda-articolo:focus-within { transform: none; }
  .sc-scheda-articolo:hover .sc-scheda-articolo__immagine img,
  body:has(.sc-hero) .sc-col:hover > a:first-child img.vangelo { transform: none; }
}
