/* =====================================================================
   Parrocchia di Marlia - foglio di stile
   Palette ricavata dal sito originale: oro (#9c7956, colore d'accento del
   vecchio tema) e rosso del titolo "lungo la Fraga", reso più profondo
   come il manto dell'icona mariana della home.
   ===================================================================== */
@import url("../fonts/fonts.css");

:root {
  --ink: #1d2230;
  --ink-soft: #4b5162;
  --paper: #ffffff;
  --stone: #f2f0eb;
  --stone-deep: #e4dfd5;
  --line: #ddd6c9;
  --gold: #9c7956;
  --gold-deep: #75583a;
  --red: #a3201f;
  --red-deep: #821918;
  --night: #1b2431;
  --night-soft: #c9cfd8;

  --serif-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --wrap: 72rem;
  --narrow: 46rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(29, 34, 48, .06), 0 8px 24px -12px rgba(29, 34, 48, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

img, iframe, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red-deep); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 400; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem;
  background: var(--ink); color: #fff; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow, .narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }

/* ------------------------------------------------------------ pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .65rem 1.35rem;
  border: 1.5px solid var(--red); border-radius: 999px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }
.btn-small { min-height: 2.4rem; padding: .4rem 1rem; font-size: .95rem; }

.link-arrow { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .45em;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateY(-.08em) rotate(45deg); }
.link-arrow:hover { text-decoration: underline; }

/* ------------------------------------------------------------ admin bar */
.admin-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.5rem;
  padding: .45rem var(--gutter); background: var(--night); color: var(--night-soft); font-size: .9rem;
}
.admin-bar strong { color: #fff; }
.admin-bar__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.admin-bar a { color: #fff; }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { max-width: 82rem; display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 1.6rem; height: 2.1rem; color: var(--red); flex: none; }
.brand__name { white-space: nowrap; font-family: var(--serif-display); font-size: clamp(1.25rem, 3.5vw, 1.55rem); letter-spacing: .01em; line-height: 1.1; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .4rem .9rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1.15rem; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* menu mobile: pannello a scomparsa */
.main-nav {
  position: fixed; inset: 4.5rem 0 0 0; z-index: 49;
  padding: 1rem var(--gutter) 2rem; background: var(--paper);
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-.5rem);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
}
.nav-open .main-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav-open { overflow: hidden; }
.main-nav__list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.main-nav__list > li { position: relative; border-bottom: 1px solid var(--line); }
.main-nav__list a {
  display: block; padding: .9rem 3rem .9rem 0; color: var(--ink); text-decoration: none;
  font-size: 1.15rem;
}
.main-nav__list a[aria-current="page"], .main-nav__list .is-active > a { color: var(--red); font-weight: 700; }
.sub-toggle {
  position: absolute; right: 0; top: .35rem; width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center; border: 0; background: none; cursor: pointer; color: var(--ink-soft);
}
.sub-toggle svg { width: .8rem; transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub-menu { list-style: none; margin: 0 0 .6rem; padding: 0 0 0 1rem; border-left: 2px solid var(--gold); display: none; }
.sub-menu.is-open { display: block; }
.sub-menu a { padding: .55rem 0; font-size: 1.05rem; }

.nav-search { display: flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.nav-search input { flex: 1; min-width: 0; border: 0; padding: .6rem 1rem; background: transparent; }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(156, 121, 86, .25); }
.nav-search button { border: 0; background: none; padding: 0 .9rem; cursor: pointer; color: var(--ink-soft); }
.nav-search svg { width: 1.2rem; height: 1.2rem; display: block; }

@media (min-width: 78rem) {
  .site-header { background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); }
  .nav-toggle { display: none; }
  .main-nav {
    position: static; display: flex; align-items: center; gap: 1rem; padding: 0; background: none;
    visibility: visible; opacity: 1; transform: none; overflow: visible;
  }
  .main-nav__list { display: flex; margin: 0; gap: .1rem; }
  .main-nav__list > li { border: 0; display: flex; align-items: center; }
  .main-nav__list a { padding: .5rem .5rem; font-size: .95rem; border-radius: var(--radius); position: relative; white-space: nowrap; }
  .main-nav__list > li > a::after {
    content: ""; position: absolute; left: .5rem; right: .5rem; bottom: .2rem; height: 2px;
    background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
  }
  .main-nav__list > li > a:hover::after, .main-nav__list > li.is-active > a::after { transform: scaleX(1); }
  .main-nav__list .is-active > a { font-weight: 400; }
  .sub-toggle { position: static; width: 1.6rem; height: 2rem; margin-left: -.35rem; }
  .sub-menu {
    display: block; position: absolute; top: 100%; left: 0; min-width: 17rem;
    padding: .5rem; margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(.3rem);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s;
  }
  .has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .sub-menu.is-open {
    visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
  }
  .sub-menu a { padding: .55rem .75rem; font-size: .98rem; }
  .sub-menu a:hover { background: var(--stone); }
  .nav-search { width: 8.5rem; transition: width .25s var(--ease); }
  .nav-search:focus-within { width: 12rem; }
  .nav-search input { padding: .45rem .3rem .45rem .9rem; font-size: .95rem; }
  .nav-search button { padding: 0 .7rem 0 .3rem; }
}

/* ------------------------------------------------------------ breadcrumb */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 1rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: .3rem; color: var(--gold); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current] { color: var(--ink); display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ------------------------------------------------------------ titoli di sezione */
.section-title {
  font-family: var(--serif-display); font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head .section-title { flex: 1; min-width: 14rem; }

/* ------------------------------------------------------------ hero */
.hero { overflow-x: clip; padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__media { max-width: 26rem; width: 100%; margin-inline: auto; }
.arch {
  position: relative; border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden; aspect-ratio: 4 / 5; background: var(--stone);
}
.arch::after {
  content: ""; position: absolute; inset: .55rem; border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px 999px 3px 3px; pointer-events: none;
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem; z-index: -1;
  border-radius: 999px 999px var(--radius) var(--radius); border: 1.5px solid var(--gold);
}
.hero__title {
  font-family: var(--serif-display); color: var(--red);
  font-size: clamp(2.2rem, 6.4vw, 4.1rem); line-height: 1.05; letter-spacing: -.01em;
  margin-bottom: 1.6rem; text-wrap: balance;
}
.hero__prayer {
  margin: 0 0 2rem; padding: .2rem 0 .2rem 1.4rem; border-left: 2px solid var(--gold);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.75; color: var(--ink);
}
.hero__prayer p { margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (min-width: 52rem) {
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .hero__media { margin: 0; justify-self: center; }
}

/* entrata della home: un solo momento orchestrato */
@media (prefers-reduced-motion: no-preference) {
  .hero .arch { animation: rise .9s var(--ease) both; }
  .hero__media::before { animation: fade 1.2s .35s var(--ease) both; }
  .hero__title { animation: rise .8s .15s var(--ease) both; }
  .hero__prayer { animation: rise .8s .3s var(--ease) both; }
  .hero__actions { animation: rise .8s .45s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ orari */
.schedule { background: var(--stone); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.schedule__grid { display: grid; gap: 1px; background: var(--stone-deep); border: 1px solid var(--stone-deep); border-radius: var(--radius); overflow: hidden; }
.schedule__item { background: var(--paper); padding: 1.4rem 1.5rem; }
.schedule__item h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--gold-deep); margin-bottom: .75rem; }
.schedule__item p { margin-bottom: .7rem; font-size: 1rem; }
.schedule__item p:last-child { margin-bottom: 0; }
.schedule__item strong { color: var(--ink); }
.schedule__item a { white-space: nowrap; }
@media (min-width: 36rem) { .schedule__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .schedule__grid { grid-template-columns: repeat(4, 1fr); } }

/* ------------------------------------------------------------ elenchi articoli */
.news { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: 0 0 .5rem; font-size: .9rem; color: var(--ink-soft); }
.post-meta__cat { color: var(--gold-deep); font-weight: 700; text-decoration: none; }
.post-meta__cat:hover { text-decoration: underline; color: var(--gold-deep); }
.post-meta__flag { padding: .05rem .55rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; }

.post-row {
  display: grid; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line);
}
.post-row__media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--stone); aspect-ratio: 4 / 3; }
.post-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-row:hover .post-row__media img { transform: scale(1.03); }
.post-row__title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; margin-bottom: .5rem; }
.post-row__title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease); }
.post-row__title a:hover { color: var(--red); background-size: 100% 1px; }
.is-caps { letter-spacing: .015em; }
.post-row__title.is-caps { font-size: 1.18rem; }
.post-row__excerpt { color: var(--ink-soft); font-size: 1rem; margin-bottom: .6rem; }
.read-more { font-weight: 700; font-size: .98rem; }

@media (min-width: 40rem) {
  .post-row { grid-template-columns: 13rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
  .post-row--noimg { grid-template-columns: minmax(0, 1fr); }
}
.post-row--lead { border-top: 0; padding-top: 0; }
@media (min-width: 52rem) {
  .post-row--lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2.5rem; align-items: center; padding-bottom: 2.5rem; }
  .post-row--lead .post-row__media { aspect-ratio: 16 / 11; }
  .post-row--lead .post-row__title { font-family: var(--serif-display); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.12; }
  .post-row--lead .post-row__title.is-caps { font-size: clamp(1.5rem, 2.5vw, 2rem); }
  .post-row--lead .post-row__excerpt { font-size: 1.08rem; }
}
.news__list { display: grid; }
@media (min-width: 64rem) {
  .news__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
  .news__list .post-row { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .news__list .post-row--noimg { grid-template-columns: minmax(0, 1fr); }
  .news__list .post-row__title { font-size: 1.2rem; }
  .news__list .post-row__title.is-caps { font-size: 1.05rem; }
}

/* ------------------------------------------------------------ sezioni (home) */
.sections { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.sections__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .sections__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .sections__list { grid-template-columns: repeat(3, 1fr); } }
.section-link {
  display: flex; gap: 1rem; align-items: center; height: 100%; padding: .9rem;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.section-link:hover { border-color: var(--gold); box-shadow: var(--shadow); color: var(--ink); }
.section-link__thumb {
  flex: none; width: 4.5rem; height: 5.6rem; overflow: hidden; background: var(--stone);
  border-radius: 999px 999px 3px 3px;
}
.section-link__thumb img { width: 100%; height: 100%; object-fit: cover; }
.section-link__text { display: grid; gap: .15rem; min-width: 0; }
.section-link__name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; }
.section-link:hover .section-link__name { color: var(--red); }
.section-link__count { font-size: .88rem; color: var(--gold-deep); font-weight: 700; }
.section-link__last { font-size: .88rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ pagine interne */
.page-head { padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-head__title { font-family: var(--serif-display); font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0; }
.page-head__lead { margin: .8rem 0 0; max-width: 60ch; color: var(--ink-soft); }
.page-head__count { margin: .6rem 0 0; color: var(--gold-deep); font-weight: 700; font-size: .95rem; }
.feed-wrap { padding-bottom: clamp(3rem, 7vw, 5rem); }
.feed { max-width: 60rem; }
.feed .post-row--lead { padding-top: 0; }
.feed-more { min-height: 1px; text-align: center; color: var(--ink-soft); }
.feed-more.is-loading::before {
  content: ""; display: inline-block; width: 1.6rem; height: 1.6rem; margin: 1.5rem auto;
  border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.js-feed .pager [data-feed-next] { display: none; }
.pager { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; margin-top: 2rem; }
.pager__info { color: var(--ink-soft); }
.empty { padding: 2rem 0; color: var(--ink-soft); }
.results-count { color: var(--ink-soft); }

.search-inline { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; max-width: 36rem; }
.search-inline input {
  flex: 1 1 14rem; min-height: 2.9rem; padding: .6rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
}
.search-inline input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(156, 121, 86, .25); }

.page-404 { padding: 3rem 0 5rem; }
.page-404 h1 { font-family: var(--serif-display); font-size: clamp(2.2rem, 6vw, 3.4rem); }

/* ------------------------------------------------------------ articolo */
.article { padding-bottom: clamp(3rem, 7vw, 5rem); }
.article__head { padding-top: clamp(1.5rem, 4vw, 2.75rem); }
.article__title {
  font-family: var(--serif-display); font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.1;
  margin-bottom: 1.5rem; text-wrap: balance; overflow-wrap: anywhere;
}
.article__title.is-caps { font-size: clamp(1.65rem, 4.2vw, 2.5rem); }
.article__figure { margin: 0 auto 2rem; }
.article__figure img { border-radius: var(--radius); margin-inline: auto; max-height: 72vh; width: auto; }
.article__figure--main { max-width: 60rem; }
.article__figure a { display: block; cursor: zoom-in; }
.notice { margin: 1.5rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--gold); background: var(--stone); }

.page-article { padding-bottom: 2.5rem; }
.page-article + .page-article { border-top: 1px solid var(--line); padding-top: 2.5rem; }
.page-article__title { font-family: var(--serif); font-size: clamp(1.5rem, 3.5vw, 2rem); }
.page-article__title a { color: var(--ink); text-decoration: none; }
.page-article__title a:hover { color: var(--red); }
.category--page .wrap.narrow { max-width: calc(54rem + 2 * var(--gutter)); }

/* testo degli articoli */
.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose h2 { font-family: var(--serif); font-size: 1.6rem; margin: 1.8em 0 .6em; }
.prose h3 { font-family: var(--serif); font-size: 1.32rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.1rem; font-weight: 700; margin: 1.4em 0 .4em; }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--gold); }
.prose blockquote {
  margin: 1.5em 0; padding: .3em 0 .3em 1.3em; border-left: 2px solid var(--gold);
  font-family: var(--serif); font-style: italic; font-size: 1.12em; color: var(--ink);
}
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2em 0; }
.prose img { border-radius: var(--radius); margin: 1.2em auto; cursor: zoom-in; height: auto !important; }
.prose img[style*="float: left"] { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.prose img[style*="float: right"] { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.prose iframe { display: block; width: 100%; border: 0; border-radius: var(--radius); margin: 1.2em 0; aspect-ratio: 16 / 9; height: auto; background: var(--stone); }
.prose iframe[src*="calendar.google"] { aspect-ratio: auto; height: 640px; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2em 0; font-size: .95em; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5em .75em; text-align: left; vertical-align: top; }
.prose th { background: var(--stone); }
.prose a { overflow-wrap: anywhere; }
.prose::after { content: ""; display: table; clear: both; }

/* galleria */
.gallery { margin: 2.5rem 0; }
.gallery__title { font-family: var(--serif); font-size: 1.4rem; }
.gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.gallery__grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--stone); cursor: zoom-in; }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery__grid a:hover img { transform: scale(1.05); }

/* navigazione fra articoli */
.article-nav { display: grid; gap: 1rem; margin: 3rem 0 2rem; }
@media (min-width: 40rem) { .article-nav { grid-template-columns: 1fr 1fr; } .article-nav__link--newer { grid-column: 2; text-align: right; } }
.article-nav__link { display: grid; gap: .2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s var(--ease); }
.article-nav__link:hover { border-color: var(--gold); color: var(--ink); }
.article-nav__label { font-size: .85rem; color: var(--gold-deep); font-weight: 700; }
.article-nav__title { font-family: var(--serif); line-height: 1.3; }
.back-link { text-align: center; }

/* mappa del sito */
.sitemap { padding-bottom: 4rem; display: grid; gap: .75rem; max-width: 60rem; }
.sitemap__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.sitemap__group h2 { font-family: var(--serif); font-size: 1.3rem; margin: 0; display: inline; }
.sitemap__group h2 a { color: var(--ink); }
.sitemap__group summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; list-style: none; }
.sitemap__group summary::-webkit-details-marker { display: none; }
.sitemap__group summary span { color: var(--gold-deep); font-weight: 700; }
.sitemap__group ul { margin: .75rem 0 0; padding-left: 1.2rem; }
.sitemap__group li { margin-bottom: .35rem; }
.sitemap__group time { color: var(--ink-soft); font-size: .85rem; white-space: nowrap; }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--night); color: var(--night-soft); padding-top: clamp(2.5rem, 6vw, 4rem); font-size: 1rem; }
.site-footer__grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
@media (min-width: 40rem) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .site-footer__grid { grid-template-columns: repeat(4, 1fr); } }
.site-footer h2, .site-footer h3 { font-family: var(--serif); color: #fff; font-size: 1.2rem; margin-bottom: .8rem; }
.site-footer h3 { font-size: 1.05rem; margin-top: 1.2rem; }
.site-footer h2::after { content: ""; display: block; width: 2rem; height: 2px; background: var(--gold); margin-top: .55rem; }
.site-footer p { margin-bottom: .55rem; }
.site-footer strong { color: #fff; font-weight: 700; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #e9d6bf; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: center; justify-content: space-between;
  padding-top: 1.4rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .92rem;
}
.site-footer__bottom p { margin: 0; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }

/* ------------------------------------------------------------ elementi fissi */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40; width: 2.9rem; height: 2.9rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--red);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(.5rem);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top svg { width: 1.3rem; height: 1.3rem; }

.cookie-notice {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 34rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center;
  padding: 1rem 1.2rem; background: var(--night); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); font-size: .95rem;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; flex: 1 1 16rem; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  background: rgba(16, 20, 28, .94); padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; grid-column: 2; display: grid; justify-items: center; gap: .75rem; }
.lightbox__figure img { max-height: 84vh; max-width: 100%; width: auto; border-radius: 3px; }
.lightbox__figure figcaption { color: #e7e2d8; text-align: center; font-size: .95rem; }
.lightbox button { border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; border-radius: 50%; width: 3rem; height: 3rem; font-size: 2rem; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; }
.lightbox__prev { grid-column: 1; }
.lightbox__next { grid-column: 3; }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { visibility: hidden; }
@media (max-width: 40rem) {
  .lightbox { grid-template-columns: 1fr; padding: .5rem; }
  .lightbox__figure { grid-column: 1; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: 1rem; }
  .lightbox__prev { left: 1rem; } .lightbox__next { right: 1rem; }
}

/* comparsa discreta degli articoli caricati durante lo scorrimento */
@media (prefers-reduced-motion: no-preference) {
  .post-row.is-new { animation: rise .5s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .to-top, .cookie-notice, .breadcrumb, .article-nav, .back-link, .admin-bar, .pager { display: none !important; }
  body { font-size: 12pt; }
}

/* ------------------------------------------------------------ rifiniture schermi piccoli */
@media (max-width: 24rem) {
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle { padding: .4rem .75rem; }
  .brand { gap: .5rem; }
  .brand__name { font-size: 1.15rem; }
}
.site-footer a[href^="tel:"], .schedule a[href^="tel:"] { white-space: nowrap; }

.nav-open .cookie-notice { display: none; }
