/* ============================================================
   LEGAL.CSS — Royal Technologies
   Place this file at: assets/css/legal.css
   It extends assets/css/style.css — do NOT modify style.css.
   Uses the same CSS variables, fonts, spacing, and components.
   ============================================================ */

/* ============================================================
   1. LEGAL HERO BANNER
   Uses the same navy/pink/blue brand palette from the site.
   Mirrors the hero section's feel with a compact banner form.
   ============================================================ */
.legal-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding: 80px 0 72px;
}

/* Soft pink glow — top right */
.legal-hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237, 46, 114, 0.22) 0%, transparent 70%);
  top: -160px;
  right: -100px;
  pointer-events: none;
}

/* Soft blue glow — bottom left */
.legal-hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 159, 237, 0.18) 0%, transparent 70%);
  bottom: -120px;
  left: -80px;
  pointer-events: none;
}

.legal-hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}

/* Breadcrumb trail */
.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.legal-breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-breadcrumb a:hover {
  color: #fff;
}

.legal-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 16px;
  line-height: 1;
}

.legal-breadcrumb__current {
  color: rgba(255, 255, 255, 0.75);
}

/* Page label — mirrors .why__label / .services__label style */
.legal-hero__label {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--blue);
  font-weight: 400;
  margin-bottom: 6px;
}

/* Page H1 — mirrors .why__title / .services__title sizing */
.legal-hero__title {
  font-family: var(--font-bold);
  font-size: 56px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 18px;
}

/* Last-updated badge — small pill using .btn shape language */
.legal-hero__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.legal-hero__meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-btn);
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.legal-hero__meta-pill svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255, 255, 255, 0.5);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* ============================================================
   2. MAIN CONTENT AREA
   Matches the site's section padding pattern (80px top/bottom).
   Uses var(--bg) = #f8faff as background.
   ============================================================ */
.legal-body {
  background: var(--bg);
  padding: 60px 0 80px;
}

.legal-body__wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

/* ============================================================
   3. SIDEBAR
   Uses the same white card + shadow language as .why__card
   ============================================================ */
.legal-sidebar {
  position: sticky;
  top: 116px; /* sits below 100px navbar + small gap */
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Nav section — mirrors .svc-card white card style */
.legal-sidebar__box {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.legal-sidebar__box-title {
  font-family: var(--font-bold);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.legal-sidebar__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-sidebar__nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #555;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}

.legal-sidebar__nav-list a:hover {
  background: rgba(21, 97, 237, 0.07);
  color: var(--dark-blue);
}

.legal-sidebar__nav-list a svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
  opacity: 0.6;
}

/* Pages nav list — links to all 5 legal pages */
.legal-pages-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-pages-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #444;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.legal-pages-list a:hover {
  background: rgba(21, 97, 237, 0.06);
  border-color: rgba(21, 97, 237, 0.12);
  color: var(--dark-blue);
}

.legal-pages-list a.current {
  background: rgba(21, 97, 237, 0.08);
  border-color: rgba(21, 97, 237, 0.18);
  color: var(--dark-blue);
  font-family: var(--font-bold);
}

.legal-pages-list__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(21, 97, 237, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legal-pages-list a.current .legal-pages-list__icon {
  background: linear-gradient(135deg, var(--dark-blue), var(--blue));
}

.legal-pages-list__icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--dark-blue);
  fill: none;
  stroke-width: 1.5;
}

.legal-pages-list a.current .legal-pages-list__icon svg {
  stroke: #fff;
}

/* CTA card — mirrors the gradient used in .footer */
.legal-sidebar__cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark-blue) 100%);
  border-radius: var(--radius-card);
  padding: 24px;
  color: #fff;
}

.legal-sidebar__cta-title {
  font-family: var(--font-bold);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.legal-sidebar__cta-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Uses exact same .btn structure as main site */
.legal-sidebar__cta .btn {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   4. ARTICLE CONTENT
   ============================================================ */
.legal-article {
  min-width: 0;
}

/* Dark intro banner — mirrors .techstack panel --grad style */
.legal-intro {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2266 100%);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.legal-intro::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 159, 237, 0.14) 0%, transparent 70%);
  right: -60px;
  top: -80px;
  pointer-events: none;
}

.legal-intro__text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.legal-intro__text strong {
  color: #fff;
  font-family: var(--font-bold);
}

/* Individual policy section card — mirrors .why__card / .svc-card */
.legal-section {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  scroll-margin-top: 120px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

/* Section heading row with numbered badge */
.legal-section__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Numbered badge — mirrors .why__card-icon gradient */
.legal-section__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gradient-icon);
  font-family: var(--font-bold);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12.4px rgba(0, 0, 0, 0.11);
}

.legal-section__title {
  font-family: var(--font-bold);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
  padding-top: 7px;
}

/* Sub-heading inside a section */
.legal-section h3 {
  font-family: var(--font-bold);
  font-size: 17px;
  font-weight: 700;
  color: var(--dark-blue);
  margin-top: 22px;
  margin-bottom: 10px;
}

/* Body paragraph */
.legal-section p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.82;
  color: #4c4c5e;
  margin-bottom: 14px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

/* Unordered list — custom dot using brand gradient */
.legal-section ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-section ul li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: #4c4c5e;
  padding-left: 26px;
  position: relative;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dark-blue), var(--blue));
}

/* Ordered list */
.legal-section ol {
  list-style: none;
  padding-left: 0;
  margin-bottom: 14px;
  counter-reset: legal-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-section ol li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: #4c4c5e;
  padding-left: 28px;
  position: relative;
  counter-increment: legal-counter;
}

.legal-section ol li::before {
  content: counter(legal-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-bold);
  font-size: 14px;
  font-weight: 700;
  color: var(--dark-blue);
}

/* Blue info callout */
.legal-note {
  background: linear-gradient(135deg, rgba(21, 97, 237, 0.05), rgba(0, 159, 237, 0.05));
  border-left: 4px solid var(--dark-blue);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 18px 0;
}

.legal-note p {
  margin-bottom: 0 !important;
  color: var(--navy) !important;
  font-size: 15px !important;
}

/* Pink warning callout */
.legal-warn {
  background: rgba(237, 46, 114, 0.05);
  border-left: 4px solid var(--pink);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 18px 0;
}

.legal-warn p {
  margin-bottom: 0 !important;
  color: var(--navy) !important;
  font-size: 15px !important;
}

/* Inline link */
.legal-link {
  color: var(--dark-blue);
  text-decoration: none;
  font-family: var(--font-bold);
  transition: color 0.2s;
}

.legal-link:hover {
  color: var(--pink);
  text-decoration: underline;
}

/* ============================================================
   5. RESPONSIVE — TABLET (769–1100px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1100px) {
  .legal-hero__title {
    font-size: 42px;
  }

  .legal-body__wrap {
    grid-template-columns: 220px 1fr;
    gap: 28px;
  }

  .legal-section {
    padding: 26px 28px;
  }

  .legal-intro {
    padding: 26px 28px;
  }
}

/* ============================================================
   6. RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .legal-hero {
    padding: 56px 0 48px;
  }

  .legal-hero__title {
    font-size: 32px;
  }

  .legal-hero__label {
    font-size: 16px;
  }

  .legal-hero__meta {
    gap: 10px;
  }

  .legal-hero__meta-pill {
    font-size: 12px;
    padding: 6px 12px;
  }

  .legal-body {
    padding: 32px 0 60px;
  }

  .legal-body__wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Article comes first on mobile, sidebar below */
  .legal-article {
    order: 1;
  }

  .legal-sidebar {
    position: static;
    order: 2;
  }

  .legal-section {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .legal-section__title {
    font-size: 19px;
  }

  .legal-section p,
  .legal-section ul li,
  .legal-section ol li {
    font-size: 15px;
  }

  .legal-intro {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .legal-intro__text {
    font-size: 15px;
  }

  .legal-sidebar__box {
    border-radius: 20px;
    padding: 20px;
  }

  .legal-sidebar__cta {
    border-radius: 20px;
    padding: 20px;
  }
}