/* ============================================================
   legal.css — Estilos compartidos para las páginas legales
   Usado por: privacidad.html / terminos.html / cookies.html
   Variables coherentes con styles.css de la landing
   ============================================================ */

:root {
  --green:       #2E8B57;
  --green-dark:  #1f6b42;
  --green-pale:  #e8f5e9;
  --forest:      #1a3a2a;
  --mint:        #F0FAF0;
  --border:      #d4e8da;
  --muted:       #5a7a65;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--mint); color: var(--forest); line-height: 1.7; overflow-x: hidden; }
h1, h2 { font-family: 'Playfair Display', serif; }

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(240,250,240,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 24px rgba(46,139,87,.06);
}

.topbar-logo { display: flex; align-items: center; text-decoration: none; }
.topbar-logo img { height: 40px; width: auto; display: block; }

.topbar-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 8px 16px;
  border-radius: 50px; border: 1.5px solid var(--border);
  background: #fff; transition: all .2s;
}
.topbar-back:hover { color: var(--green); border-color: var(--green); background: var(--green-pale); }

/* ── HERO ── */
.legal-hero {
  background: var(--forest);
  padding: 60px 24px 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.legal-hero-inner { position: relative; z-index: 1; }

.legal-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 50px; margin-bottom: 16px;
}

.legal-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700;
  color: #fff; line-height: 1.15; margin-bottom: 10px;
}

.legal-hero-sub { color: rgba(255,255,255,.5); font-size: 13px; margin-bottom: 32px; }

/* ── TABS (navegación entre páginas) ── */
.legal-tabs {
  background: var(--forest);
  display: flex; justify-content: center; gap: 8px;
  padding: 0 24px 24px; flex-wrap: wrap;
}

.tab-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.6);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .2s;
}
.tab-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.tab-btn.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── LAYOUT ── */
.legal-wrap { max-width: 780px; margin: 0 auto; padding: 52px 24px 96px; }

/* ── BADGE fecha ── */
.last-updated {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-pale); color: var(--green);
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 50px; margin-bottom: 44px;
}

/* ── SECCIONES ── */
.legal-section { margin-bottom: 52px; }

.legal-section h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--forest);
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
}

.legal-section h3 {
  font-family: 'Inter', sans-serif;
  font-size: .75rem; font-weight: 600; color: var(--forest);
  text-transform: uppercase; letter-spacing: .08em;
  margin: 24px 0 10px;
}

.legal-section p { font-size: 14px; color: var(--muted); margin-bottom: 14px; line-height: 1.8; }

.legal-section ul { list-style: none; margin-bottom: 14px; }
.legal-section ul li {
  font-size: 14px; color: var(--muted);
  padding: 5px 0 5px 22px; position: relative; line-height: 1.7;
}
.legal-section ul li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); opacity: .7;
}

.legal-section a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.legal-section strong { color: var(--forest); font-weight: 600; }

/* ── Info box ── */
.info-box {
  background: var(--green-pale); border-left: 3px solid var(--green);
  border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 16px 0;
}
.info-box p { margin: 0; font-size: 13px; color: var(--forest); }

/* ── Contact card ── */
.contact-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 16px; padding: 24px 28px; margin-top: 20px;
}
.contact-card p { margin: 0 0 6px; font-size: 14px; }
.contact-card p:last-child { margin: 0; }

/* ── Tabla cookies ── */
.table-wrap {
  overflow-x: auto; border-radius: 12px;
  border: 1.5px solid var(--border); margin-bottom: 20px;
}

.cookie-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 460px; }

.cookie-table th {
  background: var(--forest); color: rgba(255,255,255,.85);
  padding: 11px 14px; text-align: left;
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em;
}

.cookie-table td {
  padding: 11px 14px; border-top: 1px solid var(--border);
  color: var(--muted); vertical-align: top; line-height: 1.55;
}

.cookie-table tr:nth-child(even) td { background: rgba(240,250,240,.5); }

code {
  font-size: 11.5px; background: var(--green-pale); color: var(--forest);
  padding: 2px 7px; border-radius: 5px; font-family: 'Courier New', monospace;
}

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-nec { background: #dcfce7; color: #14532d; }
.badge-ana { background: #dbeafe; color: #1e3a8a; }

/* ── Footer ── */
.legal-footer {
  background: var(--forest); color: rgba(255,255,255,.4);
  text-align: center; padding: 32px 24px;
  font-size: 13px; line-height: 1.9;
}
.legal-footer a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.legal-footer a:hover { color: #fff; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .topbar { padding: 0 20px; }
  .tab-btn { padding: 9px 14px; font-size: 12px; gap: 6px; }
  .legal-wrap { padding: 36px 18px 72px; }
}