/* =============================================================
   Facilitione — Legal Document Template  v3  (legal-styles.css)
   Clean white-card design — Privacy · Terms · Refund Policy
   ============================================================= */

/* ── Variables ──────────────────────────────────────────────── */
body.legal-document-template,
.legal-document {
  --ink:        #0d1f3c;
  --ink-80:     rgba(13,31,60,0.80);
  --ink-60:     rgba(13,31,60,0.60);
  --ink-40:     rgba(13,31,60,0.40);
  --ink-12:     rgba(13,31,60,0.12);
  --ink-06:     rgba(13,31,60,0.06);
  --white:      #ffffff;
  --page-bg:    #edf2f7;
  --blue:       #1a56db;
  --blue-light: #e8f0fd;
  --blue-mid:   rgba(26,86,219,0.15);
  --border:     #dde4ed;
  --sh-card:    0 2px 12px rgba(13,31,60,0.07), 0 1px 3px rgba(13,31,60,0.05);
  --sh-hover:   0 8px 28px rgba(13,31,60,0.11), 0 2px 6px rgba(13,31,60,0.07);
  --r-card:     18px;
  --r-md:       12px;
  --r-pill:     999px;
  --wrap:       min(1280px, calc(100vw - 48px));
  --ease:       cubic-bezier(0.16,1,0.3,1);
  --f-body:     "Manrope", system-ui, sans-serif;
}

/* ── Page background ─────────────────────────────────────────── */
body.legal-document-template {
  background: var(--page-bg);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ── Divi overrides ──────────────────────────────────────────── */
body.legal-document-template #main-content,
body.legal-document-template .et_post_meta_wrapper { padding: 0 !important; }
body.legal-document-template .et_pb_section { padding: 0 !important; background: transparent !important; }
body.legal-document-template .et_pb_row { max-width: none !important; padding: 0 !important; }

/* ── Base resets ─────────────────────────────────────────────── */
.legal-document *, .legal-document *::before, .legal-document *::after { box-sizing: border-box; }
.legal-document h1,.legal-document h2,.legal-document h3,
.legal-document p,.legal-document ul,.legal-document ol { margin:0; padding:0; }
.legal-document ul,.legal-document ol { list-style: none; }
.legal-document a { color: var(--blue); text-decoration: none; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
.legal-document { color: var(--ink); position: relative; }
.ld-wrap { width: var(--wrap); margin: 0 auto; }

/* ── Glass surface (hero card + nav only) ───────────────────── */
.ld-glass {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.60);
  box-shadow: var(--sh-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Scroll reveal ───────────────────────────────────────────── */
.legal-document [data-r] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.legal-document [data-r="fade"]  { transform: none; }
.legal-document [data-r].on      { opacity:1; transform: none !important; }

/* ── Label pill ──────────────────────────────────────────────── */
.ld-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue);
}
.ld-label::before {
  content:""; width:22px; height:1px; background:currentColor; opacity:0.45;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.ld-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  font-family: var(--f-body); font-size: 0.84rem; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  cursor: pointer; text-decoration: none;
}
.ld-btn:hover { transform: translateY(-2px); }
.ld-btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(26,86,219,0.28);
}
.ld-btn--primary:hover { box-shadow: 0 14px 32px rgba(26,86,219,0.38); }
.ld-btn--outline {
  background: var(--white);
  border-color: var(--border);
  color: var(--ink-80);
}
.ld-btn--outline:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--sh-card);
}

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.ld-hero {
  padding: 6vh 0 52px;
}
.ld-hero__grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(320px,0.6fr);
  gap: 36px;
  align-items: center;
}
.ld-hero__copy { padding-right: 12px; }
.ld-hero__headline {
  margin-top: 16px;
  font-size: clamp(1.9rem,3.2vw,2.9rem);
  line-height: 1.06; font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink); max-width: 20ch;
}
.ld-hero__headline em {
  display: block; margin-top: 10px;
  font-style: normal; font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-60); font-size: 0.54em;
}
.ld-hero__lede {
  margin-top: 18px; max-width: 48ch;
  font-size: 0.97rem; line-height: 1.75; color: var(--ink-60);
}
.ld-hero__actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
}

/* Hero card */
.ld-hero__card {
  padding: 4px; border-radius: 28px;
  background: linear-gradient(145deg,#122045,#1a3670);
}
.ld-hero__card-inner {
  padding: 26px; border-radius: 24px;
  background: linear-gradient(155deg,rgba(18,32,69,0.97),rgba(24,48,100,0.95));
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.06);
}
.ld-card__eyebrow {
  font-size:0.62rem; font-weight:800; letter-spacing:0.22em; text-transform:uppercase;
  color: rgba(255,255,255,0.50);
}
.ld-card__title {
  margin-top:14px; max-width:18ch;
  font-size:1.3rem; line-height:1.1; font-weight:800; letter-spacing:-0.035em;
}
.ld-card__title em {
  display:block; margin-top:6px;
  font-style:normal; font-weight:400; color: rgba(255,255,255,0.55);
  font-size: 0.78em;
}
.ld-card__text {
  margin-top:14px; max-width:36ch;
  font-size:0.81rem; line-height:1.65; color: rgba(255,255,255,0.72);
}
.ld-card__stats {
  display:grid; grid-template-columns: repeat(2,1fr);
  gap:10px; margin-top:20px; padding-top:18px;
  border-top:1px solid rgba(255,255,255,0.09);
}
.ld-card__stat {
  padding:14px; border-radius:14px;
  background: rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.07);
}
.ld-card__stat strong {
  display:block; font-size:0.62rem; font-weight:800;
  letter-spacing:0.14em; text-transform:uppercase; color: rgba(255,255,255,0.88);
}
.ld-card__stat span {
  display:block; margin-top:7px;
  font-size:0.73rem; line-height:1.52; color: rgba(255,255,255,0.62);
}

/* ══════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT
   ══════════════════════════════════════════════════════════════ */
.ld-layout {
  display: grid;
  grid-template-columns: minmax(220px,260px) minmax(0,1fr);
  gap: 24px;
  margin-top: 36px;
  padding-bottom: 90px;
  align-items: start;
}

/* ── Sticky Side Nav ─────────────────────────────────────────── */
.ld-nav {
  position: sticky; top: 24px;
  padding: 20px; border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--sh-card);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-12) transparent;
}
.ld-nav__title {
  font-size:0.64rem; font-weight:800; letter-spacing:0.18em; text-transform:uppercase;
  color: var(--blue); margin-bottom:14px;
}
.ld-nav__list { display:grid; gap:4px; }
.ld-nav__list a {
  display:block; padding:10px 12px; border-radius:10px;
  font-size:0.77rem; line-height:1.4; color: var(--ink-60);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.ld-nav__list a:hover {
  background: var(--blue-light);
  color: var(--blue);
}
.ld-nav__list a.active {
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
  padding-left: 16px;
  border-left: 3px solid var(--blue);
}
.ld-nav__also {
  margin-top:18px; padding-top:16px;
  border-top:1px solid var(--ink-06);
}
.ld-nav__also-title {
  font-size:0.62rem; font-weight:800; letter-spacing:0.14em; text-transform:uppercase;
  color: var(--ink-40); margin-bottom:8px;
}
.ld-nav__also-link {
  display:block; padding:7px 10px; border-radius:8px;
  font-size:0.73rem; color: var(--ink-60); margin-bottom:3px;
  transition: color 0.2s ease, background 0.2s ease;
}
.ld-nav__also-link:hover { color: var(--blue); background: var(--blue-light); }

/* ══════════════════════════════════════════════════════════════
   SECTION CARDS  —  clean white blocks
   ══════════════════════════════════════════════════════════════ */
.ld-content { display: grid; gap: 18px; }

.ld-section {
  padding: 32px 36px;
  border-radius: var(--r-card);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--sh-card);
  scroll-margin-top: 120px;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.ld-section:hover {
  box-shadow: var(--sh-hover);
  transform: translateY(-1px);
}

/* ── Section header ──────────────────────────────────────────── */
.ld-section__eyebrow {
  display: block;
  font-size: 0.60rem; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.ld-section__title {
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink);
}

/* ── Section body ────────────────────────────────────────────── */
.ld-section__body {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.ld-section__body p {
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--ink-80);
  max-width: 74ch;
  letter-spacing: 0.003em;
}

.ld-section__body h3 {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--ink-06);
  margin-top: 8px;
}
.ld-section__body h4 {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-60); margin-top: 4px;
}

.ld-section__body a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26,86,219,0.35);
  font-weight: 500;
  transition: text-decoration-color 0.2s ease;
}
.ld-section__body a:hover {
  text-decoration-color: var(--blue);
}
.ld-section__body strong { font-weight: 700; color: var(--ink); }
.ld-section__body em { font-style: italic; color: var(--ink-60); }

/* Lists */
.ld-section__body ul,
.ld-section__body ol {
  display: grid; gap: 12px;
  padding: 20px 22px; list-style: none;
  background: #f7fafd;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ld-section__body ul li,
.ld-section__body ol li {
  position: relative; padding-left: 22px;
  font-size: 0.92rem; line-height: 1.72;
  color: var(--ink-80); max-width: 70ch;
}
.ld-section__body ul li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  opacity: 0.55;
}
.ld-section__body ol { counter-reset: ld-ol; }
.ld-section__body ol li { counter-increment: ld-ol; }
.ld-section__body ol li::before {
  content: counter(ld-ol);
  position: absolute; left: 0; top: 0.15em;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 800;
  background: var(--blue-light); color: var(--blue);
}
.ld-section__body li strong { color: var(--ink); font-weight: 700; }

/* Blockquote */
.ld-section__body blockquote {
  margin: 0; padding: 18px 22px;
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--blue-light);
  font-size: 0.92rem; line-height: 1.72;
  color: var(--ink-80);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .ld-hero__grid,
  .ld-layout { grid-template-columns: 1fr; }
  .ld-hero__copy { padding-right: 0; }
  .ld-nav { position: relative; top: auto; max-height: none; }
  .ld-nav__list { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 4px; }
}
@media (max-width: 767px) {
  :root { --wrap: min(100vw - 28px, 1280px); }
  .ld-hero { padding: 28px 0 36px; }
  .ld-hero__headline { font-size: clamp(1.65rem,7.5vw,2.3rem); }
  .ld-hero__actions { flex-direction: column; align-items: stretch; }
  .ld-hero__actions .ld-btn { justify-content: center; }
  .ld-card__stats { grid-template-columns: 1fr; }
  .ld-section { padding: 22px 24px; border-radius: 14px; }
  .ld-section__body { gap: 14px; }
  .ld-section__body p,
  .ld-section__body ul li,
  .ld-section__body ol li { font-size: 0.88rem; }
  .ld-nav__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ld-nav__list { grid-template-columns: 1fr; }
  .ld-section { padding: 18px 20px; border-radius: 12px; }
  .ld-section__body ul,
  .ld-section__body ol { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .legal-document [data-r] { opacity: 1; transform: none; }
}
