/* Parrocchia Sacro Cuore al Romito — stile sobrio, accento = colore liturgico */
:root {
  --bg: #fbf9f5;
  --paper: #ffffff;
  --stone: #f4efeb;
  --ink: #1e2b37;          /* blu notte ardesia – primario */
  --muted: #44474b;
  --line: rgba(30,43,55,.12);
  --gold: #c59b27;         /* oro sacro – secondario */
  --gold-line: rgba(197,155,39,.35);
  --terracotta: #d9532f;
  --accent: #41ab00;       /* colore liturgico (Tempo Ordinario: verde salvia) */
  --accent-dark: #1e2b37;
  --accent-tint: #f4efeb;
  --on-accent: #ffffff;
  --serif: "Playfair Display", Georgia, "Iowan Old Style", serif;
  --sans: "Plus Jakarta Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  --shadow: 0 10px 25px -5px rgba(30,43,55,.06), 0 8px 10px -6px rgba(30,43,55,.04);
}
/* il colore liturgico guida solo gli accenti (fascia superiore, home, segnalibri) */
:root[data-tempo="verde"]  { --accent:#41ab00; }
:root[data-tempo="viola"]  { --accent:#5f4073; }
:root[data-tempo="rosa"]   { --accent:#a0627a; }
:root[data-tempo="bianco"] { --accent:#c59b27; }
:root[data-tempo="rosso"]  { --accent:#8d2f2f; }

* { box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.7 var(--sans); -webkit-text-size-adjust: 100%; }
img, video, iframe { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #775a00; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; } .muted { color: var(--muted); }
.wrap { width: min(1280px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* barra superiore + intestazione */
.topbar { background: var(--ink); color: #f5f0ec; font-size: .8rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; } .topbar a:hover { text-decoration: underline; }
.tempo-label::before { content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -.1em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; margin-right: .7em; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--gold-line); position: sticky; top: 0; z-index: 50; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { flex: none; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 50%; object-fit: cover; }
.brand strong { display: block; white-space: nowrap; font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; color: var(--ink); }
.brand em { font-style: normal; font-size: .85rem; color: var(--muted); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
nav a, .sub-btn { display: block; padding: 8px 11px; font: 600 .88rem var(--sans); color: var(--ink); text-decoration: none; background: none; border: 0; border-radius: 4px; cursor: pointer; }
nav a:hover, .sub-btn:hover { background: var(--stone); color: var(--ink); }
nav a[aria-current="page"], .is-active > .sub-btn { color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold); }
.has-sub { position: relative; }
.sub-btn::after { content: " ▾"; font-size: .7em; }
.sub { display: none; position: absolute; right: 0; top: 100%; min-width: 250px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0 0 8px 8px; box-shadow: var(--shadow); flex-direction: column; padding: 6px; z-index: 60; }
.has-sub.open > .sub, .has-sub:hover > .sub { display: flex; }
.has-sub:first-of-type > .sub { right: auto; left: 0; }
.menu-btn { display: none; font: 600 .9rem var(--sans); padding: 8px 14px; border: 1.5px solid var(--gold); background: var(--paper); color: var(--ink); border-radius: 4px; }

/* intestazione pagine interne */
.page-head { background: var(--stone); border-bottom: 1px solid var(--gold-line); padding: 34px 0 26px; margin-bottom: 34px; }
.page-head h1 { margin: 0; } .page-head .lead { margin: .5em 0 0; color: var(--muted); }
.kicker { font: 600 .75rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #775a00; margin: 0 0 .4em; }
main { padding-bottom: 50px; }
.sec-h { margin: 44px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead-p { font-size: 1.1rem; color: var(--muted); }

/* home */
.hero { background: var(--stone); border-bottom: 1px solid var(--gold-line); border-top: 8px solid var(--accent); padding: 44px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 220px; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.6rem; margin-bottom: .3em; }
.hero-addr { font-size: 1.1rem; margin-bottom: .2em; } .hero-contact { color: var(--muted); }
.hero-fig { margin: 0; justify-self: end; }
.hero-fig img { width: 220px; height: 220px; object-fit: cover; border: 6px solid #fff; border-radius: 8px; box-shadow: var(--shadow); }
.hero-actions { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 11px 20px; border-radius: 4px; font: 600 .95rem var(--sans); letter-spacing: .01em; text-decoration: none; border: 1.5px solid var(--ink); transition: background .15s, border-color .15s; }
.btn.primary { background: var(--ink); color: #fff; } .btn.primary:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--gold); color: var(--ink); } .btn.ghost:hover { background: var(--gold-line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.feature { display: grid; grid-template-columns: 1fr 190px; gap: 30px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-left: 10px solid var(--accent); border-radius: 8px; padding: 28px; margin: 36px 0; }
.feature h2 { font-size: 1.7rem; margin-bottom: .1em; }
.feature-img { width: 190px; height: auto; border: 1px solid var(--line); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 24px 26px; margin-bottom: 22px; }
.panel h2 { font-size: 1.25rem; } .panel h2 small { font: 400 .8rem var(--sans); color: var(--muted); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-bottom: 8px; }
.cols2.top > * { min-width: 0; }
.times { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px 14px; margin: 0 0 1em; }
.times dt { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; } .times dd { margin: 0; } .times small { color: var(--muted); }
.times-list { list-style: none; padding: 0; margin: 0; } .times-list li { padding: 10px 0; border-bottom: 1px solid var(--line); } .times-list li:last-child { border: 0; }
.times-list b { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin-right: .6em; } .times-list span { color: var(--muted); }
.almanacco { min-height: 120px; overflow: auto; font-size: .9rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { display: block; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--ink); transition: background .15s, border-color .15s; }
.tile:hover { background: var(--stone); box-shadow: var(--shadow); color: var(--ink); }
.tile-t { display: block; font: 600 1.1rem var(--serif); color: var(--ink); }
.tile-d { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.promo { margin-top: 36px; }
.promo-card { display: flex; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); padding: 14px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.promo-card:hover { background: var(--stone); }
.promo-card img { width: 150px; height: auto; flex: none; }
.promo-card strong { display: block; font-family: var(--serif); color: var(--ink); font-size: 1.1rem; line-height: 1.25; }
.promo-card small { color: var(--muted); }
.where { margin-top: 20px; }

/* menu approfondimenti + fumetto */
.actions { align-items: flex-start; }
.dd { position: relative; }
.dd summary { cursor: pointer; list-style: none; } .dd summary::-webkit-details-marker { display: none; }
.dd summary::after { content: " ▾"; font-size: .8em; }
.dd[open] summary::after { content: " ▴"; }
.dd ul { position: absolute; left: 0; top: 100%; z-index: 20; min-width: 100%; white-space: nowrap; list-style: none; margin: 6px 0 0; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0 0 8px 8px; box-shadow: var(--shadow); }
.dd li a { display: block; padding: 10px 12px; text-decoration: none; font-weight: 600; border-radius: 4px; } .dd li a:hover { background: var(--stone); }
.fumetto img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }

/* avvisi */
.notice-home { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--terracotta); border-radius: 8px; padding: 18px 22px; margin: 28px 0 0; }
.notice-home h2 { font-size: 1.25rem; margin-bottom: .5em; }
.notice-home .kicker { color: var(--terracotta); }
.nh-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; font-size: .92rem; line-height: 1.5; }
.nh-cols b { font-family: var(--serif); font-size: 1rem; }
.notice-home .small { margin: 10px 0 0; }
.volantino { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 18px; }

/* cronologia */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--gold); }
.timeline li { position: relative; padding: 0 0 22px 20px; }
.timeline li::before { content: ""; position: absolute; left: -31px; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--gold); }
.timeline .when { display: block; font: 600 1.1rem var(--serif); color: var(--ink); }
.timeline p { margin: 2px 0 0; }
.storia-home { margin-top: 36px; }

/* componenti */
.embed { width: 100%; border: 1px solid var(--line); background: var(--paper); } .embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.narrow-embed { max-width: 760px; margin: 0 auto 30px; }
.prose h2 { margin-top: 1.4em; } .prose h2:first-child { margin-top: 0; } .prose ul, .prose ol { padding-left: 1.2em; } .prose li { margin-bottom: .6em; }
.note { background: var(--stone); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; padding: 14px 18px; }
.ways { padding-left: 1.2em; } .ways li { margin-bottom: 1em; }
.iban { font: 600 1.05rem ui-monospace, Menlo, monospace; background: var(--stone); padding: 2px 8px; }
.copy { font: 600 .8rem var(--sans); margin-left: 6px; padding: 4px 10px; border: 1.5px solid var(--gold); background: #fff; color: var(--ink); border-radius: 4px; cursor: pointer; }
.qr { text-align: center; } .qr img { max-width: 260px; height: auto; }
.shot { width: 100%; height: auto; border: 1px solid var(--line); }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.form input, .form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: 1rem var(--sans); border: 1px solid rgba(30,43,55,.2); border-radius: 4px; background: #fff; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(197,155,39,.18); }
.form button { cursor: pointer; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.cards a, .cards div { display: block; text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 100%; }
.cards a:hover { background: var(--stone); box-shadow: var(--shadow); }
.cards img { display: block; width: 100%; height: auto; }
.cards span { display: block; padding: 12px 14px; font-weight: 600; font-size: .95rem; line-height: 1.3; } .cards small { display: block; color: #775a00; font-weight: 500; margin-top: 3px; }
.logo100 { margin: 0 0 24px; text-align: center; } .logo100 img { max-width: 560px; width: 100%; height: auto; }
.pod { border-radius: 50%; margin-bottom: 14px; }
.gallery { list-style: none; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
figure { margin: 0; } figcaption { font-weight: 600; margin-bottom: 8px; } video { width: 100%; background: #000; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,18,14,.92); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; } .lightbox img { max-width: 92vw; max-height: 90vh; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 10px 18px; }
.lb-x { top: 6px; right: 10px; } .lb-p { left: 6px; } .lb-n { right: 6px; }

.site-foot { background: var(--ink); border-top: 4px solid var(--gold); color: #f5f0ec; padding: 36px 0; font-size: .9rem; }
.site-foot h2 { color: var(--gold); font-size: 1.1rem; } .site-foot a { color: #fff; } .site-foot a:hover { color: var(--gold); }
.foot-dioc { display: inline-block; margin-top: 10px; background: #fff; border-radius: 6px; padding: 6px 8px; } .foot-dioc img { display: block; max-width: 100%; height: auto; }
.foot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

@media (max-width: 920px) {
  .menu-btn { display: block; min-height: 44px; }
  .brand { flex: 1; min-width: 0; } .brand strong { white-space: normal; font-size: 1.05rem; }
  nav { display: none; position: fixed; left: 0; right: 0; top: var(--nav-top, 110px); bottom: 0; background: var(--paper); border-top: 3px solid var(--gold); padding: 4px 20px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; z-index: 49; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; }
  nav li { border-bottom: 1px solid var(--line); }
  nav a, .sub-btn { width: 100%; text-align: left; padding: 14px 6px; font-size: 1.05rem; border-radius: 0; min-height: 48px; }
  nav a[aria-current="page"], .is-active > .sub-btn { box-shadow: none; color: #775a00; font-weight: 700; }
  .sub-btn { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--ink); }
  .sub-btn::after { content: "+"; font-size: 1.4em; line-height: 1; }
  .has-sub.open > .sub-btn::after { content: "–"; }
  .sub { display: none; position: static; box-shadow: none; border: 0; border-left: 3px solid var(--gold-line); margin: 0 0 8px 8px; padding: 0 0 0 8px; min-width: 0; }
  .has-sub.open > .sub { display: flex; }
  .has-sub:hover > .sub { display: none; } .has-sub.open:hover > .sub { display: flex; }
  .sub li { border: 0; } .sub a { padding: 11px 6px; font-weight: 400; min-height: 44px; }
}
@media (max-width: 720px) {
  html { font-size: 17px; }
  .hero-grid, .feature, .cols2, .foot-grid, .nh-cols { grid-template-columns: 1fr; }
  .hero-fig { justify-self: start; order: -1; } .hero-fig img { width: 130px; height: 130px; }
  .hero h1 { font-size: 2rem; } .feature-img { width: 150px; }
  .topbar-contact { display: none; }
  .times { grid-template-columns: 1fr; gap: 0; } .times dd { margin-bottom: 10px; }
}
@media print { .topbar, .site-head, .site-foot, .menu-btn { display: none; } }
