@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,500;9..144,600&family=Inter:wght@400;500&display=swap');

:root {
  --bg: #EFEAE1;
  --bg-soft: #F5F1E9;
  --ink: #1C2230;
  --ink-dim: #6E7080;
  --accent: #C6792B;
  --line: #DAD3C4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(120% 120% at 50% -10%, var(--bg-soft) 0%, var(--bg) 65%);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Fascia 5x1000 ---------- */

.announcement-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  /* background: var(--accent); */
  background: #ADD8E6;
  padding: 10px 20px;
  text-align: center;
}

.announcement-bar p {
  color: #1a1206;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.announcement-link {
  color: #1a1206;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.announcement-link:hover { color: #fff; }

/* ---------- Header / nav (shared across pages) ---------- */

.site-header {
  position: sticky;
  top: 40px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(239, 234, 225, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.brand-name {
  font-family: 'Fraunces', serif;
  text-align: center;
  color: #00008B;
  /*  modificato font-weight: 500; */
  /*  modificato font-size: 0.95rem; */
  font-weight: 800;
  font-size: 1.95rem;
  line-height: 1.2;
}

.brand-address {
  font-size: 0.72rem;
  color: var(--ink-dim);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.partner-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-nav { position: relative; }

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.nav-toggle:hover { border-color: var(--accent); }

.nav-toggle .chevron {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--ink-dim);
  border-bottom: 1.5px solid var(--ink-dim);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -3px;
}

.nav-toggle[aria-expanded="true"] .chevron { transform: rotate(225deg); margin-top: 3px; }

.nav-menu {
  list-style: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 190px;
  padding: 6px;
  box-shadow: 0 14px 30px -14px rgba(28, 34, 48, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu li a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-menu li a:hover { background: var(--bg); color: var(--accent); }

.nav-menu li a[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Hero (coming-soon page) ---------- */

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background-image: linear-gradient(180deg, rgba(20, 22, 29, 0.45) 0%, rgba(20, 22, 29, 0.8) 100%), url('immagini/gruppo-volontari.jpg');
  background-size: cover;
  background-position: center 35%;
  color: #fff;
}

.hero h1 { color: #fff; }

.hero p.sub { color: rgba(255, 255, 255, 0.82); }

.hero .progress-track { background: rgba(255, 255, 255, 0.28); }

.hero .progress-label { color: rgba(255, 255, 255, 0.7); }

.hero .inline-link { color: var(--accent); }
.hero .inline-link:hover { color: #fff; }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  font-weight: 500;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin-bottom: 24px;
}

h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

p.sub {
  color: var(--ink-dim);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 40ch;
  line-height: 1.6;
  margin-bottom: 56px;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.inline-link:hover { color: var(--ink); }

.progress {
  width: min(420px, 80vw);
  margin-bottom: 56px;
}

.progress-track {
  position: relative;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: draw 2.8s ease-in-out infinite;
}

@keyframes draw {
  0%   { left: -40%; }
  100% { left: 100%; }
}

.progress-label {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

form {
  display: flex;
  gap: 10px;
  width: min(420px, 80vw);
  flex-wrap: wrap;
  justify-content: center;
}

input[type="email"] {
  flex: 1;
  min-width: 200px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

input[type="email"]::placeholder { color: var(--ink-dim); }

input[type="email"]:focus { border-color: var(--accent); }

button {
  background: var(--accent);
  color: #1a1206;
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(232, 163, 61, 0.5); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--ink-dim);
  min-height: 1.2em;
}

footer {
  text-align: center;
  padding: 32px 24px 28px;
  border-top: 1px solid var(--line);
}

.footer-legal {
  font-size: 0.75rem;
  color: var(--ink-dim);
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  margin-top: 14px;
}

.footer-links {
  font-size: 0.78rem;
  margin-top: 8px;
}

.footer-links a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a:hover { color: var(--accent); }

/* ---------- Galleria ---------- */

.gallery-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.gallery-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #14161d;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  touch-action: pan-y;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #14161d;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(28, 34, 48, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  padding: 0;
}

.gallery-nav:hover { background: rgba(28, 34, 48, 0.8); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(28, 34, 48, 0.55);
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-behavior: smooth;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover { opacity: 0.9; }

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

@media (max-width: 520px) {
  .gallery-viewer { aspect-ratio: 4 / 5; border-radius: 10px; }
  .gallery-nav { width: 38px; height: 38px; }
  .gallery-thumb { width: 68px; height: 50px; }
}

/* ---------- Pagina 5x1000 ---------- */

.cf-box {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 40px;
}

.cf-label {
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.cf-number {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.fivexmille-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 32px;
}

.fivexmille-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  text-align: left;
}

.fivexmille-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--accent);
}

.fivexmille-note {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

@media (max-width: 520px) {
  .fivexmille-step { grid-template-columns: 32px 1fr; gap: 12px; }
  .fivexmille-num { width: 28px; height: 28px; font-size: 0.85rem; }
  .cf-number { font-size: 1.25rem; }
}

/* ---------- Modulo di contatto ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 560px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.field label {
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 500;
}

.field .optional {
  color: var(--ink-dim);
  font-weight: 400;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form button {
  align-self: flex-start;
}

/* ---------- Ultime notizie ---------- */

.news-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.news-header {
  margin-bottom: 40px;
  text-align: left;
}

.news-header .eyebrow { margin-bottom: 16px; }

.news-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  max-width: none;
  margin-bottom: 12px;
}

.news-header p.sub {
  margin: 0;
  text-align: left;
  max-width: 56ch;
}

.news-list {
  border-top: 1px solid var(--line);
}

.news-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.news-date {
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  padding-top: 4px;
}

.news-date .day {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.news-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.news-text {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 56ch;
}

.news-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.news-pdf:hover { border-color: var(--accent); color: var(--accent); }

.news-pdf svg { flex-shrink: 0; }

.news-empty {
  padding: 40px 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
  text-align: left;
}

@media (max-width: 520px) {
  .brand-text { display: none; }
  .brand-logo { width: 42px; height: 42px; }
  .partner-logo { width: 42px; height: 42px; }
  .header-right { gap: 12px; }
  .news-item { grid-template-columns: 1fr; gap: 8px; }
  .news-date { display: flex; align-items: baseline; gap: 8px; padding-top: 0; }
  .news-date .day { margin-bottom: 0; font-size: 1.1rem; }
  .announcement-bar { padding: 8px 14px; }
  .announcement-bar p { font-size: 0.78rem; }
  .site-header { top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill { animation: none; left: 0; width: 100%; opacity: 0.5; }
}
