/* ==========================================================================
   AAGENTO — LEGAL PAGES DESIGN SYSTEM (Privacy Policy & Terms)
   Matches Aagento Core Theme & SaaS Design Language
   ========================================================================== */

.legal-page-wrap {
  padding-top: 96px;
  padding-bottom: 80px;
  background: #f8fafc;
  min-height: 100vh;
  color: #0f172a;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.legal-hero {
  padding: 32px 0 40px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 40px;
}

.legal-hero-header {
  max-width: 880px;
}

.legal-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin: 16px 0 14px;
  letter-spacing: -0.02em;
}

.legal-hero-lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: #475569;
  margin-bottom: 24px;
}

.legal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.legal-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.14);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.legal-meta-pill svg {
  width: 14px;
  height: 14px;
  color: #325ff4;
}

/* ── 2-Column Grid Layout ── */
.legal-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Sticky Sidebar TOC ── */
.legal-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-toc-card {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.12);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.legal-toc-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 14px;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-toc-link:hover,
.legal-toc-link.active {
  background: rgba(50, 95, 244, 0.08);
  color: #325ff4;
  font-weight: 600;
}

.legal-toc-num {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  font-family: monospace;
}

.legal-sidebar-card {
  background: linear-gradient(135deg, rgba(47, 85, 212, 0.06) 0%, rgba(96, 197, 120, 0.06) 100%);
  border: 1px solid rgba(50, 95, 244, 0.14);
  border-radius: 16px;
  padding: 22px;
}

.legal-sidebar-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px;
}

.legal-sidebar-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #64748b;
  margin: 0 0 14px;
}

.legal-sidebar-card .sp-btn-secondary {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  padding: 9px 16px;
}

/* ── Content Sections ── */
.legal-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.legal-section-card {
  background: #ffffff;
  border: 1px solid rgba(50, 95, 244, 0.1);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  scroll-margin-top: 110px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.legal-section-card:hover {
  border-color: rgba(50, 95, 244, 0.22);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.legal-section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(50, 95, 244, 0.09);
  color: #325ff4;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legal-section-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.legal-section-card p {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 16px;
}

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

.legal-section-card ul {
  margin: 16px 0 20px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-section-card li {
  position: relative;
  padding-left: 28px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #334155;
}

.legal-section-card li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #325ff4;
}

/* Callout Info Box */
.legal-callout {
  background: linear-gradient(135deg, rgba(50, 95, 244, 0.05) 0%, rgba(96, 197, 120, 0.05) 100%);
  border-left: 4px solid #325ff4;
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 20px 0;
}

.legal-callout p {
  margin: 0;
  font-size: 0.95rem;
  color: #1e293b;
  line-height: 1.6;
}

/* Contact Card */
.legal-contact-box {
  background: #f8fafc;
  border: 1px solid rgba(50, 95, 244, 0.12);
  border-radius: 14px;
  padding: 24px;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.legal-contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.legal-contact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.legal-contact-value a {
  color: #325ff4;
  text-decoration: none;
}

.legal-contact-value a:hover {
  text-decoration: underline;
}

/* ── Responsive Mobile ── */
@media (max-width: 991px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-toc-card {
    padding: 18px 20px;
  }

  .legal-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px;
  }

  .legal-section-card {
    padding: 26px 24px;
  }
}

@media (max-width: 640px) {
  .legal-page-wrap {
    padding-top: 80px;
  }

  .legal-hero h1 {
    font-size: 1.85rem;
  }

  .legal-toc-list {
    grid-template-columns: 1fr;
  }

  .legal-contact-box {
    grid-template-columns: 1fr;
  }
}

