/* ============================================
   ADAAF ADVISORY SERVICES - LEGAL PAGES
   Extends style.css. Link this AFTER style.css.
   ============================================ */

/* === LEGAL HERO === */
.legal-hero {
  background: var(--navy);
  padding: 9rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.05;
  top: -180px; right: -120px;
  pointer-events: none;
}
.legal-breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.legal-breadcrumb a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.legal-breadcrumb a:hover { color: var(--gold-light); }
.legal-hero .eyebrow {
  position: relative;
  z-index: 1;
}
.legal-hero h1 {
  color: var(--white);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.legal-updated {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  position: relative;
  z-index: 1;
}

/* === LEGAL CONTENT === */
.legal-content { padding: 4rem 0 6rem; }
.legal-content .container-narrow { max-width: 760px; }

/* Quick links between legal pages */
.legal-nav-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}
.legal-nav-pages a {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.legal-nav-pages a:hover { border-color: var(--gold); color: var(--navy); }
.legal-nav-pages a.active {
  background: var(--navy);
  color: var(--gold-light);
  border-color: var(--navy);
}

/* Table of contents */
.legal-toc {
  background: var(--cream);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 3rem;
}
.legal-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.legal-toc li { margin-bottom: 0.45rem; line-height: 1.5; }
.legal-toc a { color: var(--text-muted); }
.legal-toc a:hover { color: var(--navy); }

/* Prose body */
.legal-body h2 {
  font-size: 1.55rem;
  color: var(--navy);
  margin: 2.75rem 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}
.legal-body > h2:first-of-type { margin-top: 0; }
.legal-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 1.5rem 0 0.75rem;
}
.legal-body p { margin-bottom: 1.1rem; font-size: 0.96rem; line-height: 1.8; }
.legal-body ul, .legal-body ol {
  margin: 0 0 1.1rem 1.25rem;
  color: #4A5568;
  font-size: 0.96rem;
  line-height: 1.8;
}
.legal-body li { margin-bottom: 0.5rem; }
.legal-body strong { color: var(--navy); }
.legal-body a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(201,168,76,0.35); }
.legal-body a:hover { color: var(--navy); }

/* Callout / disclaimer box */
.legal-callout {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}
.legal-callout strong { color: var(--navy); }

/* Tables */
.legal-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.legal-table th, .legal-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table th {
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Contact card at end of each page */
.legal-contact-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-top: 3rem;
}
.legal-contact-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.85rem;
}
.legal-contact-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.legal-contact-card a { color: var(--gold-light); text-decoration: none; }
.legal-contact-card a:hover { color: var(--gold); }
.legal-contact-card strong { color: var(--white); }

/* Dynamic fields populated from Admin -> Settings.
   Bracketed text remains visible (in gold) until the admin
   fills in the corresponding field; then it's replaced with
   plain text matching the surrounding content. */
.dyn-field {
  color: var(--gold);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-hero { padding: 7.5rem 0 2.5rem; }
  .legal-nav-pages { gap: 0.5rem; }
  .legal-nav-pages a { font-size: 0.76rem; padding: 0.45rem 0.9rem; }
}
