/* =============================================
   LENDLY USA — Legal & Sitemap Stylesheet
   For: privacy.html, terms.html, sitemap.html
   ============================================= */

/* ── Legal Page Header ── */
.legal-header {
  background: linear-gradient(135deg, #0369A1 0%, #0284C7 100%);
  padding: 56px 0 44px;
  color: #fff;
  position: relative;
}
.legal-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.08);
  pointer-events: none;
}
.legal-header .container { position: relative; z-index: 1; }
.legal-header h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 10px;
}
.legal-header .legal-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
  margin-bottom: 16px;
}
.legal-header p {
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  max-width: 720px;
  margin: 0;
}
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  margin-top: 18px;
}
.legal-updated::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #4ADE80;
  border-radius: 50%;
}

/* ── Legal Layout ── */
.legal-wrap {
  padding: 56px 0 80px;
}
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: flex-start;
}

/* ── Sticky Table of Contents ── */
.legal-toc {
  position: sticky;
  top: 28px;
  background: #F0F9FF;
  border: 1px solid #DBEAFE;
  border-radius: 12px;
  padding: 22px 22px 18px;
}
.legal-toc-title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #0369A1;
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-toc ol li {
  counter-increment: toc;
}
.legal-toc ol li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: .85rem;
  color: #475569;
  text-decoration: none;
  line-height: 1.4;
  transition: all .15s;
}
.legal-toc ol li a::before {
  content: counter(toc);
  background: #fff;
  border: 1px solid #DBEAFE;
  color: #0369A1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.legal-toc ol li a:hover {
  background: #fff;
  color: #0C4A6E;
}
.legal-toc ol li a:hover::before {
  background: #0369A1;
  color: #fff;
  border-color: #0369A1;
}

/* ── Legal Content (right column) ── */
.legal-content {
  background: #fff;
  border-radius: 12px;
  padding: 44px 48px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 16px rgba(2,132,199,.06);
}
.legal-content h2 {
  font-size: 1.35rem;
  color: var(--navy);
  margin: 36px 0 14px;
  scroll-margin-top: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid #EFF6FF;
  display: flex;
  align-items: center;
  gap: 12px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content h2 .h2-num {
  background: linear-gradient(135deg, #EF4444, #F87171);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  flex-shrink: 0;
}
.legal-content h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 22px 0 10px;
  font-weight: 700;
}
.legal-content p {
  font-size: .94rem;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal-content ul, .legal-content ol {
  margin: 12px 0 18px 4px;
  padding-left: 22px;
  color: #334155;
}
.legal-content ul li, .legal-content ol li {
  font-size: .92rem;
  line-height: 1.75;
  margin-bottom: 7px;
  padding-left: 4px;
}
.legal-content ul li::marker { color: #EF4444; font-size: 1.1em; }
.legal-content ol li::marker { color: #0369A1; font-weight: 700; }
.legal-content strong { color: var(--navy); font-weight: 700; }
.legal-content a {
  color: #1D4ED8;
  text-decoration: underline;
  text-decoration-color: #BFDBFE;
  text-underline-offset: 3px;
}
.legal-content a:hover { color: #EF4444; text-decoration-color: #FCA5A5; }

/* ── Callout Box (warnings, notes) ── */
.legal-callout {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: .9rem;
  color: #78350F;
}
.legal-callout.info {
  background: #EFF6FF;
  border-left-color: #0369A1;
  color: #0C4A6E;
}
.legal-callout.danger {
  background: #FEF2F2;
  border-left-color: #EF4444;
  color: #991B1B;
}
.legal-callout strong { color: inherit; }

/* ── Definitions / Terms Table ── */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .88rem;
}
.legal-table th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
}
.legal-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  color: #475569;
  vertical-align: top;
}
.legal-table tr:nth-child(even) td { background: #F8FAFC; }
.legal-table td:first-child { font-weight: 700; color: var(--navy); width: 30%; }

/* ── Contact Block ── */
.legal-contact-block {
  background: linear-gradient(135deg, #0369A1 0%, #0284C7 100%);
  border-radius: 12px;
  padding: 32px;
  color: #fff;
  margin: 40px 0 0;
  text-align: center;
}
.legal-contact-block h3 { color: #fff; margin-bottom: 10px; font-size: 1.15rem; }
.legal-contact-block p { color: rgba(255,255,255,.85); font-size: .9rem; margin-bottom: 18px; }
.legal-contact-block a {
  display: inline-block;
  background: #EF4444;
  color: #fff;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s;
}
.legal-contact-block a:hover { background: #DC2626; color: #fff; }

/* ═══════════════════════════════════════════
   SITEMAP PAGE STYLES
   ═══════════════════════════════════════════ */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.sitemap-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 26px;
  transition: box-shadow .2s, transform .2s;
}
.sitemap-card:hover {
  box-shadow: 0 8px 28px rgba(2,132,199,.12);
  transform: translateY(-2px);
}
.sitemap-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid #EFF6FF;
}
.sitemap-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #EF4444, #F87171);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.sitemap-card-header h2 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--navy);
}
.sitemap-card-header .pages-count {
  background: #EFF6FF;
  color: #0369A1;
  font-size: .72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
}
.sitemap-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sitemap-card ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: .88rem;
  color: #475569;
  text-decoration: none;
  transition: all .15s;
}
.sitemap-card ul li a::before {
  content: '→';
  color: #EF4444;
  font-weight: 800;
  font-size: .9rem;
  transition: transform .15s;
}
.sitemap-card ul li a:hover {
  background: #F0F9FF;
  color: var(--navy);
}
.sitemap-card ul li a:hover::before { transform: translateX(3px); }
.sitemap-card ul li a .meta {
  margin-left: auto;
  font-size: .72rem;
  color: #94A3B8;
}

.sitemap-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #E2E8F0;
}
.sitemap-stat {
  background: #F0F9FF;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}
.sitemap-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #EF4444;
  display: block;
  line-height: 1;
}
.sitemap-stat-label {
  font-size: .72rem;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 6px;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: relative; top: 0; }
  .legal-content { padding: 28px 24px; }
  .sitemap-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .sitemap-stats { grid-template-columns: 1fr; }
  .legal-content { padding: 24px 20px; }
  .legal-content h2 { font-size: 1.15rem; }
}
