/* =========================================================
   FrontPayApp.com — Legal Pages & Sitemap Stylesheet
   Loaded alongside style.css on: privacy-policy.html,
   terms-of-service.html, sitemap.html
   ========================================================= */

/* ── Legal Hero ─────────────────────────────────────────── */
.legal-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a7a 100%);
  padding: 52px 0 44px;
  color: #fff;
  border-bottom: 4px solid var(--teal);
}
.legal-hero h1   { color: #fff; margin-bottom: 10px; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.legal-hero p    { color: rgba(255,255,255,.72); max-width: 540px; font-size: .95rem; margin: 0; }
.legal-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.legal-hero-meta span {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.07);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
}

/* ── Legal Layout ───────────────────────────────────────── */
.legal-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: flex-start;
  padding: 52px 0 72px;
}
.legal-sidebar {
  position: sticky;
  top: 24px;
}
.legal-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.legal-toc h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 700;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc-counter;
  padding: 0;
}
.legal-toc ol li {
  counter-increment: toc-counter;
  margin-bottom: 2px;
}
.legal-toc ol li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: .83rem;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.legal-toc ol li a::before {
  content: counter(toc-counter);
  font-size: .7rem;
  font-weight: 700;
  color: var(--teal);
  background: rgba(6,182,212,.1);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.legal-toc ol li a:hover {
  background: var(--bg2);
  color: var(--navy);
}
.legal-toc ol li a.active {
  background: rgba(6,182,212,.1);
  color: var(--navy);
  font-weight: 600;
}

/* ── Legal Document Body ────────────────────────────────── */
.legal-body { min-width: 0; }

.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 24px;
}
.legal-section:last-child { margin-bottom: 0; }

.legal-section-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.legal-num-badge {
  width: 32px; height: 32px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.legal-section h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0;
}
.legal-section > p,
.legal-section > ul,
.legal-section > ol {
  font-size: .93rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 14px;
}
.legal-section > h3 {
  font-size: 1rem;
  color: var(--navy);
  margin: 22px 0 8px;
}
.legal-section ul,
.legal-section ol {
  padding-left: 22px;
}
.legal-section ul li,
.legal-section ol li {
  margin-bottom: 6px;
  font-size: .93rem;
  line-height: 1.75;
  color: #374151;
}
.legal-section hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Highlight boxes inside legal content */
.legal-highlight {
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
  display: flex;
  gap: 12px;
  font-size: .88rem;
  line-height: 1.65;
}
.legal-highlight.info    { background: #EFF6FF; border-left: 4px solid #3B82F6; }
.legal-highlight.warning { background: #FFFBEB; border-left: 4px solid #F59E0B; }
.legal-highlight.success { background: #F0FDF4; border-left: 4px solid #22C55E; }
.legal-highlight.danger  { background: #FFF1F2; border-left: 4px solid #EF4444; }
.legal-highlight .lh-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.legal-highlight p { margin: 0; }
.legal-highlight strong { color: var(--navy); }

/* Section divider between legal sections */
.legal-divider {
  border: none;
  border-top: 2px dashed var(--border);
  margin: 40px 0;
}

/* Effective date tag */
.legal-effective {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  margin-bottom: 20px;
}

/* Contact box */
.legal-contact-box {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: #fff;
  margin-top: 24px;
}
.legal-contact-box h4 { color: #fff; margin-bottom: 12px; }
.legal-contact-box p  { color: rgba(255,255,255,.72); font-size: .88rem; margin-bottom: 6px; }
.legal-contact-box a  { color: var(--teal); }

/* ── HTML Sitemap ─────────────────────────────────────────── */
.sitemap-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a7a 100%);
  padding: 52px 0 44px;
  color: #fff;
  text-align: center;
  border-bottom: 4px solid var(--teal);
}
.sitemap-hero h1 { color: #fff; margin-bottom: 10px; }
.sitemap-hero p  { color: rgba(255,255,255,.72); max-width: 500px; margin: 0 auto; }

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 44px 0;
}
.sitemap-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sitemap-cat-header {
  background: var(--navy);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sitemap-cat-header h3 {
  color: #fff;
  font-size: .92rem;
  margin: 0;
}
.sitemap-cat-icon { font-size: 1.1rem; }
.sitemap-cat-body { padding: 8px 0; }
.sitemap-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: .875rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.sitemap-link:last-child { border-bottom: none; }
.sitemap-link:hover {
  background: var(--bg2);
  color: var(--navy);
  padding-left: 26px;
}
.sitemap-link::before {
  content: '→';
  color: var(--teal);
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
  transition: transform .15s;
}
.sitemap-link:hover::before { transform: translateX(3px); }
.sitemap-link-priority {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.priority-high   { background: #DCFCE7; color: #15803D; }
.priority-medium { background: #EFF6FF; color: #1D4ED8; }
.priority-low    { background: #F1F5F9; color: #64748B; }

.sitemap-xml-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.sitemap-xml-box p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-wrap {
    grid-template-columns: 1fr;
    padding: 36px 0 52px;
  }
  .legal-sidebar { position: static; }
  .legal-toc { display: none; }
}
@media (max-width: 600px) {
  .sitemap-grid { grid-template-columns: 1fr; }
  .legal-hero { padding: 36px 0 28px; }
}
