/* =============================================================
   MyJourney -- Legal pages CSS
   Privacy Policy + Termini di Servizio
   ============================================================= */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-10) var(--content-pad) var(--space-16);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-3);
  text-decoration: none;
  margin-bottom: var(--space-8);
  transition: color var(--transition-fast);
}
.legal-back:hover { color: var(--text-1); opacity: 1; }
.legal-back svg { width: 14px; height: 14px; }

.legal-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.legal-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.legal-title {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  color: var(--text-1);
  margin-bottom: var(--space-3);
}

.legal-meta {
  font-size: var(--text-sm);
  color: var(--text-3);
  font-weight: var(--weight-light);
}

/* ---- CONTENUTO --------------------------------------------- */

.legal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.legal-section { }

.legal-section-num {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.legal-section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-1);
  margin-bottom: var(--space-4);
}

.legal-section p {
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.legal-section ul li,
.legal-section ol li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-light);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
}

.legal-section ul li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
}

.legal-section ol {
  counter-reset: legal-counter;
}
.legal-section ol li {
  counter-increment: legal-counter;
}
.legal-section ol li::before {
  content: counter(legal-counter) '.';
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent);
  flex-shrink: 0;
  min-width: 18px;
  margin-top: 1px;
}

/* Tabella finalita'/base giuridica */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}

.legal-table th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-strong);
}

.legal-table td {
  padding: var(--space-3);
  font-weight: var(--weight-light);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

/* Highlight box */
.legal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
}

.legal-box p {
  font-size: var(--text-sm) !important;
  color: var(--text-2) !important;
  margin: 0 !important;
}

/* Email link */
.legal-email {
  color: var(--accent);
  font-weight: var(--weight-medium);
  text-decoration: none;
  word-break: break-all;
}

/* Divider */
.legal-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}

/* Sub-sezione */
.legal-sub-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  margin-bottom: var(--space-3);
  margin-top: var(--space-5);
}

/* Pill piano */
.legal-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent);
}
