/* ======================================================
   RESET + BASE
====================================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #fafafa;
}

/* ======================================================
   HEADER
====================================================== */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #0d6efd;
  text-decoration: none;
}

/* ======================================================
   DESKTOP NAV
====================================================== */
.main-nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.main-nav a {
  font-size: 14px;
  text-decoration: none;
  color: #222;
}

.main-nav a:hover {
  color: #0d6efd;
}

/* ======================================================
   BURGER
====================================================== */
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

/* ======================================================
   OFFCANVAS MENU (MOBILE)
====================================================== */
.offcanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 80vw;
  max-width: 320px;
  height: 100%;
  background: #fff;
  padding: 16px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.25);
}

.offcanvas a {
  text-decoration: none;
  color: #111;
  font-size: 16px;
}

/* chiudi menu */
.close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  margin-bottom: 10px;
}

/* ======================================================
   OVERLAY
====================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1500;
}

/* ======================================================
   BODY STATE
====================================================== */
body.menu-open {
  overflow: hidden;
}

body.menu-open .offcanvas {
  transform: translateX(0);
}

body.menu-open .overlay {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open main {
  transform: translateX(60vw);
  transition: transform 0.3s ease;
}

/* ======================================================
   PAGE LAYOUT
====================================================== */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* ======================================================
   FOOTER
====================================================== */
.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #fff;
  margin-top: 48px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
  font-size: 13px;
  color: #555;
  text-align: center;
}

/* ======================================================
   MOBILE RULES
====================================================== */
@media (max-width: 768px) {
  .burger {
    display: block;
  }

  .main-nav {
    display: none;
  }
}

/* ======================================================
   DESKTOP RESET
====================================================== */
@media (min-width: 769px) {
  .offcanvas,
  .overlay {
    display: none;
  }

  body.menu-open main {
    transform: none;
  }
}
/* =========================
   LEAFLET – MAPPA
========================= */
#map {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 360px;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  #map {
    height: 260px;
    min-height: 260px;
  }
}

/* IMPORTANTISSIMO: evita che reset globali rompano Leaflet */
#map img {
  max-width: none !important;
  max-height: none !important;
}
