/* =========================================================================
   AstroMitra legal pages — theme matches the real app (pure black base,
   warm gold accent, thin gold-outlined cards). Layered on top of
   Bootstrap 5.3 with data-bs-theme="dark".
   ========================================================================= */

:root {
  --am-bg: #000000;
  --am-surface: #0e0e0e;
  --am-surface-2: #161616;
  --am-border: #3a2f12;
  --am-border-soft: #241d0b;
  --am-gold: #e0b94f;
  --am-gold-deep: #c9a024;
  --am-text: #f2f2f2;
  --am-muted: #a3a3a3;
  --bs-body-bg: var(--am-bg);
  --bs-body-color: var(--am-text);
  --bs-link-color: var(--am-gold);
  --bs-link-hover-color: #f3d27a;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--am-bg);
  color: var(--am-text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
}

/* ---- Navbar ---- */
.am-navbar {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--am-border-soft);
}
.am-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
  color: #fff;
  text-decoration: none;
}
.am-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(224, 185, 79, 0.4);
  box-shadow: 0 0 12px rgba(224, 185, 79, 0.25);
  transition: transform 0.2s ease;
}
.am-brand:hover .am-brand-logo {
  transform: scale(1.06);
}
.am-brand span { color: var(--am-gold); }
.am-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--am-border);
  box-shadow: 0 4px 20px rgba(224, 185, 79, 0.25);
  object-fit: cover;
}
.am-navbar .nav-link { color: var(--am-muted); font-weight: 500; }
.am-navbar .nav-link:hover, .am-navbar .nav-link.active { color: var(--am-gold); }

/* ---- Page header ---- */
.am-hero { padding: 64px 0 28px; border-bottom: 1px solid var(--am-border-soft); }
.am-hero .eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--am-gold); border: 1px solid var(--am-border); border-radius: 100px; padding: 5px 14px; margin-bottom: 18px;
}
.am-hero h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -0.5px; }
.am-hero h1 span { color: var(--am-gold); }
.am-hero p.lead { color: var(--am-muted); max-width: 720px; }
.am-meta { color: var(--am-muted); font-size: 0.9rem; }

/* ---- Cards / sections ---- */
.am-card {
  background: var(--am-surface);
  border: 1px solid var(--am-border);
  border-radius: 18px;
  padding: 28px 30px;
  margin-bottom: 22px;
}
.am-card h2 { font-size: 1.35rem; font-weight: 700; color: #fff; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.am-card h2 .num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 10px; background: rgba(224, 185, 79, 0.12); color: var(--am-gold); font-size: 0.95rem; font-weight: 700;
  border: 1px solid var(--am-border);
}
.am-card h3 { font-size: 1.05rem; font-weight: 600; color: var(--am-gold); margin: 20px 0 8px; }
.am-card p, .am-card li { color: #d4d4d4; }
.am-card ul { padding-left: 1.2rem; }
.am-card li { margin-bottom: 6px; }
.am-card strong { color: #fff; }

/* ---- Table of contents ---- */
.am-toc {
  position: sticky; top: 90px;
  background: var(--am-surface); border: 1px solid var(--am-border-soft); border-radius: 16px; padding: 18px 18px 12px;
}
.am-toc h6 { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--am-muted); margin-bottom: 12px; }
.am-toc a {
  display: block; padding: 6px 10px; margin-bottom: 2px; border-radius: 8px; font-size: 0.9rem;
  color: var(--am-muted); text-decoration: none; border-left: 2px solid transparent;
}
.am-toc a:hover { color: #fff; background: var(--am-surface-2); }
.am-toc a.active { color: var(--am-gold); background: rgba(224, 185, 79, 0.08); border-left-color: var(--am-gold); }

/* ---- Callouts / tables ---- */
.am-callout {
  border-left: 3px solid var(--am-gold); background: rgba(224, 185, 79, 0.07);
  border-radius: 0 12px 12px 0; padding: 14px 18px; color: #e8e8e8; margin: 16px 0;
}
.am-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0 6px; font-size: 0.93rem; }
.am-table th {
  text-align: left; font-weight: 600; color: var(--am-gold); background: var(--am-surface-2);
  padding: 11px 14px; border: 1px solid var(--am-border-soft);
}
.am-table td { padding: 11px 14px; border: 1px solid var(--am-border-soft); color: #d4d4d4; vertical-align: top; }
.am-table tr:first-child th:first-child { border-top-left-radius: 10px; }
.am-table tr:first-child th:last-child { border-top-right-radius: 10px; }
.table-scroll { overflow-x: auto; }

/* ---- Buttons / footer ---- */
.btn-gold {
  background: linear-gradient(180deg, #ecc964, #c9a024); color: #1a1400; font-weight: 700; border: 0; border-radius: 12px; padding: 10px 22px;
}
.btn-gold:hover { filter: brightness(1.07); color: #1a1400; }
.am-footer { border-top: 1px solid var(--am-border-soft); padding: 34px 0; color: var(--am-muted); font-size: 0.9rem; margin-top: 30px; }
.am-footer a { color: var(--am-muted); text-decoration: none; margin: 0 10px; }
.am-footer a:hover { color: var(--am-gold); }

#toTop {
  position: fixed; right: 20px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--am-border);
  background: var(--am-surface-2); color: var(--am-gold); display: none; align-items: center; justify-content: center; font-size: 1.1rem; z-index: 50;
}
#toTop.show { display: flex; }

@media (max-width: 991px) { .am-toc { position: static; margin-bottom: 22px; } .am-card { padding: 22px 20px; } }
@media print { .am-navbar, .am-toc, #toTop, .am-footer { display: none !important; } body { background: #fff; color: #000; } .am-card { border-color: #ccc; background: #fff; } .am-card p, .am-card li { color: #222; } }
