/* ═══════════════════════════════════════════════════════════
   RivoLegal — Legal Pages CSS
   terminos.html · privacidad.html · cookies.html · seguridad.html
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #14427E;
  --bm:   #1a5299;
  --bd:   #0c2d58;
  --bdp:  #081d3a;
  --bp:   #e8f0fb;
  --bp2:  #f2f6fd;
  --off:  #F5F8FE;
  --w:    #FFFFFF;
  --tx:   #0c1f3d;
  --mid:  #3d5278;
  --mu:   #7a92b4;
  --br:   rgba(20,66,126,.11);
  --br2:  rgba(20,66,126,.22);
}

/* ── SMOOTH SCROLL ── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  background: var(--w);
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ══ NAV ══════════════════════════════════════════════════ */
.lg-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--br);
  box-shadow: 0 2px 24px rgba(12,29,61,.07);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%;
}
.lg-nav-brand { text-decoration: none; display: flex; align-items: center; }
.lg-nav .lr { fill: #14427E; }
.lg-nav .ls { stroke: #14427E; }
.lg-nav .ll { fill: rgba(20,66,126,.58); }
.lg-nav-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Poppins", sans-serif; font-size: .78rem; font-weight: 600;
  color: var(--blue); text-decoration: none;
  padding: 8px 16px; border-radius: 9px;
  border: 1.5px solid var(--br2); background: transparent;
  transition: all .28s cubic-bezier(.22,.68,0,1.2);
}
.lg-nav-back:hover {
  background: var(--bp); border-color: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(20,66,126,.12);
}

/* ══ HERO — centrado ══════════════════════════════════════ */
.lg-hero {
  background: var(--bd);
  padding: 72px 6% 68px;
  position: relative; overflow: hidden;
  text-align: center;
}
.lg-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.lg-hero-glow {
  position: absolute;
  width: 700px; height: 500px; border-radius: 50%;
  background: rgba(26,82,153,.45);
  top: -260px; left: 50%; transform: translateX(-50%);
  filter: blur(100px); pointer-events: none;
}
.lg-hero::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(20,66,126,.18);
  bottom: -100px; right: 5%;
  filter: blur(70px); pointer-events: none;
}
.lg-hero-inner {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
}
.lg-breadcrumb {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: .72rem; color: rgba(255,255,255,.38);
  margin-bottom: 20px; letter-spacing: .04em;
}
.lg-breadcrumb a { color: rgba(255,255,255,.46); text-decoration: none; transition: color .25s; }
.lg-breadcrumb a:hover { color: rgba(255,255,255,.82); }
.lg-breadcrumb-sep { color: rgba(255,255,255,.22); }
.lg-hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  padding: 5px 14px 5px 8px; border-radius: 100px;
  margin-bottom: 20px;
  font-size: .67rem; font-weight: 600; letter-spacing: .13em;
  color: rgba(255,255,255,.72);
}
.lg-hero-tag-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.13);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
}
.lg-hero h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.1;
  color: var(--w); margin-bottom: 16px;
  letter-spacing: -.015em;
}
.lg-hero-sub {
  font-size: .97rem; color: rgba(255,255,255,.52);
  line-height: 1.76; font-weight: 300;
  max-width: 560px; margin: 0 auto;
}
.lg-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 24px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .76rem; color: rgba(255,255,255,.36);
  flex-wrap: wrap;
}
.lg-meta span { display: flex; align-items: center; gap: 6px; }
.lg-meta svg { opacity: .55; }

/* ══ BODY ═════════════════════════════════════════════════ */
.lg-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 6% 110px;
}

/* ── TABLE OF CONTENTS ── */
.lg-toc {
  background: var(--off);
  border: 1px solid var(--br);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 64px;
  transition: box-shadow .35s;
}
.lg-toc:hover { box-shadow: 0 8px 32px rgba(20,66,126,.08); }
.lg-toc-title {
  font-family: "Poppins", sans-serif;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; color: var(--blue);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.lg-toc ol {
  list-style: none;
  display: flex; flex-direction: column; gap: 2px;
  counter-reset: toc-counter;
}
.lg-toc ol li { counter-increment: toc-counter; }
.lg-toc ol li a {
  display: flex; align-items: center; gap: 12px;
  font-size: .87rem; color: var(--mid);
  text-decoration: none;
  padding: 9px 12px; border-radius: 9px;
  transition: all .3s cubic-bezier(.22,.68,0,1.2);
}
.lg-toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: "Poppins", sans-serif;
  font-size: .63rem; font-weight: 700;
  color: var(--blue); background: var(--bp);
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .3s;
}
.lg-toc ol li a:hover,
.lg-toc ol li a.toc-active {
  color: var(--blue);
  background: var(--bp2);
  padding-left: 17px;
}
.lg-toc ol li a:hover::before,
.lg-toc ol li a.toc-active::before {
  background: var(--blue);
  color: var(--w);
}
.lg-toc ol li a.toc-active {
  font-weight: 500;
}

/* ── ARTICLE SECTIONS ── */
.lg-section {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--br);
  scroll-margin-top: 90px;
  /* Reveal animation — starts hidden */
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .65s ease;
}
.lg-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.lg-section.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Subtle stagger */
.lg-section:nth-child(2) { transition-delay: .06s; }
.lg-section:nth-child(3) { transition-delay: .1s;  }
.lg-section:nth-child(4) { transition-delay: .13s; }
.lg-section:nth-child(5) { transition-delay: .15s; }

.lg-section-num {
  font-family: "Poppins", sans-serif;
  font-size: .62rem; font-weight: 700;
  letter-spacing: .18em; color: var(--blue);
  background: var(--bp); border: 1px solid rgba(20,66,126,.14);
  padding: 3px 11px; border-radius: 100px;
  display: inline-block; margin-bottom: 14px;
}
.lg-section h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.32rem; font-weight: 800;
  color: var(--tx); margin-bottom: 16px;
  line-height: 1.24; letter-spacing: -.01em;
}
.lg-section h3 {
  font-family: "Poppins", sans-serif;
  font-size: .96rem; font-weight: 600;
  color: var(--mid); margin: 24px 0 10px;
}
.lg-section p {
  font-size: .94rem; line-height: 1.86;
  color: var(--mu); margin-bottom: 14px; font-weight: 300;
}
.lg-section p:last-child { margin-bottom: 0; }
.lg-section p strong { color: var(--mid); font-weight: 600; }
.lg-section ul,
.lg-section ol {
  margin: 14px 0 16px; padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 4px;
}
.lg-section ul li,
.lg-section ol li {
  font-size: .92rem; color: var(--mu);
  line-height: 1.74; padding: 6px 0 6px 28px;
  position: relative; font-weight: 300;
}
.lg-section ul li::before {
  content: '—'; position: absolute; left: 0;
  color: var(--blue); font-weight: 600;
}
.lg-section ol { counter-reset: ol-counter; }
.lg-section ol li { counter-increment: ol-counter; }
.lg-section ol li::before {
  content: counter(ol-counter) '.'; position: absolute; left: 0;
  color: var(--blue); font-family: "Poppins", sans-serif;
  font-size: .75rem; font-weight: 700;
}

/* Highlight box */
.lg-highlight {
  background: var(--bp);
  border: 1px solid rgba(20,66,126,.15);
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  padding: 16px 22px; margin: 22px 0;
}
.lg-highlight p {
  font-size: .89rem; color: var(--mid);
  margin: 0; font-weight: 400; line-height: 1.7;
}
.lg-highlight p strong { color: var(--blue); }

/* Contact box */
.lg-contact-box {
  background: var(--bd);
  border-radius: 18px;
  padding: 36px 32px; margin-top: 60px;
}
.lg-contact-box h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.08rem; font-weight: 700;
  color: var(--w); margin-bottom: 8px;
}
.lg-contact-box p {
  font-size: .88rem; color: rgba(255,255,255,.48);
  margin-bottom: 20px; line-height: 1.7;
}
.lg-contact-links { display: flex; flex-direction: column; gap: 10px; }
.lg-contact-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .87rem; color: rgba(255,255,255,.65);
  text-decoration: none; transition: color .25s; font-weight: 400; padding: 3px 0;
}
.lg-contact-link:hover { color: var(--w); }
.lg-contact-link svg { opacity: .55; flex-shrink: 0; }

/* ══ FOOTER ═══════════════════════════════════════════════ */
.lg-footer {
  background: var(--bdp);
  padding: 44px 6% 32px;
  text-align: center;
}
.lg-footer-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.lg-footer-logo .lr { fill: rgba(255,255,255,.8); }
.lg-footer-logo .ls { stroke: rgba(255,255,255,.8); }
.lg-footer-logo .ll { fill: rgba(255,255,255,.3); }
.lg-footer p { font-size: .78rem; color: rgba(255,255,255,.2); margin-bottom: 16px; line-height: 1.6; }
.lg-footer-nav { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lg-footer-nav a {
  font-size: .76rem; color: rgba(255,255,255,.22);
  text-decoration: none; padding: 5px 12px; border-radius: 7px; transition: all .25s;
}
.lg-footer-nav a:hover { color: var(--w); background: rgba(255,255,255,.07); }
.lg-footer-nav a.current { color: rgba(255,255,255,.55); font-weight: 600; background: rgba(255,255,255,.06); }

/* ══ RESPONSIVE ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .lg-hero { padding: 56px 5% 52px; }
  .lg-hero h1 { font-size: clamp(1.75rem, 7.5vw, 2.4rem); }
  .lg-body { padding: 52px 5% 80px; }
  .lg-toc { padding: 22px 20px; }
  .lg-contact-box { padding: 28px 22px; }
  .lg-nav { padding: 0 5%; }
}
@media (max-width: 480px) {
  .lg-hero h1 { font-size: 1.75rem; }
  .lg-meta { gap: 14px; font-size: .72rem; }
}