/* =========================
   VARIABLES Y BASE
========================= */
:root {
  --bg: #0e0f10;
  --text: #fff;
  --muted: #d8dde4;
  --navbg: rgba(0,0,0,.35);
  --lime: #32d74b;
  --primary: #1e66ff;
  --primary-contrast: #ffffff;
  --accent: #19b6ff;
  --card: #121417;
  --border: rgba(255,255,255,.12);
  --radius: 18px;
  --btn-radius: 28px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   HEADER / NAVBAR
========================= */
header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  background: var(--navbg);
  backdrop-filter: saturate(140%) blur(10px);
  transition: background .25s, box-shadow .25s, color .25s;
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: url('logo.svg') center/contain no-repeat;
}

.brand span {
  font-weight: 700;
  letter-spacing: .5px;
}

nav.links {
  display: flex;
  gap: 22px;
  align-items: center;
}

nav.links a {
  opacity: .92;
}

.cta {
  background: var(--lime);
  color: #00320a;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(50,215,75,.35);
}

/* Header sobre fondo blanco (cuando se use .on-white) */
header.on-white {
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  backdrop-filter: none;
}
header.on-white .brand span,
header.on-white nav.links a { color: #0b1220; }
header.on-white .cta { box-shadow: 0 6px 22px rgba(0,0,0,.08); }

/* =========================
   TOPBAR (MÓVIL)
========================= */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.2), transparent);
  transition: background .25s, box-shadow .25s;
}
.topbar .brand-mini { display: flex; align-items: center; gap: 10px; }
.topbar .brand-mini img { height: 30px; }
.topbar .right { position: relative; display: flex; align-items: center; gap: 8px; }

/* Topbar en blanco cuando se use .on-white */
.topbar.on-white {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

/* =========================
   SELECTOR DE IDIOMA
========================= */
.lang-emoji {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.lang-emoji .flag { font-size: 16px; }
.lang-emoji .code { font-weight: 700; letter-spacing: .3px; }

.lang-menu {
  position: absolute; right: 48px; top: 48px;
  display: none; min-width: 130px;
  background: rgba(0,0,0,.35); color: #fff;
  border: 1px solid rgba(255,255,255,.18); border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.35); overflow: hidden;
  backdrop-filter: saturate(140%) blur(6px);
}
.lang-menu.open { display: block; }
.lang-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; cursor: pointer; }
.lang-item .flag { font-size: 18px; }
.lang-item .code { letter-spacing: .3px; }
.lang-item:hover { background: rgba(255,255,255,.08); }
.lang-item.active { background: rgba(30,102,255,.22); }

.topbar .burger {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35); color: #fff; font-size: 20px;
}

/* =========================
   BOTONES
========================= */
.btn {
  padding: 12px 20px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: rgba(0,0,0,.35);
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  font-weight: 700;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.8);
  color: #fff;
  font-weight: 600;
}

/* =========================
   FOOTER (SIEMPRE negro y texto blanco)
========================= */
footer {
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #ffffff !important;          /* texto blanco a prueba de overrides */
  background: #0e0f10 !important;     /* fondo negro consistente */
}
footer a { color: #ffffff !important; }
.foot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* =========================
   THEME LIGHT (para páginas legales)
   Usar: <body class="theme-light">
========================= */
body.theme-light {
  background: #ffffff;
  color: #0b1220;
}
body.theme-light header,
body.theme-light .topbar {
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  backdrop-filter: none;
}
body.theme-light header .brand span,
body.theme-light header nav.links a { color: #0b1220; }
body.theme-light .lang-emoji {
  background: #f2f3f5;
  border-color: rgba(0,0,0,.1);
  color: #0b1220;
}
body.theme-light .lang-menu {
  background: #ffffff;
  color: #0b1220;
  border-color: rgba(0,0,0,.1);
  backdrop-filter: none;
}
body.theme-light .lang-item:hover { background: rgba(0,0,0,.05); }

/* =========================
   RESPONSIVE
========================= */
@media (max-width:960px) {
  header { display: none; }
  .topbar { display: flex; }
}
