/* ============================================================
   Associazione Pro Sant'Antonio – Balerna
   Shared stylesheet — v4.0
   Dimensioni fisse generose, responsive via media query
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --cream:  #faf8f4;
  --white:  #ffffff;
  --ink:    #28221e;
  --warm:   #4a3728;
  --gold:   #c8a96e;
  --rust:   #7a4f2e;
  --light:  #f0ebe2;
  --border: #e0d9ce;
  --muted:  #7a7068;
  --small:  #9b8e80;
  --red:    #a02020;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 20px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 3rem;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.nav-brand { display: flex; align-items: center; gap: 13px; text-decoration: none; flex-shrink: 0; }
.nav-brand-img {
  height: 50px; width: 50px;
  object-fit: cover; border-radius: 5px;
  border: 1px solid var(--border);
  filter: sepia(.25) contrast(1.08);
  flex-shrink: 0;
}
.nav-brand-name { font-family: 'EB Garamond', serif; font-size: 21px; color: var(--ink); line-height: 1.2; }
.nav-brand-sub  { font-family: 'Jost', sans-serif; font-size: 11px; color: var(--small); letter-spacing: .13em; text-transform: uppercase; display: block; }

.nav-links { display: flex; gap: .2rem; list-style: none; }
.nav-links a {
  font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding: 8px 13px; border-radius: 5px;
  transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover  { color: var(--rust); background: var(--light); }
.nav-links a.active { color: var(--rust); }

.nav-badge {
  display: inline-block; background: var(--gold); color: #fff;
  font-size: 10px; font-family: 'Jost', sans-serif; font-weight: 700;
  padding: 2px 7px; border-radius: 9px; margin-left: 4px; vertical-align: middle;
}

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 6px; flex-shrink: 0;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: all .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile overlay */
.nav-mobile {
  display: none; position: fixed; inset: 76px 0 0 0;
  background: var(--white); z-index: 199;
  padding: 1.5rem 2rem; flex-direction: column; gap: .2rem;
  border-top: 1px solid var(--border); overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: 'Jost', sans-serif; font-size: 18px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding: 1rem .5rem; border-bottom: 1px solid var(--border);
}
.nav-mobile a.active, .nav-mobile a:hover { color: var(--rust); }

/* ─────────────────────────────────────────
   PAGE HERO (sotto-pagine)
───────────────────────────────────────── */
.page-hero { background: var(--warm); padding: 3.5rem 3rem 3rem; color: var(--cream); }
.page-hero-inner { max-width: 880px; margin: 0 auto; }
.page-hero-label {
  font-family: 'Jost', sans-serif; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .6rem;
}
.page-hero h1 { font-size: 2.9rem; font-weight: 400; line-height: 1.18; color: var(--cream); }
.page-hero-sub { font-family: 'Jost', sans-serif; font-size: 16px; color: #d4c9b8; margin-top: .6rem; }

/* ─────────────────────────────────────────
   MAIN / LAYOUT
───────────────────────────────────────── */
main { padding: 3.5rem 3rem; }
.content-inner { max-width: 880px; margin: 0 auto; }

.divider { width: 44px; height: 2px; background: var(--gold); margin: 1rem 0 2rem; }

.label {
  font-family: 'Jost', sans-serif; font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--small); margin-bottom: .4rem;
}
h2.section-title { font-size: 2.1rem; font-weight: 400; color: var(--ink); margin-bottom: .3rem; line-height: 1.2; }

/* PROSE */
.prose { font-size: 20px; line-height: 1.8; }
.prose p { margin-bottom: 1.3rem; }
.prose p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 1.1rem; margin-top: 1.75rem; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.4rem 1.25rem; cursor: pointer;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none; display: block; color: inherit;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.card-icon  { font-size: 24px; margin-bottom: .7rem; }
.card-title { font-size: 18px; color: var(--ink); margin-bottom: .4rem; }
.card-desc  { font-family: 'Jost', sans-serif; font-size: 14px; color: var(--muted); line-height: 1.55; }
.card-link  { font-family: 'Jost', sans-serif; font-size: 13px; color: var(--rust); margin-top: .75rem; display: inline-block; border-bottom: 1px solid var(--gold); text-decoration: none; }

/* ─────────────────────────────────────────
   ORARIO BAR
───────────────────────────────────────── */
.orario-bar {
  background: var(--warm); display: flex; align-items: center;
  justify-content: center; flex-wrap: wrap;
  gap: 1rem 2.5rem; padding: 1.1rem 3rem;
  font-family: 'Jost', sans-serif; font-size: 15px; color: #f0ebe3; text-align: center;
}
.orario-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 1px; }
.orario-divider { width: 1px; height: 32px; background: rgba(255,255,255,.15); }

/* ─────────────────────────────────────────
   EVENTI (pagina Appuntamenti)
───────────────────────────────────────── */
.giorni { display: flex; flex-direction: column; gap: .8rem; }
.giorno {
  background: var(--white); border: 1px solid var(--border);
  border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; overflow: hidden;
}
.giorno.festa-principale   { border-left-color: var(--red); background: #fff9f7; }
.giorno.domenica-chiusura  { border-left-color: var(--rust); background: #fdf8f4; }

.giorno-header { display: flex; align-items: center; gap: 1.1rem; padding: .75rem 1.4rem; border-bottom: 1px solid var(--border); }
.giorno-data   { text-align: center; min-width: 44px; }
.giorno-num    { display: block; font-size: 1.85rem; font-weight: 700; color: var(--rust); font-family: 'Jost', sans-serif; line-height: 1; }
.giorno-num.red { color: var(--red); }
.giorno-mese   { display: block; font-family: 'Jost', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--small); }
.giorno-titolo { font-size: 17.5px; color: var(--ink); }
.giorno-titolo .highlight { color: var(--red); font-weight: 500; }

.giorno-note { padding: .35rem 1.4rem; font-family: 'Jost', sans-serif; font-size: 14px; color: var(--muted); font-style: italic; background: rgba(200,169,110,.07); border-bottom: 1px solid var(--border); }

.eventi { padding: .5rem 0 .6rem; }
.ev { display: flex; gap: 1rem; padding: .35rem 1.4rem; align-items: flex-start; }
.ev-ora  { font-family: 'Jost', sans-serif; font-size: 14px; color: var(--small); min-width: 58px; padding-top: 2px; white-space: nowrap; }
.ev-desc { flex: 1; font-size: 17.5px; }
.ev-desc em { font-style: italic; color: var(--muted); font-size: 16.5px; }

/* BADGES */
.badge { display: inline-block; font-family: 'Jost', sans-serif; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 8px; vertical-align: middle; margin-left: 3px; }
.b-r { background: #f0ebe3; color: var(--rust); }
.b-p { background: #e8f0e8; color: #3a6a3a; }
.b-s { background: #e8eef8; color: #2a4a8a; }

/* Legenda */
.legenda { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.4rem; font-family: 'Jost', sans-serif; font-size: 14.5px; color: var(--muted); margin-bottom: 2rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.legenda-item { display: flex; align-items: center; gap: 7px; }

/* Streaming / Pranzo box */
.streaming-box { background: #eef3fa; border: 1px solid #cdd9ee; border-radius: 10px; padding: 1rem 1.4rem; margin-top: 1.75rem; font-family: 'Jost', sans-serif; font-size: 15px; color: #2a4a8a; }
.streaming-box strong { display: block; margin-bottom: 3px; }

.pranzo-box { background: #fdf5ec; border: 1px solid #e8d8c0; border-radius: 10px; padding: 1.15rem 1.4rem; margin-top: 1.75rem; font-size: 20px; }
.pranzo-box h3 { font-size: 18px; color: var(--rust); margin-bottom: .45rem; font-weight: 500; }
.pranzo-box p  { font-family: 'Jost', sans-serif; font-size: 15px; color: var(--muted); margin-bottom: .3rem; }
.pranzo-box a  { color: var(--rust); }

/* ─────────────────────────────────────────
   CHI SIAMO
───────────────────────────────────────── */
.comitato-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .85rem; margin-top: 1.4rem; }
.membro-card { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 1.05rem 1.2rem; }
.membro-ruolo { font-family: 'Jost', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 4px; }
.membro-nome  { font-size: 17.5px; color: var(--ink); }
.membro-card.onorario { border-style: dashed; opacity: .72; }
.membro-card.onorario .membro-ruolo { color: var(--small); }

.collab-table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; }
.collab-table td { padding: .65rem .9rem; font-size: 17.5px; border-bottom: 1px solid var(--border); vertical-align: top; }
.collab-table td:first-child { font-family: 'Jost', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--small); white-space: nowrap; width: 220px; padding-top: .75rem; }
.collab-table a { color: var(--rust); text-decoration: none; }
.collab-table a:hover { text-decoration: underline; }

.social-links { display: flex; gap: 1rem; margin-top: 1.4rem; flex-wrap: wrap; }
.social-link { display: inline-flex; align-items: center; gap: 9px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1.2rem; font-family: 'Jost', sans-serif; font-size: 15px; color: var(--rust); text-decoration: none; transition: background .2s, border-color .2s; }
.social-link:hover { background: var(--light); border-color: var(--gold); }

.prop-box { background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 1.05rem 1.4rem; font-size: 18px; margin-top: 1.2rem; }
.prop-box a { color: var(--rust); }

/* ─────────────────────────────────────────
   LA STORIA
───────────────────────────────────────── */
.storia-intro { font-size: 20.5px; line-height: 1.85; color: var(--ink); margin-bottom: 2.25rem; font-style: italic; border-left: 3px solid var(--gold); padding-left: 1.4rem; }

.timeline { margin-top: 2rem; position: relative; }
.timeline::before { content:''; position: absolute; left: 78px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-item  { display: flex; gap: 1.5rem; margin-bottom: 1.75rem; position: relative; }
.tl-anno  { min-width: 68px; text-align: right; font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 600; color: var(--rust); padding-top: 2px; flex-shrink: 0; }
.tl-dot   { position: absolute; left: 73px; top: 7px; width: 10px; height: 10px; background: var(--gold); border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--gold); }
.tl-text  { padding-left: 1.1rem; font-size: 17.5px; color: var(--ink); line-height: 1.72; }
.tl-text em { font-style: italic; color: var(--muted); }

.full-text { margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--border); }
.full-text h3 { font-size: 1.5rem; font-weight: 400; color: var(--ink); margin-bottom: .6rem; }
.full-text .prose p { font-size: 18px; text-align: justify; hyphens: auto; }
.autrice { margin-top: 1.75rem; font-family: 'Jost', sans-serif; font-size: 13.5px; color: var(--small); text-align: right; font-style: italic; }
.img-float { float: right; margin: 0 0 1.75rem 2.25rem; max-width: 300px; }
.img-float img { width: 100%; border-radius: 6px; border: 1px solid var(--border); display: block; }
.img-float figcaption { font-family: 'Jost', sans-serif; font-size: 12px; color: var(--small); margin-top: 6px; text-align: center; }
.clearfix::after { content:''; display:table; clear:both; }

/* ─────────────────────────────────────────
   STATUTO
───────────────────────────────────────── */
.statuto-toc { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 1.15rem 1.4rem; margin-bottom: 2.25rem; font-family: 'Jost', sans-serif; font-size: 14.5px; color: var(--muted); }
.statuto-toc strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--small); margin-bottom: .55rem; }
.toc-links { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; }
.toc-links a { color: var(--rust); text-decoration: none; font-size: 13.5px; }
.toc-links a:hover { text-decoration: underline; }

.art { margin-bottom: 2.5rem; scroll-margin-top: 86px; }
.art-header { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .7rem; flex-wrap: wrap; }
.art-num    { font-family: 'Jost', sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); white-space: nowrap; flex-shrink: 0; }
.art-titolo { font-size: 20px; color: var(--ink); }
.art-body   { font-size: 18px; line-height: 1.82; color: #3a3530; }
.art-body p { margin-bottom: .9rem; }
.art-body ol, .art-body ul { margin: .5rem 0 .5rem 1.75rem; }
.art-body li { margin-bottom: .4rem; }
.art-separator { height: 1px; background: var(--border); margin: 2.25rem 0; }

.approvazione { background: var(--light); border-radius: 10px; padding: 1.15rem 1.4rem; font-family: 'Jost', sans-serif; font-size: 15px; color: var(--muted); margin-top: 2.25rem; }
.approvazione strong { color: var(--ink); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
footer { background: var(--warm); color: #c4b9ae; padding: 3rem 3rem 2rem; font-family: 'Jost', sans-serif; font-size: 14px; }
.footer-inner { max-width: 880px; margin: 0 auto; display: flex; gap: 3rem; flex-wrap: wrap; justify-content: space-between; }
.footer-brand-name { color: var(--cream); font-size: 17px; font-family: 'EB Garamond', serif; margin-bottom: 5px; }
.footer-brand-sub  { color: var(--small); font-size: 12px; }
.footer-col-title  { color: var(--gold); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6rem; }
.footer-col a { display: block; color: #b0a49a; text-decoration: none; margin-bottom: 5px; font-size: 13.5px; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 880px; margin: 2rem auto 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: #9b8e80; font-size: 12px; }
.footer-bottom a { color: #9b8e80; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* UTILITY */
.section + .section { margin-top: 2.75rem; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

/* Tablet: < 1024px — riduci padding laterali */
@media (max-width: 1024px) {
  nav           { padding: 0 2rem; }
  main          { padding: 2.75rem 2rem; }
  .page-hero    { padding: 2.75rem 2rem 2.5rem; }
  footer        { padding: 2.5rem 2rem 1.75rem; }
  .orario-bar   { padding: 1rem 2rem; }
}

/* Tablet stretto / landscape mobile: < 860px — hamburger */
@media (max-width: 860px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
  .cards      { grid-template-columns: 1fr 1fr; }
  .comitato-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile: < 620px */
@media (max-width: 620px) {
  body { font-size: 18px; }

  nav        { padding: 0 1.25rem; height: 66px; }
  .nav-mobile { inset: 66px 0 0 0; }
  .nav-brand-img  { height: 42px; width: 42px; }
  .nav-brand-name { font-size: 17px; }

  .page-hero        { padding: 2rem 1.25rem 1.75rem; }
  .page-hero h1     { font-size: 2.1rem; }
  main              { padding: 2rem 1.25rem; }
  footer            { padding: 2rem 1.25rem 1.5rem; }
  .orario-bar       { padding: .85rem 1.25rem; font-size: 14px; gap: .75rem 1.5rem; }
  .orario-divider   { display: none; }

  .cards         { grid-template-columns: 1fr; }
  .comitato-grid { grid-template-columns: 1fr; }
  .legenda       { flex-direction: column; gap: .4rem; }

  h2.section-title { font-size: 1.7rem; }

  .img-float { float: none; margin: 0 0 1.5rem; max-width: 100%; }

  .timeline::before { left: 56px; }
  .tl-anno { min-width: 46px; font-size: 12px; }
  .tl-dot  { left: 51px; }

  .giorno-header { padding: .65rem 1rem; }
  .ev            { padding: .3rem 1rem; }
  .giorno-note   { padding: .3rem 1rem; }

  .collab-table td:first-child { display: block; width: auto; white-space: normal; padding-bottom: 0; }
  .collab-table td:last-child  { display: block; padding-top: .25rem; padding-bottom: .65rem; }
}

/* Mobile stretto: < 400px */
@media (max-width: 400px) {
  .nav-brand-sub  { display: none; }
  .nav-brand-name { font-size: 15px; }
  body { font-size: 17px; }
}
