/* ========== LEGAL PAGE STYLES ========== */
/* Pagine: Privacy, Terms, AML/KYC, Client Categorisation, Cookie */

.legal-page-header {
  padding: 72px 0 48px;
  background:
    radial-gradient(circle at 80% 0%, rgba(212,162,76,0.14) 0%, transparent 50%),
    radial-gradient(circle at 15% 100%, rgba(139,94,52,0.12) 0%, transparent 55%),
    linear-gradient(180deg, #FBF7EF 0%, #F5EEDF 100%);
  border-bottom: 1px solid var(--border-color);
}
.legal-page-header .eyebrow {
  background: rgba(212,162,76,0.18);
  color: #7A5A1E;
}
.legal-page-header h1 {
  max-width: 820px;
  margin: 14px 0 18px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}
.legal-page-header h1 .accent {
  color: #D4A24C;
  background: linear-gradient(90deg, #8B5E34, #D4A24C 60%, #E9C46A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.legal-page-header .lead {
  color: #4A3E2F;
  font-weight: 500;
  font-size: 16px;
}

.legal-content {
  padding: 56px 0 80px;
  background: #FFFBF4;
}
.legal-content .container {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* === Table of Contents (sidebar) === */
.legal-toc {
  position: sticky;
  top: 104px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(212,162,76,0.22);
  padding: 24px 20px 20px;
  box-shadow: 0 10px 30px rgba(24,18,11,.06);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,162,76,.45) transparent;
}
.legal-toc h6 {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: #8B5E34;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212,162,76,0.22);
  font-weight: 700;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.legal-toc ol li a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #5A4A35;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: all 0.22s ease;
}
.legal-toc ol li a:hover {
  background: rgba(212,162,76,0.12);
  color: #8B5E34;
  border-left-color: #D4A24C;
  padding-left: 12px;
  transform: translateX(2px);
}

.legal-meta-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(212,162,76,0.22);
  font-size: 12.5px;
}
.legal-meta-box > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(212,162,76,0.06) 0%, rgba(255,255,255,1) 100%);
  border: 1px solid rgba(212,162,76,0.18);
}
.legal-meta-box > div span {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A68B5B;
  font-weight: 700;
}
.legal-meta-box > div strong {
  font-size: 12.5px;
  color: #4A3E2F;
  line-height: 1.4;
  font-weight: 650;
}

/* === Legal body (testo) === */
.legal-body {
  background: #fff;
  padding: 44px 48px;
  border-radius: 20px;
  border: 1px solid rgba(212,162,76,0.20);
  box-shadow: 0 16px 48px rgba(24,18,11,0.08);
  color: #332818;
  font-size: 15.5px;
  line-height: 1.75;
}
.legal-body > p { margin: 0 0 16px; }
.legal-body a {
  color: #B7872E;
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid rgba(183,135,46,0.30);
  transition: all 0.2s ease;
}
.legal-body a:hover {
  color: #8B5E34;
  border-bottom-color: #8B5E34;
  border-bottom-width: 1.5px;
}

.legal-h2 {
  font-size: 22px;
  font-weight: 800;
  color: #1C1408;
  letter-spacing: -0.015em;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  padding-left: 16px;
  border-left: 5px solid #D4A24C;
  background: linear-gradient(90deg, rgba(212,162,76,0.10) 0%, rgba(212,162,76,0) 70%);
  scroll-margin-top: 96px;
}
.legal-body :first-child + .legal-h2,
.legal-body > .legal-h2:first-of-type,
.legal-body > p:first-of-type + .legal-h2 {
  margin-top: 8px;
}

.legal-h3 {
  font-size: 18px;
  font-weight: 700;
  color: #332818;
  letter-spacing: -0.01em;
  margin: 24px 0 10px;
}
.legal-h6 {
  font-size: 15.5px;
  font-weight: 700;
  color: #58431F;
  margin: 0 0 10px;
}

/* Lists */
.legal-ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.legal-ul > li {
  position: relative;
  padding-left: 22px;
}
.legal-ul > li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #D4A24C, #8B5E34);
  transform: rotate(45deg);
}
.legal-ul > li li::marker { color: #B7872E; }
.legal-ul li ul { margin-top: 8px; margin-bottom: 4px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px;}
.legal-ul ol { margin-top: 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* 2-col feature card grid */
.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 20px 0 24px;
}
.legal-card {
  background: linear-gradient(180deg, rgba(212,162,76,0.05) 0%, rgba(255,255,255,1) 100%);
  border: 1px solid rgba(212,162,76,0.25);
  border-radius: 16px;
  padding: 20px 22px;
  transition: all 0.3s ease;
}
.legal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(139,94,52,.10);
  border-color: rgba(212,162,76,0.42);
}
.legal-card h6 {
  font-size: 14.5px;
  font-weight: 750;
  color: #58431F;
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}
.legal-card > *:last-child { margin-bottom: 0; }
.legal-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.7; color: #4A3E2F;}
.legal-card ul { padding-left: 18px; margin: 0; font-size: 14px; line-height: 1.7; color: #4A3E2F; }
.legal-card ul li { margin-bottom: 4px; }

/* Tables */
.legal-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0 26px;
  border-radius: 14px;
  overflow: hidden;
  font-size: 14.5px;
  background: #fff;
  border: 1px solid rgba(212,162,76,0.30);
  box-shadow: 0 6px 18px rgba(24,18,11,.04);
}
.legal-table thead {
  background: linear-gradient(135deg, #D4A24C 0%, #B7872E 55%, #8B5E34 100%);
  color: #fff;
}
.legal-table th,
.legal-table td {
  padding: 12px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(212,162,76,0.18);
}
.legal-table th {
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 13.5px;
  line-height: 1.4;
}
.legal-table tbody tr:nth-child(even) td {
  background: rgba(251,241,217,0.45);
}
.legal-table tbody tr:hover td {
  background: rgba(212,162,76,0.10);
}
.legal-table tbody tr:last-child td { border-bottom: none; }
.legal-table code {
  background: rgba(139,94,52,0.12);
  color: #58431F;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12.5px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-weight: 550;
}

/* Highlight callout */
.legal-highlight {
  padding: 18px 22px;
  border-left: 4px solid #D4A24C;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(212,162,76,0.10) 0%, rgba(255,255,255,1) 100%);
  margin: 18px 0;
  font-size: 14.5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1050px) {
  .legal-content .container { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; max-height: unset; }
  .legal-body { padding: 32px 24px; }
}
@media (max-width: 680px) {
  .legal-page-header { padding: 56px 0 36px; }
  .legal-content { padding: 40px 0 64px; }
  .legal-body { padding: 24px 18px; border-radius: 16px; font-size: 14.5px; line-height: 1.7;}
  .legal-h2 { font-size: 19px; margin-top: 32px; padding-left: 12px;}
  .legal-grid { grid-template-columns: 1fr; gap: 14px; }
  .legal-table { font-size: 13px; display: block; overflow-x: auto; white-space: normal;}
  .legal-table th, .legal-table td { padding: 10px 12px; }
  .legal-toc { padding: 20px 16px; }
}
