/* ==========================================================================
   GADEX — SISTEMA DE DISEÑO LEGAL & CUMPLIMIENTO REGULATORIO
   Estilos para Documentos Oficiales: Política de Datos y Términos y Condiciones
   ========================================================================== */

:root {
  --font-heading: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --c-titanium-950: #070b12;
  --c-titanium-900: #0e1724;
  --c-titanium-800: #1b283a;
  --c-titanium-700: #2b3d54;
  --c-titanium-600: #425874;
  --c-titanium-500: #627b99;
  --c-titanium-300: #9cb1c9;
  --c-titanium-100: #edf3f8;

  --c-bronze-600: #8c5b30;
  --c-bronze-500: #af7440;
  --c-bronze-400: #c58a59;
  --c-bronze-300: #dcab80;
  --c-bronze-200: #edd0b7;
  --c-bronze-100: #fbf5ef;

  --c-cyan-500: #0ea5e9;
  --c-cyan-400: #22d3ee;
  --c-cyan-300: #67e8f9;

  --c-bg-page: #f8fafc;
  --c-surface: #ffffff;
  --c-card-bg: #ffffff;
  --c-border: rgba(28, 45, 66, 0.1);
  --c-border-subtle: rgba(197, 138, 89, 0.25);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 12px 36px rgba(28, 45, 66, 0.08);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dark-mode {
  --c-bg-page: #070b11;
  --c-surface: #0e1520;
  --c-card-bg: #121b28;
  --c-border: rgba(255, 255, 255, 0.08);
  --c-border-subtle: rgba(197, 138, 89, 0.35);

  --c-titanium-950: #ffffff;
  --c-titanium-900: #f8fafc;
  --c-titanium-800: #f1f5f9;
  --c-titanium-700: #cbd5e1;
  --c-titanium-600: #94a3b8;
  --c-titanium-500: #64748b;
  --c-titanium-100: #16202e;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 16px 45px rgba(0, 0, 0, 0.65);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-bg-page);
  color: var(--c-titanium-800);
  line-height: 1.68;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Header & Barra Superior */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
  transition: var(--transition);
}

body.dark-mode .legal-header {
  background: rgba(7, 11, 17, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.legal-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(197, 138, 89, 0.45);
}

.legal-brand-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-titanium-900);
  letter-spacing: -0.01em;
}

.legal-brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(197, 138, 89, 0.14);
  color: var(--c-bronze-500);
  border: 1px solid rgba(197, 138, 89, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.dark-mode .legal-brand-badge {
  background: rgba(197, 138, 89, 0.2);
  color: #f7d8c0;
}

.legal-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-nav-back {
  background: rgba(31, 58, 82, 0.06);
  color: var(--c-titanium-700);
  border: 1px solid var(--c-border);
}

body.dark-mode .btn-nav-back {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.btn-nav-back:hover {
  background: rgba(197, 138, 89, 0.15);
  color: var(--c-bronze-500);
  border-color: rgba(197, 138, 89, 0.35);
}

.btn-nav-help {
  background: linear-gradient(135deg, rgba(197, 138, 89, 0.15) 0%, rgba(31, 58, 82, 0.08) 100%);
  color: var(--c-bronze-500);
  border: 1px solid rgba(197, 138, 89, 0.3);
}

.btn-nav-help:hover {
  background: var(--c-bronze-400);
  color: #ffffff;
}

.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-titanium-700);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  border-color: var(--c-bronze-400);
  color: var(--c-bronze-400);
  transform: rotate(15deg);
}

/* Hero Legal */
.legal-hero {
  padding: 60px 0 40px;
  background: radial-gradient(circle at 50% 0%, rgba(197, 138, 89, 0.08) 0%, transparent 70%);
  border-bottom: 1px solid var(--c-border);
}

.legal-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(197, 138, 89, 0.12);
  color: #9c6739;
  border: 1px solid rgba(197, 138, 89, 0.35);
  margin-bottom: 16px;
}

body.dark-mode .legal-hero-pill {
  background: rgba(197, 138, 89, 0.16);
  color: #ffd7a8;
  border-color: rgba(244, 171, 119, 0.42);
}

.legal-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--c-titanium-950);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.legal-hero-desc {
  font-size: 1.05rem;
  color: var(--c-titanium-600);
  max-width: 820px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.legal-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-titanium-700);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

body.dark-mode .legal-chip {
  background: var(--c-card-bg);
}

.legal-chip strong {
  color: var(--c-titanium-900);
}

/* Layout Principal: Sticky Sidebar + Contenido */
.legal-main-section {
  padding: 48px 0 80px;
  flex: 1;
}

.legal-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 991px) {
  .legal-layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Sticky Sidebar Index */
.legal-sidebar {
  position: sticky;
  top: 96px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-card);
}

body.dark-mode .legal-sidebar {
  background: var(--c-card-bg);
}

.legal-sidebar-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-titanium-900);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.legal-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-toc-link {
  display: block;
  font-size: 0.85rem;
  color: var(--c-titanium-600);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  line-height: 1.4;
}

.legal-toc-link:hover,
.legal-toc-link.active {
  background: rgba(197, 138, 89, 0.12);
  color: var(--c-bronze-500);
  font-weight: 600;
  padding-left: 14px;
}

/* Contenido Documental */
.legal-content-body {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  box-shadow: var(--shadow-card);
}

body.dark-mode .legal-content-body {
  background: var(--c-card-bg);
}

@media (max-width: 768px) {
  .legal-content-body {
    padding: 28px 20px;
  }
}

.legal-article-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}

.legal-article-section:last-child {
  margin-bottom: 0;
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}

.legal-section-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(197, 138, 89, 0.15);
  color: var(--c-bronze-500);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.legal-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-titanium-950);
  letter-spacing: -0.01em;
}

.legal-p {
  font-size: 0.95rem;
  color: var(--c-titanium-700);
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-p strong {
  color: var(--c-titanium-950);
}

.legal-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-list-item {
  position: relative;
  padding-left: 24px;
  font-size: 0.93rem;
  color: var(--c-titanium-700);
  line-height: 1.65;
}

.legal-list-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-bronze-400);
}

/* Tablas Legales Responsivas */
.legal-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.legal-table th {
  background: rgba(31, 58, 82, 0.05);
  color: var(--c-titanium-900);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  letter-spacing: 0.02em;
}

body.dark-mode .legal-table th {
  background: rgba(255, 255, 255, 0.04);
}

.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-titanium-700);
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: rgba(197, 138, 89, 0.04);
}

/* Callouts & Alertas Legales */
.legal-callout {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: rgba(197, 138, 89, 0.08);
  border-left: 4px solid var(--c-bronze-400);
  margin: 24px 0;
}

.legal-callout-cyan {
  background: rgba(244, 171, 119, 0.09);
  border-left-color: var(--c-bronze-300);
}

.legal-callout-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--c-titanium-900);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-callout-text {
  font-size: 0.9rem;
  color: var(--c-titanium-700);
  margin: 0;
  line-height: 1.6;
}

/* Banner de Acción Rápida (Ejercer Derechos ARCO / Contactar) */
.legal-action-box {
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(197, 138, 89, 0.14) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1px solid rgba(197, 138, 89, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.legal-action-left h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-titanium-950);
  margin-bottom: 6px;
}

.legal-action-left p {
  font-size: 0.9rem;
  color: var(--c-titanium-600);
  max-width: 520px;
  margin: 0;
}

.legal-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--c-bronze-400) 0%, var(--c-bronze-600) 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(197, 138, 89, 0.35);
  transition: var(--transition);
}

.legal-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 138, 89, 0.5);
}

/* ==========================================================================
   FINITY-STYLE DOME FOOTER & CELESTIAL HORIZON (SELLO GADEX LUXURY)
   ========================================================================== */

.footer-finity {
  position: relative;
  background: radial-gradient(circle at 50% 18%, #101c2c 0%, #080d16 55%, #03060a 100%);
  color: #a0b2c6;
  padding: 110px 0 65px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  contain: paint;
}

.footer-finity::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(244, 171, 119, 0.12) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center;
  pointer-events: none;
  opacity: 0.7;
}

.footer-finity::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(197, 138, 89, 0.3) 20%, rgba(255, 225, 190, 0.85) 50%, rgba(244, 171, 119, 0.3) 80%, transparent 100%);
  pointer-events: none;
}

.footer-finity-brand {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 50px;
}

.footer-finity-brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.footer-finity-brand-link:hover {
  transform: translateY(-3px) scale(1.02);
  filter: drop-shadow(0 0 25px rgba(244, 171, 119, 0.45));
}

.footer-finity-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-finity-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  background: radial-gradient(circle, rgba(244, 171, 119, 0.4) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

.footer-finity-logo {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid rgba(244, 171, 119, 0.65);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(197, 138, 89, 0.35);
}

.footer-finity-name {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 30%, #e2e8f0 70%, #ffd7a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.footer-finity-tagline {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 225, 190, 0.6);
  margin-top: 6px;
}

.footer-dome-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.footer-dome-ambient-glow {
  position: absolute;
  left: 50%;
  bottom: -45%;
  transform: translateX(-50%);
  width: 140%;
  height: 130%;
  background: radial-gradient(ellipse 65% 55% at 50% 100%, 
    rgba(255, 215, 170, 0.42) 0%, 
    rgba(244, 171, 119, 0.28) 28%, 
    rgba(197, 138, 89, 0.16) 55%, 
    transparent 80%
  );
  filter: blur(55px);
  opacity: 0.85;
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease;
  will-change: transform, opacity;
}

.footer-dome-sphere-wrap {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(0);
  width: 130%;
  min-width: 1200px;
  max-width: 2400px;
  height: 440px;
  pointer-events: none;
  transform-origin: center bottom;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), filter 0.85s ease;
  will-change: transform, filter;
}

.footer-dome-arc-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.footer-finity:hover .footer-dome-ambient-glow,
.footer-finity.is-active .footer-dome-ambient-glow {
  transform: translateX(-50%) scale(1.18) translateY(-15px);
  opacity: 1;
}

.footer-finity:hover .footer-dome-sphere-wrap,
.footer-finity.is-active .footer-dome-sphere-wrap {
  transform: translateX(-50%) scale(1.06) translateY(-28px);
  filter: drop-shadow(0 -20px 45px rgba(244, 171, 119, 0.45));
}

.footer-finity-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 40px;
  min-height: 190px;
  gap: 32px;
}

.footer-finity-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-finity-label {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.footer-finity-email {
  font-size: 0.95rem;
  color: rgba(255, 235, 215, 0.9);
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
  display: inline-block;
  font-weight: 500;
}

.footer-finity-email:hover {
  color: #ffffff;
  transform: translateX(3px);
  text-shadow: 0 0 16px rgba(244, 171, 119, 0.6);
}

.footer-finity-copyright {
  margin-top: 34px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.footer-finity-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 16px;
}

.footer-finity-linkedin {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a66c2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 15px rgba(244, 171, 119, 0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.2s;
  text-decoration: none;
}

.footer-finity-linkedin:hover {
  transform: scale(1.14) rotate(4deg);
  box-shadow: 0 8px 30px rgba(244, 171, 119, 0.55);
  background: #ffffff;
}

.footer-finity-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.footer-finity-link {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

.footer-finity-link:hover {
  color: #ffffff;
  transform: translateX(-3px);
}

.footer-finity-link.help-link {
  color: var(--c-bronze-300);
  font-weight: 600;
}

.footer-finity-link.help-link:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(244, 171, 119, 0.5);
}

@media (max-width: 768px) {
  .footer-finity {
    padding: 75px 0 50px 0;
  }
  
  .footer-finity-name {
    font-size: 2.1rem;
  }
  
  .footer-finity-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 36px;
    min-height: auto;
  }
  
  .footer-finity-left {
    align-items: center;
    text-align: center;
    order: 2;
  }
  
  .footer-finity-copyright {
    margin-top: 18px;
  }
  
  .footer-finity-right {
    align-items: center;
    text-align: center;
    order: 1;
    gap: 18px;
  }
  
  .footer-finity-links {
    align-items: center;
    gap: 12px;
  }
  
  .footer-finity-link {
    white-space: normal;
  }
  
  .footer-dome-sphere-wrap {
    width: 180%;
    height: 340px;
  }
}
