/* Pagina Formati — R1–R4 */

.format-page {
  background: var(--white);
}

.format-entry {
  padding-top: 2.5rem;
  padding-bottom: 0.5rem;
}

.format-entry__title {
  margin: 0 0 0.5rem;
}

.format-entry__subtitle {
  margin: 0 0 1.5rem;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.6;
}

.format-entry__grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .format-entry__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.format-entry__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(5, 13, 22, 0.05);
}

.format-entry__card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.format-entry__card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.format-entry__card--accent {
  border-color: rgba(14, 116, 144, 0.35);
  background: linear-gradient(180deg, var(--white) 0%, rgba(14, 116, 144, 0.06) 100%);
}

.format-list-section {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.format-list-section__head {
  margin-bottom: 2rem;
}

.format-list-section__head h2 {
  margin: 0 0 0.5rem;
}

.format-list-section__head p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
}

.format-blocks {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.format-block {
  display: grid;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(5, 13, 22, 0.06);
  scroll-margin-top: 6rem;
}

@media (min-width: 900px) {
  .format-block {
    grid-template-columns: 1fr 1.05fr;
    align-items: stretch;
  }

  .format-block--reverse .format-block__visual {
    order: 2;
  }

  .format-block--reverse .format-block__body {
    order: 1;
  }
}

.format-block--featured {
  border-color: var(--navy);
  box-shadow: var(--shadow);
}

.format-block__visual {
  position: relative;
  min-height: 220px;
  background: #f8f9fa;
}

.format-block__visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 900px) {
  .format-block__visual {
    min-height: 100%;
  }

  .format-block__visual img {
    min-height: 320px;
  }
}

.format-block__body {
  padding: clamp(1.35rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
}

.format-block--featured .format-block__body {
  background: var(--navy);
  color: #e8edf3;
}

.format-block__tier {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.25rem;
}

.format-block--featured .format-block__tier {
  color: #7dd3fc;
}

.format-block__badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.format-block--featured .format-block__badge {
  color: #fca5a5;
}

.format-block__body h3 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.6vw, 1.875rem);
  line-height: 1.15;
}

.format-block__list {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  flex: 1;
  line-height: 1.6;
  font-size: 0.96rem;
}

.format-block--featured .format-block__list {
  color: rgba(232, 237, 243, 0.9);
}

.format-block__list li {
  margin-bottom: 0.4rem;
}

.format-block__note {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.55;
  background: var(--surface);
  color: var(--muted);
  border-left: 3px solid var(--teal);
}

.format-block--featured .format-block__note {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(232, 237, 243, 0.85);
  border-left-color: var(--teal);
}

.format-block__note--warn {
  border-left-color: var(--accent);
  background: var(--accent-soft);
  color: var(--navy-mid);
}

.format-block--featured .format-block__note--warn {
  background: rgba(214, 40, 40, 0.15);
  color: rgba(255, 255, 255, 0.92);
  border-left-color: #fca5a5;
}

.format-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.format-block--featured .format-block__actions .btn-ghost-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.format-block--featured .format-block__actions .btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

/* Tabella confronto */
.format-compare {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.format-compare h2 {
  margin: 0 0 0.5rem;
}

.format-compare__lead {
  margin: 0 0 1.25rem;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.format-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(5, 13, 22, 0.05);
}

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

.format-table th,
.format-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.format-table th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--surface);
}

.format-table th:first-child,
.format-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--navy-mid);
}

.format-table tbody tr:last-child td {
  border-bottom: none;
}

.format-table col.highlight {
  background: rgba(14, 116, 144, 0.06);
}

.format-table td.format-yes {
  color: var(--teal);
  font-weight: 700;
}

.format-table td.format-no {
  color: var(--muted);
}

.format-table th.format-col--r1 {
  background: var(--navy);
  color: #fff;
}

.format-table td.format-col--r1 {
  background: rgba(12, 30, 51, 0.04);
  font-weight: 600;
}
