/* ═══════════════════════════════════════════════
   YoldaPlus — Legal pages stylesheet
   ═══════════════════════════════════════════════ */

/* Hero variant for legal pages */
.legal-hero .pb1 { background: var(--blue); }
.legal-hero .pb2 { background: #4527A0; }

.legal-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

/* ── Layout ─────────────────────────────────── */
.legal-section { padding: 72px 0 100px; background: var(--white); }

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}

/* ── Table of Contents sidebar ──────────────── */
.legal-toc {
  position: sticky;
  top: 96px;
}
.toc-inner {
  background: var(--gray-light);
  border: 1px solid var(--border-solid);
  border-radius: 16px;
  padding: 24px 20px;
}
.toc-inner h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.toc-inner nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toc-inner nav a {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: var(--t);
  font-weight: 500;
  line-height: 1.4;
}
.toc-inner nav a:hover {
  background: var(--blue-pale);
  color: var(--blue);
}

/* ── Content area ───────────────────────────── */
.legal-content {
  min-width: 0;
}

.legal-intro-box {
  background: var(--blue-pale);
  border: 1px solid rgba(21,101,192,.15);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.legal-intro-box p {
  font-size: 15px;
  color: var(--blue);
  line-height: 1.7;
  margin: 0;
}

.legal-block {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border-solid);
  scroll-margin-top: 100px;
}
.legal-block:last-of-type {
  border-bottom: none;
}

.legal-block h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  scroll-margin-top: 100px;
}
.legal-block h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-mid);
  margin: 24px 0 10px;
  letter-spacing: -0.01em;
}
.legal-block p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-block p:last-child { margin-bottom: 0; }
.legal-block a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-block a:hover { color: var(--blue-mid); }

.legal-block ul,
.legal-block ol {
  padding-left: 0;
  margin-bottom: 14px;
}
.legal-block ul li,
.legal-block ol li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 4px 0 4px 22px;
  position: relative;
}
.legal-block ul li::before {
  content: '–';
  position: absolute;
  left: 6px;
  color: var(--blue);
  font-weight: 600;
}
.legal-block ol { counter-reset: ol-counter; }
.legal-block ol li::before {
  content: counter(ol-counter) '.';
  counter-increment: ol-counter;
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
}

.legal-note {
  background: #FFFDE7;
  border-left: 3px solid #FFC107;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
  color: #795548 !important;
  margin-top: 12px;
}

.legal-highlight-box {
  background: var(--blue-pale);
  border: 1px solid rgba(21,101,192,.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-highlight-box p {
  font-size: 14px;
  color: var(--blue);
  margin: 0;
}
.legal-highlight-box.warning {
  background: #FFF3E0;
  border-color: rgba(255,143,0,.25);
}
.legal-highlight-box.warning p { color: #E65100; }

/* ── Definition list ────────────────────────── */
.legal-def-list { padding-left: 0 !important; }
.legal-def-list li {
  padding: 10px 14px 10px 0 !important;
  border-bottom: 1px solid var(--border-solid);
}
.legal-def-list li:last-child { border-bottom: none; }
.legal-def-list li::before { display: none !important; }
.legal-def-list strong { color: var(--dark); }

/* ── Tables ─────────────────────────────────── */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-solid);
}
.legal-table th {
  background: var(--gray-light);
  color: var(--text-mid);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-solid);
}
.legal-table td {
  padding: 12px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0,0,0,.05);
  vertical-align: top;
}
.legal-table tbody tr:last-child td { border-bottom: none; }
.legal-table tbody tr:hover td { background: var(--gray-light); }
.legal-table td strong { color: var(--text-mid); }

/* ── Rights grid ────────────────────────────── */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}
.right-card {
  background: var(--gray-light);
  border: 1px solid var(--border-solid);
  border-radius: 14px;
  padding: 20px;
  transition: var(--t);
}
.right-card:hover {
  border-color: var(--blue-pale);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.right-icon { font-size: 24px; margin-bottom: 10px; display: block; }
.right-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}
.right-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 !important;
}

/* ── Contact cards ──────────────────────────── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}
.contact-card-legal {
  background: var(--gray-light);
  border: 1px solid var(--border-solid);
  border-radius: 12px;
  padding: 18px;
}
.contact-card-legal h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.contact-card-legal p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 4px !important;
}
.contact-card-legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* ── Related docs ───────────────────────────── */
.legal-also {
  background: var(--gray-light);
  border: 1px solid var(--border-solid);
  border-radius: 16px;
  padding: 24px 28px;
  margin-top: 40px;
}
.legal-also h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 14px;
}
.legal-also-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.legal-also-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--white);
  border: 1.5px solid var(--border-solid);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--t);
  text-decoration: none !important;
}
.legal-also-links a:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .toc-inner { margin-bottom: 0; }
  .toc-inner nav { flex-direction: row; flex-wrap: wrap; }
  .toc-inner nav a { font-size: 12px; }
  .rights-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .legal-section { padding: 48px 0 72px; }
  .legal-block h2 { font-size: 20px; }
  .rights-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .legal-table { font-size: 12.5px; }
  .legal-table th, .legal-table td { padding: 9px 12px; }
  .legal-also-links { flex-direction: column; }
  .legal-also-links a { width: 100%; justify-content: center; }
}
