/* ==========================================================================
   Pro Loco Cerea — versione statica di www.prolococerea.it
   Replica del layout WordPress (tema Bridge, menu verticale) senza CMS.
   Font: Merriweather (self-hosted, cartella fonts/).
   ========================================================================== */

@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/merriweather-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/merriweather-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/merriweather-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/merriweather-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --rosso: #df0024;
  --testo: #444;
  --link: #303030;
  --sidebar-bg: #e1e1d9;
  --sidebar-riga: #96968a;
  --box-eventi: #f2f2e9;
  --sidebar-w: 260px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--testo);
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; border: 0; }

p { margin: 0; }
p, li { overflow-wrap: anywhere; }   /* email e URL lunghi vanno a capo invece di sbordare */

h1, h2 { margin: 0; font-weight: 400; }

h1 {
  font-size: 36px;
  line-height: 45px;
  font-style: italic;
  color: var(--testo);
}

h2 {
  font-size: 18px;
  line-height: 25px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rosso);
}

strong { font-weight: 700; }

ul {
  margin: 0;
  padding: 0;
  list-style: disc outside;
}
ul li { margin: 10px 0 0 15px; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--rosso); }
a.plain { color: inherit; }
a.plain:hover { color: var(--rosso); }

/* Spaziatori (equivalenti ai "vc_empty_space" dell'originale) */
.space-20  { height: 20px; }
.space-32  { height: 32px; }
.space-70  { height: 70px; }
.space-80  { height: 80px; }
.space-100 { height: 100px; }

/* --------------------------------------------------------------------------
   Menu verticale (desktop)
   -------------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: var(--sidebar-w);
  height: 100%;
  padding: 10px 30px;
  background: var(--sidebar-bg);
  text-align: center;
  overflow-y: auto;
}

.sidebar .logo {
  display: block;
  height: 288px;          /* 280px di immagine + 8px, come nell'originale */
  line-height: 0;
}
.sidebar .logo img {
  width: 132px;
  height: 280px;
}

.sidebar nav { margin-top: 45px; }

.sidebar nav ul { list-style: none; }

.sidebar nav li {
  margin: 10px 0 0;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--sidebar-riga);
}
.sidebar nav li:first-child {
  padding-top: 10px;
  border-top: 1px solid var(--sidebar-riga);
}

.sidebar nav a {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--link);
}
.sidebar nav a:hover { color: var(--link); }

/* --------------------------------------------------------------------------
   Header mobile (≤1000px) — nascosto su desktop
   -------------------------------------------------------------------------- */
.mobile-header { display: none; background: #fff; }

.mobile-header .bar {
  position: relative;
  height: 100px;
  padding: 0 15px;
  text-align: center;
}

.menu-toggle {
  position: absolute;
  top: 0;
  left: 15px;
  height: 100px;
  width: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: #9d9d9d;
  cursor: pointer;
}
.menu-toggle svg { width: 14px; height: 14px; display: block; margin: 0 auto; }

.mobile-logo {
  display: inline-block;
  height: 80px;
  margin-top: 10px;
  line-height: 0;
}
.mobile-logo img { height: 80px; width: auto; }

.mobile-nav {
  display: none;
  padding: 0 15px;
  background: #fff;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0 auto -1px; }
.mobile-nav li {
  margin: 0;
  border-bottom: 1px solid #eaeaea;
}
.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-size: 13px;
  line-height: 26px;
  color: #888;
}
.mobile-nav a:hover,
.mobile-nav li.active a { color: var(--rosso); }

/* --------------------------------------------------------------------------
   Contenuto
   -------------------------------------------------------------------------- */
.main {
  padding-left: var(--sidebar-w);
  background: #fff;
}

/* Griglia centrata: la larghezza cambia per breakpoint (vedi media query) */
.grid {
  width: 950px;
  margin: 0 auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0 -15px;
}
.col { padding: 0 15px; }
.c2  { width: 16.6667%; }
.c4  { width: 33.3333%; }
.c6  { width: 50%; }
.c12 { width: 100%; }

.title-row { padding: 80px 0 50px; }

.sep-block { padding-bottom: 30px; }

.separator {
  display: block;
  height: 1px;
  margin: 50px 0 80px;
  border: 0;
  background: #666;
}

.intro--spaced { padding-bottom: 15px; }

/* Foto a tutta larghezza */
.hero { padding-bottom: 8px; line-height: 0; }
.hero img { width: 100%; height: auto; display: block; }
.hero--spaced { padding-top: 150px; }

/* Sponsor */
.sponsor img { width: 300px; height: auto; display: block; }

/* Quartieri + Associazioni: logo (2/12) + testo (4/12), due per riga */
.item-logo { line-height: 0; }
.item-logo img { display: inline-block; }

/* Mappa */
.map-row { padding-top: 80px; }
#map { width: 100%; height: 400px; background: #e5e3df; }

/* Eventi */
.eventi .box {
  margin: 0 1px 20px;
  padding: 30px 35px;
  background: var(--box-eventi);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  padding: 150px 50px 20px var(--sidebar-w);
  font-size: 12px;
  line-height: 22px;
  color: #888;
}
.fcol { width: 33.3333%; min-height: 53px; }
.fcol a { color: #888; }
.fcol a:hover { color: var(--rosso); }
.fcol--center { text-align: center; font-size: 14px; }
.fcol--center img { display: block; margin: 0 auto 6px; width: 100px; height: 110px; }
.fcol--right {
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Torna su
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 25px;
  bottom: 65px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid #e8e8e8;
  border-radius: 50%;
  color: #b0b0b0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, background-color .2s ease;
}
.back-to-top.on { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #e8e8e8; color: #b0b0b0; }
.back-to-top svg { width: 22px; height: 22px; display: block; }

/* --------------------------------------------------------------------------
   Breakpoint — stessi passi del tema originale (layout con menu verticale)
   -------------------------------------------------------------------------- */
@media only screen and (min-width: 1461px) {
  .grid { width: 1100px; }
}
@media only screen and (min-width: 1061px) and (max-width: 1260px) {
  .grid { width: 768px; }
}
@media only screen and (min-width: 1001px) and (max-width: 1060px) {
  .grid { width: 600px; }
}

/* Sotto i 1000px: menu verticale nascosto, header mobile */
@media only screen and (max-width: 1000px) {
  .sidebar { display: none; }
  .mobile-header { display: block; }
  .main { padding-left: 0; }
  .grid { width: 768px; }
  .footer { padding: 150px 25px 20px; }
}
@media only screen and (max-width: 768px) {
  .grid { width: 600px; }
  .footer { display: block; text-align: center; }
  .fcol { width: 100%; min-height: 0; }
  .fcol--right { display: block; text-align: center; margin-top: 20px; }
}
@media only screen and (max-width: 767px) {
  /* le colonne "sm" si impilano; quelle "xs" (logo + testo) restano affiancate */
  .c6, .c4, .c2 { width: 100%; }
  .xs4 { width: 33.3333%; }
  .xs8 { width: 66.6667%; }
  .eventi .box { margin-bottom: 20px; }
}
@media only screen and (max-width: 600px) {
  .grid { width: 420px; }
}
@media only screen and (max-width: 480px) {
  .grid { width: 300px; }
  .footer { padding: 100px 15px 20px; }
}
@media only screen and (max-width: 350px) {
  .grid { width: calc(100% - 30px); }
}

@media print {
  .sidebar, .mobile-header, .back-to-top, #map { display: none; }
  .main { padding-left: 0; }
}
