/* iTrack — Estilos compartidos para páginas legales */

:root {
  --primary: #201B3A;
  --accent: #44B48F;
  --accent2: #3AA07E;
  --text: #15192A;
  --text-mid: #4A4E63;
  --text-light: #6B7085;
  --bg: #FDFDFD;
  --bg-soft: #F6F7FB;
  --border: rgba(15, 18, 30, 0.08);
  --border-strong: rgba(15, 18, 30, 0.14);
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  padding-top: 72px;
}

/* ─── NAVBAR ─── */
nav#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 140px;
  height: 72px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15,18,30,0.08);
  transition: box-shadow 0.3s ease;
}
nav#navbar.scrolled { box-shadow: 0 6px 22px rgba(15,18,30,0.06); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo-img { height: 50px; width: auto; display: block; }
.nav-links {
  display: flex; align-items: center; gap: 36px;
  list-style: none; margin: 0; padding: 0;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.nav-links > li > a,
.nav-links > li > .nav-trigger {
  color: #15192A;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 2px;
  transition: color 0.2s ease;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-links > li > a:hover,
.nav-links > li:hover > .nav-trigger { color: var(--accent); }
.nav-trigger svg { transition: transform 0.25s ease; }
.nav-links > li:hover .nav-trigger svg { transform: rotate(180deg); }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #ffffff;
  border: 1px solid rgba(15,18,30,0.08);
  border-radius: 14px;
  padding: 10px;
  min-width: 250px;
  box-shadow: 0 18px 40px rgba(15,18,30,0.1);
  list-style: none; margin: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
  z-index: 999;
}
.nav-dropdown-menu::before {
  content: ''; position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu li { margin: 0; }
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #15192A;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  border-bottom: none;
}
.nav-dropdown-menu a:hover {
  background: rgba(68,180,143,0.08);
  color: var(--accent);
}
.nav-dropdown-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(21,25,42,0.5);
  flex-shrink: 0;
  transition: color 0.18s;
}
.nav-dropdown-icon svg { width: 18px; height: 18px; }
.nav-dropdown-menu a:hover .nav-dropdown-icon { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.btn-client {
  padding: 10px 20px;
  border: 1px solid rgba(15,18,30,0.16);
  border-radius: 100px;
  color: #15192A;
  font-size: 0.85rem; font-weight: 500;
  text-decoration: none;
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  border-bottom: 1px solid rgba(15,18,30,0.16);
}
.btn-client:hover { border-color: var(--accent); color: var(--accent); background: rgba(68,180,143,0.06); }
.hamburger {
  display: none;
  width: 28px; height: 22px;
  position: relative;
  cursor: pointer;
  padding: 0;
  background: none;
  border: none;
}
.hamburger span {
  display: block; position: absolute; left: 0;
  width: 100%; height: 2px;
  background: #15192A; border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), top 0.25s 0.2s, opacity 0.2s;
}
.hamburger span:nth-child(1) { top: 4px; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { top: calc(100% - 6px); }
.hamburger.open span { transition: top 0.25s, transform 0.35s 0.2s cubic-bezier(0.4,0,0.2,1), opacity 0.2s; }
.hamburger.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; top: 72px;
  background: #ffffff;
  z-index: 998;
  display: flex; flex-direction: column;
  padding: 32px 28px 28px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mobile-menu-list li { border-bottom: 1px solid rgba(15,18,30,0.08); }
.mobile-menu-list a, .mobile-menu-list .mm-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px;
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 500;
  color: #15192A; text-decoration: none;
  background: none; border: none; width: 100%;
  cursor: pointer; letter-spacing: -0.01em;
  transition: color 0.25s ease;
  border-bottom: none;
}
.mobile-menu-list a:hover, .mobile-menu-list .mm-trigger:hover { color: var(--accent); }
.mm-trigger svg { transition: transform 0.3s ease; flex-shrink: 0; }
.mm-sub-open .mm-trigger svg { transform: rotate(180deg); }
.mobile-menu-sub {
  list-style: none; margin: 0; padding: 0 0 12px 4px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.mm-sub-open .mobile-menu-sub { max-height: 600px; }
.mobile-menu-sub li { border: none; }
.mobile-menu-sub a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 500;
  color: rgba(21,25,42,0.65);
}
.mobile-menu-sub a:hover { color: var(--accent); }
.mobile-menu-sub a .mm-emoji {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(21,25,42,0.5);
  flex-shrink: 0;
}
.mobile-menu-sub a .mm-emoji svg { width: 16px; height: 16px; }
.mobile-menu-cta { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.mobile-menu-cta a {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 11px 18px;
  border-radius: 100px; font-weight: 600;
  font-size: 0.78rem; text-decoration: none;
  border-bottom: none;
}
.mobile-menu-cta .mm-primary { background: var(--accent); color: #fff; }
.mobile-menu-cta .mm-outline { background: transparent; border: 1px solid rgba(15,18,30,0.16); color: #15192A; }
.mobile-menu-foot {
  margin-top: auto; padding-top: 28px;
  font-size: 0.78rem; color: rgba(21,25,42,0.5);
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(15,18,30,0.06);
}
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  nav#navbar { padding: 0 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* Hero de la página legal */
.legal-hero {
  padding: 36px 24px 28px;
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.legal-hero .legal-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--primary);
}
.legal-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}
.legal-meta strong { color: var(--text-mid); }

/* Contenido principal */
.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px 70px;
}
.legal-content section { margin-bottom: 42px; }
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  padding-top: 10px;
  scroll-margin-top: 120px;
}
.legal-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 10px;
}
.legal-content p {
  margin: 0 0 14px;
  color: var(--text-mid);
  font-size: 0.98rem;
}
.legal-content ul, .legal-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-mid);
  font-size: 0.98rem;
}
.legal-content ul li, .legal-content ol li { margin-bottom: 8px; }
.legal-content a {
  color: var(--accent2);
  text-decoration: none;
  border-bottom: 1px solid rgba(58, 160, 126, 0.35);
  transition: border-color 0.2s;
}
.legal-content a:hover { border-color: var(--accent2); }
.legal-content strong { color: var(--text); font-weight: 600; }

/* Datos de la empresa (bloque destacado) */
.legal-company {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 22px 26px;
  border-radius: 10px;
  margin: 18px 0 24px;
}
.legal-company p { margin: 0 0 6px; font-size: 0.95rem; }
.legal-company p:last-child { margin: 0; }
.legal-company strong { display: inline-block; min-width: 140px; color: var(--text); }

/* Tabla de cookies */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 22px;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}
.cookie-table thead {
  background: var(--primary);
  color: #fff;
}
.cookie-table th, .cookie-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cookie-table th {
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cookie-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.cookie-table td { color: var(--text-mid); }
.cookie-table td strong { color: var(--text); }

/* Índice / navegación interna */
.legal-toc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 36px;
}
.legal-toc h4 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
}
.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-mid);
  font-size: 0.92rem;
}
.legal-toc ol li { margin-bottom: 6px; }
.legal-toc a { color: var(--text); border-bottom: none; }
.legal-toc a:hover { color: var(--accent2); }

/* CTA final */
.legal-cta {
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  padding: 32px 30px;
  margin-top: 30px;
  text-align: center;
}
.legal-cta h3 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.35rem;
  margin: 0 0 10px;
}
.legal-cta p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.legal-cta a.btn {
  display: inline-block;
  padding: 12px 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: none;
  transition: background 0.25s, transform 0.25s;
}
.legal-cta a.btn:hover { background: var(--accent2); transform: translateY(-2px); }

/* Footer replicado — mismo estilo que el resto del sitio */
footer {
  background: linear-gradient(180deg, #15192A 0%, #0F131F 100%);
  color: #B8BCC8;
  padding: 60px 24px 30px;
}
.footer-main {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; margin: 16px 0 0; }
.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: #B8BCC8;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #6B7085;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  body { padding-top: 68px; }
  .legal-hero { padding: 28px 20px 22px; }
  .legal-content { padding: 24px 20px 50px; }
  .legal-content h2 { font-size: 1.35rem; }
  .legal-company strong { display: block; min-width: 0; margin-bottom: 2px; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .cookie-table { font-size: 0.85rem; }
  .cookie-table th, .cookie-table td { padding: 10px 12px; }
}
