/* Stili base (estratti da code.html) */
@layer base {
  html,
  body {
    margin: 0;
    padding: 0;
  }

  body {
    overscroll-behavior: none;
  }

  main > :first-child {
    margin-top: 0 !important;
  }

  main > :last-child {
    margin-bottom: 0 !important;
  }
}

::-webkit-scrollbar {
  display: none;
}

/* Immagini di sfondo (prima inline) */
.bg-hero {
  background-image: url("../assets/images/hero.jpg");
}

/* Campo trappola antispam: nascosto agli utenti, visibile ai bot */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* Modali legali (Privacy / Cookie) */
.legal-modal {
  width: min(720px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.legal-modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

body.modal-open {
  overflow: hidden;
}

.legal-content h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 0.75rem;
}

.legal-content ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-content a {
  color: #1e5f98;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-table {
  overflow-x: auto;
  margin-bottom: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.legal-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.legal-table th,
.legal-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
}

.legal-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

/* Menu mobile (sotto i 1280px, dove la nav orizzontale è nascosta) */
.mobile-menu {
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  background: #f1f5f9;
  color: #1c6b00;
}
