/* =============================================
   legal.css — Estilos para Términos y Condiciones
   y Política de Cookies de NEOsubverso
   ============================================= */

:root {
  --font-display: 'Orbitron', sans-serif;
  --font-ui:      'Rajdhani', sans-serif;
  --font-body:    'Inter', sans-serif;
}

body {
  padding-top: 64px;
  background: var(--black, #000000);
  color: var(--white, #F0EEF8);
  font-family: var(--font-body, 'Inter', sans-serif);
  line-height: 1.7;
  min-height: 100vh;
}

/* Banner de Cabecera */
.legal-header {
  padding: 56px 40px 40px;
  border-bottom: 1px solid var(--border, #1e1e35);
  position: relative;
  background: linear-gradient(180deg, rgba(8,8,16,0.85) 0%, rgba(13,13,26,0.4) 100%);
  overflow: hidden;
}

.legal-header::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(0,200,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.legal-header-inner {
  max-width: 980px;
  margin: 0 auto;
}

.legal-eyebrow {
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan, #00C8FF);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--cyan, #00C8FF);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan, #00C8FF);
}

.legal-header h1 {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--white, #F0EEF8);
  line-height: 1.15;
  margin-bottom: 16px;
}

.legal-header h1 span {
  color: var(--cyan, #00C8FF);
  text-shadow: 0 0 20px rgba(0,200,255,0.4);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 12px;
  color: var(--gray-light, #8888aa);
  letter-spacing: 0.08em;
}

.legal-badge {
  background: rgba(0, 200, 255, 0.1);
  color: var(--cyan, #00C8FF);
  border: 1px solid rgba(0, 200, 255, 0.25);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

.legal-badge-magenta {
  background: rgba(255, 94, 204, 0.1);
  color: var(--magenta, #FF5ECC);
  border-color: rgba(255, 94, 204, 0.3);
}

/* Selector entre Documentos Legales */
.legal-nav-tabs {
  background: var(--surface, #0d0d1a);
  border-bottom: 1px solid var(--border, #1e1e35);
  position: sticky;
  top: 64px;
  z-index: 400;
}

.legal-tabs-wrap {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox, navegadores modernos */
  -ms-overflow-style: none; /* IE, Edge */
}

/* Ocultar barra horizontal de deslizamiento en Webkit / Chromium / Safari */
.legal-tabs-wrap::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.legal-tab {
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 18px;
  color: var(--gray, #5a5a7a);
  text-decoration: none;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
  transition: all 0.2s;
  white-space: nowrap;
}

.legal-tab:hover {
  color: var(--white, #F0EEF8);
  border-color: var(--border2, #2a2a45);
}

.legal-tab.active {
  color: var(--cyan, #00C8FF);
  background: rgba(0, 200, 255, 0.08);
  border-color: var(--cyan, #00C8FF);
}

/* Contenido Principal */
.legal-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* Menú Rápido de Secciones (TOC) */
.legal-toc {
  background: var(--surface, #0d0d1a);
  border: 1px solid var(--border, #1e1e35);
  padding: 24px;
  margin-bottom: 40px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.legal-toc-title {
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan, #00C8FF);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 20px;
}

.legal-toc-link {
  font-size: 13px;
  color: var(--gray-light, #8888aa);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  padding: 4px 0;
}

.legal-toc-link::before {
  content: '>';
  color: var(--cyan, #00C8FF);
  font-family: var(--font-display, monospace);
  font-size: 10px;
  opacity: 0.6;
}

.legal-toc-link:hover {
  color: var(--white, #F0EEF8);
  transform: translateX(4px);
}

/* Tarjetas y Bloques de Secciones */
.legal-section {
  background: var(--surface, #0d0d1a);
  border: 1px solid var(--border, #1e1e35);
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: border-color 0.25s ease;
}

.legal-section:hover {
  border-color: var(--border2, #2a2a45);
}

.legal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan, #00C8FF), transparent 70%);
  opacity: 0.4;
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.legal-section-num {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 14px;
  font-weight: 900;
  color: var(--magenta, #FF5ECC);
  background: rgba(255, 94, 204, 0.08);
  border: 1px solid rgba(255, 94, 204, 0.2);
  padding: 4px 10px;
  letter-spacing: 0.05em;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 0 100%);
}

.legal-section-title {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--white, #F0EEF8);
  margin: 0;
}

.legal-body {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--gray-light, #8888aa);
}

.legal-body p {
  margin-bottom: 14px;
}

.legal-body p:last-child {
  margin-bottom: 0;
}

.legal-body strong {
  color: var(--white, #F0EEF8);
  font-weight: 600;
}

.legal-body ul, .legal-body ol {
  margin: 12px 0 16px 20px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body a {
  color: var(--cyan, #00C8FF);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.legal-body a:hover {
  color: #5fe4ff;
}

/* Cajas de Aviso Destacadas */
.legal-box {
  background: rgba(8, 8, 16, 0.7);
  border-left: 3px solid var(--cyan, #00C8FF);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 13.5px;
  color: var(--white, #F0EEF8);
}

.legal-box-magenta {
  border-left-color: var(--magenta, #FF5ECC);
  background: rgba(255, 94, 204, 0.04);
}

.legal-box-title {
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan, #00C8FF);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-box-magenta .legal-box-title {
  color: var(--magenta, #FF5ECC);
}

/* Tablas de Datos Técnicos y Cookies */
.legal-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border, #1e1e35);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

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

.legal-table th {
  background: var(--surface2, #12121f);
  color: var(--cyan, #00C8FF);
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #1e1e35);
}

.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #1e1e35);
  color: var(--gray-light, #8888aa);
  vertical-align: top;
}

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

.legal-table tr:hover td {
  background: rgba(0, 200, 255, 0.02);
}

.legal-code {
  font-family: monospace;
  font-size: 12px;
  color: var(--cyan, #00C8FF);
  background: rgba(0, 200, 255, 0.08);
  padding: 2px 6px;
  border: 1px solid rgba(0, 200, 255, 0.2);
  white-space: nowrap;
}

/* Panel Interactivo de Inspector de Cookies */
.inspector-panel {
  background: #080d1a;
  border: 1px solid var(--border2, #2a2a45);
  padding: 24px;
  margin: 28px 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--border, #1e1e35);
  padding-bottom: 14px;
}

.inspector-title {
  font-family: var(--font-display, 'Orbitron', sans-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cyan, #00C8FF);
}

.inspector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.inspector-card {
  background: var(--surface, #0d0d1a);
  border: 1px solid var(--border, #1e1e35);
  padding: 14px 16px;
}

.inspector-label {
  font-family: var(--font-ui, 'Rajdhani', sans-serif);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray, #5a5a7a);
  margin-bottom: 4px;
}

.inspector-val {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--white, #F0EEF8);
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Botón flotante para volver arriba */
.btn-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--surface, #0d0d1a);
  border: 1px solid var(--border2, #2a2a45);
  color: var(--cyan, #00C8FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: all 0.2s;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
}

.btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-top:hover {
  background: var(--cyan, #00C8FF);
  color: var(--black, #000000);
  box-shadow: 0 0 16px rgba(0, 200, 255, 0.4);
}

@media (max-width: 768px) {
  .legal-header {
    padding: 36px 20px 28px;
  }
  .legal-tabs-wrap {
    padding: 8px 20px;
  }
  .legal-container {
    padding: 24px 20px 60px;
  }
  .legal-section {
    padding: 22px 18px;
  }
  .legal-toc {
    padding: 18px;
  }
  .legal-section-title {
    font-size: 16px;
  }
}
