/* ═══════════════════════════════════════════
   GLOBAL — Reset, Font, Base
   ═══════════════════════════════════════════ */
@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap");

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  min-height: 100%;
  font-family: 'Poppins', Helvetica, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

button:focus-visible {
  outline: 2px solid #4a90e2 !important;
  outline: -webkit-focus-ring-color auto 5px !important;
}

/* ═══════════════════════════════════════════
   MOBILE HEADER (logo + hamburger)
   Visibile solo sotto 768px
   ═══════════════════════════════════════════ */
.mobile-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #0a3c12;
  height: 81px;
  border-radius: 0 0 16px 16px;
  padding: 31px 28px 14px;
  overflow: hidden;
}

.mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.mobile-header-logo img {
  height: 34px;
  width: auto;
}

.mobile-header-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.mobile-header-hamburger img {
  width: 23px;
  height: auto;
}

/* Nascosto su desktop */
@media (min-width: 768px) {
  .mobile-header { display: none; }
}

/* ═══════════════════════════════════════════
   DESKTOP NAVBAR
   Visibile solo da 768px in su
   ═══════════════════════════════════════════ */
.desktop-navbar {
  display: none;
}

@media (min-width: 768px) {
  .desktop-navbar {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: #0a3c12;
    height: 100px;
  }

  .desktop-navbar-inner {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
  }

  .desktop-navbar-logo img {
    width: 100px;
    height: 39px;
  }

  .desktop-navbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .desktop-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
  }

  .desktop-nav-link img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
  }

  .desktop-nav-link img.clicked-icon {
    height: 80px;
  }

  .desktop-nav-link:hover img {
    transform: scale(0.88);
  }

  .desktop-nav-link .nav-underline {
    width: 100%;
    height: 4px;
    background: white;
    border-radius: 18px;
    visibility: hidden;
  }

  .desktop-nav-link.active .nav-underline {
    visibility: visible;
  }

  .desktop-navbar-contatti img {
    height: 40px;
    width: auto;
    transition: transform 0.2s ease;
  }

  .desktop-navbar-contatti:hover img {
    transform: scale(0.88);
  }
}

/* ═══════════════════════════════════════════
   TENDINA (menu mobile a scorrimento)
   Caricato via fetch, non piu' iframe
   ═══════════════════════════════════════════ */
.tendina-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
}

.tendina-overlay.is-open {
  display: flex;
}

.tendina-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 50%; height: 100%;
  background: rgba(0,0,0,0.45);
  cursor: pointer;
}

.tendina-panel {
  position: absolute;
  top: 0; right: 0;
  width: 50%; height: 100%;
  background: #0b3c13;
  box-shadow: -6px 0 24px rgba(0,0,0,0.35);
  overflow-y: auto;
}

.tendina-root {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 40px 20px 36px;
  gap: 20px;
}

/* Header: nav + X */
.tendina-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tendina-nav-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  padding-top: 8px;
}

.tendina-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
  outline: none;
}

.tendina-nav-indicator {
  width: 4px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 9px;
  min-height: 28px;
  background: transparent;
  transition: background 0.25s;
}

.tendina-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.65;
  transition: opacity 0.25s;
}

.tendina-nav-inner svg,
.tendina-nav-icon {
  flex-shrink: 0;
  width: auto;
  height: clamp(20px, 4.5vw, 28px);
  object-fit: contain;
  transition: transform 0.2s ease;
}

.tendina-nav-icon.clicked-icon {
  height: clamp(22px, 5vw, 30px);
}

.tendina-nav-item:hover .tendina-nav-icon {
  transform: scale(0.88);
}

.tendina-nav-label {
  display: none;
}

/* Pulsante X */
.tendina-btn-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  line-height: 0;
  margin-top: 4px;
}

/* Separatore */
.tendina-divider {
  height: 1px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Contatti */
.tendina-contacts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-left: 14px;
}

.tendina-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  opacity: 0.9;
}

.tendina-contact-link svg,
.tendina-contact-link img {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.tendina-contact-text {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  word-break: break-word;
}

.tendina-contact-text strong {
  font-weight: 600;
  display: block;
}

/* Social */
.tendina-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.tendina-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  text-decoration: none;
  flex-shrink: 0;
}

.tendina-social-btn:hover {
  opacity: 0.7;
}

.tendina-social-btn svg {
  width: 22px;
  height: 22px;
  fill: white;
}

/* Nascosta su desktop */
@media (min-width: 768px) {
  .tendina-overlay { display: none !important; }
}

/* ═══════════════════════════════════════════
   CONTATTI OVERLAY (desktop popup)
   ═══════════════════════════════════════════ */
.contatti-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

.contatti-overlay.is-open {
  display: flex;
}

.contatti-overlay-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.contatti-overlay-card {
  position: relative;
  background: #0b3c13;
  border-radius: 16px;
  padding: 48px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  z-index: 1;
  width: 340px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.contatti-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.contatti-overlay-close img {
  width: 16px;
  height: 16px;
}

.contatti-overlay-body {
  display: flex;
  flex-direction: column;
  gap: 23px;
  width: 100%;
  opacity: 0.9;
}

.contatti-overlay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  text-decoration: none;
  color: white;
}

.contatti-overlay-row img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.contatti-overlay-text {
  display: flex;
  flex-direction: column;
  font-family: "Poppins", Helvetica;
  font-size: 12px;
  line-height: normal;
  color: white;
}

.contatti-overlay-text strong {
  font-weight: 500;
}

.contatti-overlay-text span {
  font-weight: 300;
}

.contatti-overlay-social {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.contatti-overlay-social a {
  display: flex;
}

.contatti-overlay-social svg {
  width: 30px;
  height: 30px;
}

/* Nascosta su mobile — si usa la tendina */
@media (max-width: 767px) {
  .contatti-overlay { display: none !important; }
}

/* ═══════════════════════════════════════════
   FOOTER (condiviso tra pagine interne)
   ═══════════════════════════════════════════ */
.footer {
  background: #2d5016;
  padding: 48px 48px 16px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  min-height: 694px;
  justify-content: center;
}

.footer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.footer-logo {
  width: 165px;
  max-height: 64px;
  object-fit: contain;
}

.footer-tagline {
  font-weight: 400;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  line-height: 22.75px;
}

.footer-heading {
  font-weight: 700;
  font-size: 24px;
  color: #ffffff;
  text-align: center;
  line-height: 28px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.footer-links a {
  font-weight: 500;
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  display: block;
  line-height: 24px;
}

.footer-contacts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: center;
}

.footer-contacts li {
  font-weight: 400;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 20px;
  text-align: center;
}

.footer-contacts li.small-email {
  font-size: 12px;
  color: #ffffff;
}

.footer-contacts strong {
  font-weight: 600;
}

.footer-orari {
  font-weight: 400;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-align: center;
  line-height: 20px;
}

.footer-orari strong {
  font-weight: 600;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.25);
  margin: 4px 0;
}

.footer-seguici {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
  line-height: 20px;
}

.footer-social {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
}

.footer-social .social-link img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.footer-copy {
  border-top: 0.749px solid rgba(255,255,255,0.2);
  padding-top: 16px;
  width: 100%;
}

.footer-copy p {
  font-weight: 300;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  line-height: 20px;
}

/* ═══════════════════════════════════════════
   PAGE WRAPPER (spazio per navbar fissa)
   ═══════════════════════════════════════════ */
.page {
  padding-top: 83px;
}

@media (min-width: 768px) {
  .page {
    padding-top: 102px;
  }
}
