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

/* Il pannello cookie usa display:flex: !important assicura che hidden lo nasconda davvero. */
[hidden] { display: none !important; }

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  background-image: url(img/ChatGPT\ Image\ 26\ set\ 2025\,\ 22_08_52.png);
  background-repeat: no-repeat;
  background-size: cover;
}

header {
  background: #00695c;
  color: white;
  padding: 1.5rem;
  text-align: center;
}

header h1 { font-size: 2rem; }
header p { font-size: 1.1rem; margin-top: 0.5rem; }

nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.8rem;
}

nav a { color: white; text-decoration: none; font-weight: bold; }
nav a:hover { text-decoration: underline; }

main {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}

section {
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
}

section h2 {
  margin-bottom: 1rem;
  color: #00695c;
  font-size: 1.5rem;
}

ul { list-style-type: square; margin-left: 1.5rem; }

footer {
  text-align: center;
  padding: 1rem;
  color: white;
  margin-top: 2rem;
}

footer a { color: #b9fff7; }

.link-button {
  border: 0;
  background: transparent;
  color: #b9fff7;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

#mapext {
  text-align: center;
  color: #b9fff7;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 10px;
}

.mappa {
  padding-top: 10px;
  height: 400px;
  width: 50%;
  border-radius: 20px;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

#prenot { text-align: center; margin-bottom: 2rem; padding: 2px; }
#aprenot { color: #25ffe6; }

.mappa-consenso {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(0, 105, 92, 0.92);
  padding: 1rem;
  border-radius: 12px;
}

.mappa-consenso button,
.cookie-actions button {
  margin: .35rem;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 9999;
  padding: 1rem;
  background: rgba(0, 0, 0, .65);
}

.cookie-box,
.cookie-panel-box {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  color: #222;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 35px rgba(0,0,0,.25);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .25rem;
  margin-top: .75rem;
}

.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,.65);
}

.cookie-panel-box {
  width: min(760px, 100%);
  position: relative;
}

.close-panel {
  position: absolute;
  right: 1rem;
  top: .7rem;
  border: 0;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

.cookie-row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid #ddd;
}

.cookie-row p { margin-top: .25rem; color: #555; }
.cookie-toggle input { width: 24px; height: 24px; }
.always-on { font-weight: bold; white-space: nowrap; }

.privacy-page { max-width: 1000px; }
.privacy-page section { margin-top: 2rem; }
.cookie-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.cookie-table th, .cookie-table td { border: 1px solid #ddd; padding: .7rem; text-align: left; }
.cookie-table th { background: #eef7f5; }

@media (max-width: 768px) {
  nav { flex-direction: column; align-items: center; }
  header h1 { font-size: 1.5rem; }
  section h2 { font-size: 1.2rem; }
}

@media (max-width: 800px) {
  #mapext { padding-left: 0; padding-right: 0; }
  .mappa { width: 100%; height: 350px; margin: 0; border-radius: 20px; }
  main { padding: 1rem; }
}


/* Pannello statistiche */
.stats-page { max-width: 1100px; }
.stats-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.stats-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 2rem; }
.stats-button {
  display: inline-block;
  background: #00695c;
  color: white;
  border: 0;
  padding: .65rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
}
.stats-button.secondary { background: #555; }
.stats-error { color: #a40000; font-weight: bold; }
.stats-login { max-width: 450px; margin: 4rem auto; }
.stats-input { display: block; width: 100%; padding: .7rem; margin: .4rem 0 1rem; border: 1px solid #aaa; border-radius: 7px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0; }
.stat-card { background: #eef7f5; padding: 1.2rem; border-radius: 10px; text-align: center; }
.stat-card strong { display: block; font-size: 2rem; color: #00695c; }
.stat-card span { color: #444; }
.stats-note { font-size: .9rem; color: #666; }
.bar-chart {
  height: 250px; display: flex; align-items: flex-end; gap: .35rem;
  overflow-x: auto; padding: 1rem 0;
}
.bar-item { min-width: 42px; height: 220px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .2rem; }
.bar { width: 28px; background: #00695c; border-radius: 5px 5px 0 0; }
.bar-item span { font-size: .75rem; color: #555; }
.bar-item small { font-weight: bold; }
.hour-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; margin-bottom: 2rem; }
.hour-cell { background: #f1f1f1; padding: .45rem; text-align: center; border-radius: 6px; }
.hour-cell span, .hour-cell strong { display: block; }
.hour-cell span { font-size: .75rem; color: #666; }
.stats-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.stats-table th, .stats-table td { border: 1px solid #ddd; padding: .65rem; text-align: left; }
.stats-table th { background: #eef7f5; }

@media (max-width: 800px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hour-grid { grid-template-columns: repeat(6, 1fr); }
  .stats-head { flex-direction: column; }
}
