/* Stile allineato a docs/digital (Mondadori Digital - CSS formale) */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.7;
  color: #000;
  background-color: #fff;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Main container (benedetta) = stesso aspetto del main digital */
main.legal {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header = allineato a digital header */
.page-header {
  margin-bottom: 40px;
  border-bottom: 2px solid #B00004;
  padding-bottom: 20px;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: #B00004;
  text-align: center;
  margin-bottom: 10px;
}

.page-content {
  counter-reset: section;
  margin-bottom: 30px;
}

/* Titoli sezione (h3.sectionList) = stile h2 digital */
.page-content .sectionList {
  counter-increment: section;
  font-size: 22px;
  font-weight: bold;
  color: #B00004;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-content .sectionList::before {
  content: counter(section) ". ";
}

/* Liste numerate (sottosezioni) */
ol.sublist {
  counter-reset: subitem;
  list-style: none;
  padding-left: 0;
  margin-left: 30px;
  margin-bottom: 20px;
}

ol.sublist > li {
  counter-increment: subitem;
  margin-bottom: 12px;
}

ol.sublist > li::before {
  content: counter(section) "." counter(subitem) ". ";
  padding-right: 0.5em;
}

/* Liste alfabetiche / indentate (diritti privacy) */
ol.list_alpha {
  list-style-type: lower-alpha;
  margin-left: 30px;
  margin-bottom: 20px;
}

ol.list_indent {
  margin-left: 20px;
}

ol.list_alpha li,
ol.list_indent li {
  margin-bottom: 12px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
}

h2 {
  font-size: 22px;
  font-weight: bold;
  color: #B00004;
  margin-top: 30px;
  margin-bottom: 15px;
}

h3 {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-top: 25px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 18px;
  text-align: justify;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

a {
  color: #B00004;
  text-decoration: underline;
}

a:hover {
  text-decoration: none;
}

ul, ol:not(.sublist):not(.list_alpha):not(.list_indent) {
  margin-left: 30px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 12px;
}

/* Tabelle responsive = come digital */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

thead {
  background-color: #f5f5f5;
}

th {
  background-color: #B00004;
  color: #fff;
  font-weight: bold;
  padding: 12px;
  text-align: left;
  border: 1px solid #ddd;
}

td {
  padding: 12px;
  border: 1px solid #ddd;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #f0f0f0;
}

/* Link interni */
a[href^="#"] {
  color: #B00004;
  text-decoration: underline;
}

a[href^="#"]:hover {
  text-decoration: none;
}

/* Blocco nota / avviso */
.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 12px 14px;
  margin: 1rem 0;
}
.page-content u {
  text-decoration: underline;
}

ol.sublist-nested {
  list-style: lower-alpha;
  margin: 12px 0 12px 1.25em;
  padding-left: 0;
}

ol.sublist-nested>li {
  margin-bottom: 10px;
  text-align: justify;
}

/* Elenco numerato decimale (1. 2. 3. — marker nativo del browser) */
ol.list-segnalazione {
  list-style-type: lower-roman;
  margin: 12px 0 12px 1.5em;
  padding-left: 0;
}

ol.list-segnalazione>li {
  margin-bottom: 8px;
  text-align: justify;
}
.page-content h3.sectionList-no-num {
  counter-increment: none;
}

.page-content h3.sectionList-no-num::before {
  content: none;
}

/* Stili per contenuto Iubenda (informativa-cookies-app ecc.) */
a.iubenda-embed,
a.iubenda-white,
a.iubenda-noiframe,
a.iub-body-embed,
a.iub-no-markup {
  display: none !important;
}

div.iubenda-embed,
div.iubenda-white,
div.iubenda-noiframe,
div.iub-body-embed {
  margin: 20px 0;
}

.iubenda-white *,
.iubenda-noiframe *,
.iubenda-embed *,
.iub-body-embed * {
  font-family: 'Georgia', 'Times New Roman', serif !important;
  color: #000 !important;
}

.iubenda-white a,
.iubenda-noiframe a,
.iubenda-embed a,
.iub-body-embed a {
  color: #B00004 !important;
  text-decoration: underline !important;
}

.iubenda-white a:hover,
.iubenda-noiframe a:hover,
.iubenda-embed a:hover,
.iub-body-embed a:hover {
  text-decoration: none !important;
}

.iubenda-white table th,
.iubenda-noiframe table th,
.iubenda-embed table th,
.iub-body-embed table th {
  background-color: #B00004 !important;
  color: #fff !important;
}

/* Media queries = come digital */
@media (max-width: 768px) {
  body {
    padding: 15px;
    font-size: 14px;
  }

  .page-title {
    font-size: 24px;
  }

  .page-content .sectionList {
    font-size: 20px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  table {
    font-size: 12px;
  }

  th, td {
    padding: 8px;
  }

  .table-container {
    margin: 15px -15px;
    padding: 0 15px;
  }

  ol.sublist {
    margin-left: 20px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
    font-size: 13px;
  }

  .page-title {
    font-size: 20px;
  }

  ul, ol {
    margin-left: 20px;
  }

  table {
    font-size: 11px;
  }

  th, td {
    padding: 6px;
  }

  ol.sublist {
    margin-left: 20px;
  }
}

/* Print = come digital */
@media print {
  body {
    color: #000 !important;
    background: #fff !important;
    font-size: 12pt;
  }

  main.legal {
    max-width: none;
    padding: 0;
  }

  .page-header {
    border: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }
}

/* Nascondere immagini Iubenda */
#iub-pp-container details summary figure img,
#iub-pp-container > details > summary > figure > img,
#iub-pp-container details summary img {
  display: none !important;
}
