/* ========================================
   STILI PER PAGINE LEGALI - WEBNIX
   Versione ottimizzata per MOBILE e desktop
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #161b22;
  color: #e6edf3;
  line-height: 1.8;
  padding: 15px;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  font-size: 1em; /* Base dimensione testo */
}

/* --- HEADER --- */
header {
  text-align: center;
  margin-bottom: 25px;
  padding: 15px 0;
  border-bottom: 1px solid #30363d;
}

header h1 {
  font-size: 1.9em; /* Leggermente più piccolo su mobile */
  color: #58a6ff;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}

/* --- DATA AGGIORNAMENTO --- */
section p em {
  color: #8b949e;
  font-size: 0.9em;
  display: block;
  margin-bottom: 20px;
  text-align: center;
}

/* --- SEZIONI PRINCIPALI --- */
section[id^="privacy"],
section[id^="cookie-policy"],
section[id^="terms"] {
  background: #0d1117;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  border: 1px solid #30363d;
}

/* --- TITOLI --- */
h1, h2, h3 {
  color: #58a6ff;
  margin: 22px 0 12px;
  font-weight: 600;
}

h1 {
  font-size: 1.5em;
  border-left: 3px solid #1f6feb;
  padding-left: 10px;
}

h2 {
  font-size: 1.3em;
}

h3 {
  font-size: 1.15em;
}

/* --- TESTO E PARAGRAFI --- */
p {
  margin-bottom: 14px;
  font-size: 0.98em;
  color: #c9d1d9;
}

strong {
  color: #ffffff;
  font-weight: 600;
}

/* --- LINK --- */
a {
  color: #38a6ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover {
  color: #6cbaff;
  text-shadow: 0 0 4px rgba(56, 166, 255, 0.3);
}

/* --- LISTE --- */
ul {
  list-style-type: none;
  padding-left: 18px;
  margin: 14px 0;
}

ul li::before {
  content: "•";
  color: #1f6feb;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

ul ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* --- TABELLE RESPONSIVE --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.95em;
}

th, td {
  padding: 10px 12px;
  text-align: left;
}

th {
  background-color: #162c4c;
  color: #ffffff;
  font-weight: 600;
}

tr:nth-child(even) {
  background-color: #12171e;
}

/* --- BLOCCHI DI AVVISO (opzionale) --- */
.highlight-box {
  background: linear-gradient(135deg, #162c4c 0%, #0d1117 100%);
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 18px;
  margin: 20px 0;
  font-size: 0.98em;
  line-height: 1.7;
}

.highlight-box strong {
  color: #58a6ff;
}

/* --- SCROLLBAR PERSONALIZZATA --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0d1117;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1f6feb;
}

/* ========================================
   MEDIA QUERIES - MOBILE FIRST
   ======================================== */

/* --- Smartphone (fino a 480px) --- */
@media (max-width: 480px) {
  body {
    padding: 12px;
    font-size: 0.95em;
  }

  header h1 {
    font-size: 1.7em;
  }

  section[id^="privacy"],
  section[id^="cookie-policy"],
  section[id^="terms"] {
    padding: 18px;
    border-radius: 8px;
  }

  h1 {
    font-size: 1.4em;
    padding-left: 8px;
  }

  h2 {
    font-size: 1.25em;
  }

  h3 {
    font-size: 1.1em;
  }

  p, li {
    font-size: 0.95em;
    margin-bottom: 12px;
  }

  ul {
    padding-left: 16px;
  }

  table {
    font-size: 0.9em;
  }

  th, td {
    padding: 8px 10px;
  }

  .highlight-box {
    padding: 16px;
  }
}

/* --- Tablet (fino a 768px) --- */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    padding: 18px;
    font-size: 0.98em;
  }

  header h1 {
    font-size: 1.8em;
  }

  section[id^="privacy"],
  section[id^="cookie-policy"],
  section[id^="terms"] {
    padding: 22px;
  }

  h1 {
    font-size: 1.45em;
  }

  h2 {
    font-size: 1.3em;
  }

  ul {
    padding-left: 18px;
  }
}

/* --- Desktop (oltre 768px) --- */
@media (min-width: 769px) {
  body {
    font-size: 1em;
    padding: 20px;
  }

  section[id^="privacy"],
  section[id^="cookie-policy"],
  section[id^="terms"] {
    padding: 30px;
  }

  h1 {
    font-size: 1.6em;
  }

  h2 {
    font-size: 1.4em;
  }

  p, li {
    font-size: 1em;
  }

  table {
    font-size: 1em;
  }

  th, td {
    padding: 12px 15px;
  }
}