/* ANMIG Parma — foglio di stile base (ricostruzione del sito originale) */
:root {
  --brown: #602e0c;
  --brown-dark: #3d1d07;
  --ink: #463939;
  --text: #444;
  --muted: #666;
  --bg: #eeeeee;
  --paper: #ffffff;
  --gold: #b8955a;
  --serif: "Old Standard TT", Georgia, serif;
  --sans: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: var(--brown); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--brown); line-height: 1.2; margin: 0 0 .6em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.page { background: var(--paper); max-width: 1400px; margin: 0 auto; box-shadow: 0 0 30px rgba(0,0,0,.08); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid #e6e0da; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand span { font-family: var(--serif); line-height: 1.1; font-size: 22px; letter-spacing: .12em; }
.brand small { display: block; letter-spacing: 0; font-size: 17px; }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--brown); color: var(--brown); }
.nav-toggle { display: none; background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--brown); }

/* Hero */
.hero { background: #d9c49e url("../assets/sfondo-pattern-a93adadb-1920w.jpg") center/cover; color: var(--brown); padding: 110px 0 120px; }
.hero h1 { color: var(--brown); font-size: clamp(36px, 6vw, 60px); letter-spacing: .12em; margin-bottom: .2em; }
.hero .sub { font-family: var(--serif); font-size: clamp(16px, 2vw, 21px); font-weight: 700; margin: 0 0 1.4em; }
.hero .loc { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 0; }
.page-hero { padding: 70px 0; }
.page-hero h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: .04em; margin: 0; }

/* Sections */
section { padding: 70px 0; }
.intro p { max-width: 900px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.card { position: relative; min-height: 280px; display: flex; align-items: flex-end; padding: 24px; background: #333 center/cover; color: #fff; text-decoration: none; }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(40,15,0,.85), rgba(0,0,0,.1)); }
.card h2 { position: relative; color: #fff; font-size: 26px; margin: 0; }
.alt { background: #f6f3ef; }
.quote { border-left: 4px solid var(--brown); padding-left: 22px; }
.legal { max-width: 860px; }
.legal h2 { font-size: 26px; margin-top: 1.6em; }
.legal h3 { font-size: 20px; margin-top: 1.2em; }
.legal .updated { margin-top: 2em; font-size: 15px; color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery a { display: block; aspect-ratio: 1; background: #ddd center/cover; }
.gallery a:hover, .gallery a:focus-visible { opacity: .85; }
.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; background: rgba(20,10,4,.94); }
.lightbox::backdrop { background: rgba(20,10,4,.94); }
.lightbox img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 120px); max-height: calc(100% - 100px); object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 54px; line-height: 1; padding: 10px 16px; }
.lightbox button:hover, .lightbox button:focus-visible { color: var(--gold); }
.lb-close { top: 8px; right: 8px; font-size: 44px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: #ddd; font-size: 15px; }
@media (max-width: 600px) {
  .lightbox img { max-width: 100%; max-height: calc(100% - 140px); }
  .lb-prev, .lb-next { top: auto; bottom: 0; transform: none; }
}

/* Feature blocks (rivista, premio) */
.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.feature.reverse { grid-template-columns: .9fr 1.1fr; }
.feature img { box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.event-info p { margin: .2em 0; }
.video { position: relative; aspect-ratio: 16/9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; background: #e4ddd3; overflow: auto; }
.embed-cover p { margin: 0; max-width: 460px; }
.embed-title { font-family: var(--serif); font-size: 22px; color: var(--brown); }
.embed-note { font-size: 14px; line-height: 1.45; }
.embed-alt { font-size: 14px; }
@media (max-width: 420px) { .video.consent-embed { aspect-ratio: auto; min-height: 260px; } }
.media-stack { max-width: 900px; display: grid; gap: 30px; }
.slider { position: relative; min-width: 0; }
.slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; aspect-ratio: 3/2; background: #e4ddd3; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.slider button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--brown); font-size: 32px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.slider button:hover, .slider button:focus-visible { background: #fff; }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-count { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* Dirigenza */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.board .role { background: #f6f3ef; border-top: 3px solid var(--brown); padding: 22px; }
.board .role span { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.board .role strong { font-family: var(--serif); font-size: 22px; color: var(--ink); }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
form.contact label { display: block; font-size: 14px; margin: 14px 0 4px; }
form.contact input, form.contact textarea { width: 100%; padding: 12px; border: 1px solid #ccc; font: inherit; }
.btn { display: inline-block; background: var(--brown); color: #fff; border: 0; padding: 12px 26px; font: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brown-dark); }
.btn-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { background: #2a1405; color: #e9e1d8; padding: 60px 0 30px; font-size: 15px; }
.site-footer h4 { color: #fff; font-size: 18px; }
.site-footer a { color: #e9e1d8; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.newsletter { display: flex; gap: 0; }
.newsletter input { flex: 1; padding: 10px; border: 0; font: inherit; min-width: 0; }
.social { display: flex; gap: 14px; margin-top: 12px; }
.copy { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .grid-2, .feature, .feature.reverse, .contact-grid, .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #e6e0da; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 10px 20px; }
  .nav a { display: block; padding: 12px 0; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 200px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  section { padding: 48px 0; }
  .hero { padding: 70px 0 80px; }
}
