/* =========================================================
   NEXUS ECOSYSTEM — GLOBAL STYLES (FINAL CORREGIDO)
   Base + Header (Nav + Language) + Footer
   Sticky footer real sin espacio extra abajo
   ========================================================= */

/* =========================
   1) ROOT VARIABLES
   ========================= */
:root {
  /* Brand */
  --nexus-blue-dark: #0B3C5D;
  --nexus-blue: #1F6AE1;
  --nexus-blue-light: #6EC1FF;

  /* Text */
  --text-main: #0B1220;
  --text-muted: rgba(11,18,32,.68);

  /* Layout */
  --container: 1200px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Header */
  --header-h: 86px;

  /* Footer */
  --footer-bg: #0B1220;
  --footer-border: rgba(255,255,255,.12);
  --footer-text: rgba(255,255,255,.82);
  --footer-muted: rgba(255,255,255,.58);

  /* Nav metrics */
  --nav-pad: 6px;
  --nav-link-h: 38px;

  /* Spacing */
  --main-bottom-space: 0px; /* 👈 si quieres espacio antes del footer: 80px */
}

/* =========================
   2) RESET / BASE (STICKY FOOTER)
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  scroll-padding-top: calc(var(--header-h) + 14px);
}

body {
  margin: 0;
  padding: 0 !important;
  overflow-x: hidden;
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: #fff;
  line-height: 1.25;

  /* ✅ Sticky footer real */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ✅ MAIN ocupa el espacio sobrante */
#main-content {
  flex: 1 0 auto;
  width: 100%;

  /* Compensa el header fijo */
  padding-top: calc(var(--header-h) + 24px);

  /* ✅ Si quieres separación antes del footer, se hace aquí */
  padding-bottom: var(--main-bottom-space);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   3) HEADER — GLASS CAPSULE
   ========================================================= */
.nx-header {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 9999;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 18px 40px rgba(11,18,32,.10), 0 1px 0 rgba(255,255,255,.18) inset;
  border-radius: var(--radius-pill);
}

.nx-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nx-header__right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.nx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.nx-brand__logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.16));
}

.nx-brand__name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(11,18,32,.92);
}

.nx-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--nav-pad);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  overflow: hidden;
}

.nx-nav a {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-link-h);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  line-height: var(--nav-link-h);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  color: rgba(11,18,32,.78);
  transition: color .18s ease, transform .18s ease;
}

.nx-nav a:hover {
  color: rgba(11,18,32,.92);
  transform: translateY(-1px);
}

.nx-nav__pill {
  position: absolute;
  top: var(--nav-pad);
  left: var(--nav-pad);
  height: var(--nav-link-h);
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(31,106,225,.16), rgba(110,193,255,.18));
  border: 1px solid rgba(31,106,225,.28);
  z-index: 1;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.4,0,.2,1),
              width .28s cubic-bezier(.4,0,.2,1);
}

/* =========================
   LANGUAGE DROPDOWN
   ========================= */
.nx-lang { position: relative; }

.nx-lang__btn {
  height: var(--nav-link-h);
  padding: 0 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(11,18,32,.85);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(11,18,32,.08), 0 1px 0 rgba(255,255,255,.18) inset;
  backdrop-filter: blur(12px) saturate(160%);
}

.nx-lang__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(245,246,248,.62);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 22px 50px rgba(11,18,32,.14), 0 1px 0 rgba(255,255,255,.40) inset;
  backdrop-filter: blur(18px) saturate(170%);
  display: none;
}

.nx-lang.is-open .nx-lang__menu { display: block; }

/* =========================================================
   4) APP CARDS — ICON ZOOM FIX
   ========================================================= */
.nx-appCard__iconWrap {
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex: 0 0 auto;
}

.nx-appCard__icon {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* =========================
   5) FOOTER — NX (FINAL)
   ========================= */

/* ✅ El wrapper NO debe empujar nada */
#app-footer {
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--footer-bg);
}

/* ✅ Evita cualquier margen default del footer */
footer.nx-footer {
  display: block;
  width: 100%;
  margin: 0 !important;
}

.nx-footer {
  background:
    radial-gradient(900px 320px at 18% 0%, rgba(31,106,225,.20), transparent 58%),
    radial-gradient(900px 320px at 82% 0%, rgba(110,193,255,.14), transparent 60%),
    var(--footer-bg);

  color: var(--footer-text);
  padding: 48px 18px 20px;
  border-top: 1px solid var(--footer-border);
}

.nx-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1.6fr;
  gap: 28px;
}

.nx-footer__brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.nx-footer__logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.25));
}

.nx-footer__name {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.1;
}

.nx-footer__desc {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--footer-muted);
  max-width: 420px;
}

.nx-footer__mail a {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
}

.nx-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
}

.nx-footer__cols h4 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.nx-footer__cols a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--footer-muted);
  transition: color .15s ease, transform .15s ease;
}

.nx-footer__cols a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.nx-footer__bottom {
  max-width: 1120px;
  margin: 22px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.45);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 940px) {
  .nx-footer__inner { grid-template-columns: 1fr; }
  .nx-footer__cols { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 820px) {
  :root { --header-h: 120px; }

  .nx-header {
    top: 10px;
    left: 10px;
    right: 10px;
    border-radius: 22px;
  }

  .nx-header__inner {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .nx-brand {
    justify-content: center;
    min-width: auto;
  }

  .nx-header__right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .nx-nav {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* =========================================================
   MOBILE NAV (Hamburger) — FIX FINAL
   ========================================================= */

/* Desktop nav visible por defecto */
.nx-nav--desktop { display: inline-flex; }

/* Burger: oculto en desktop */
.nx-burger{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 10px 26px rgba(11,18,32,.08), 0 1px 0 rgba(255,255,255,.18) inset;
  cursor: pointer;

  /* ✅ CLAVE: apilar las líneas */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;

  padding: 0;
}

.nx-burger__line{
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(11,18,32,.82);
}

/* Animación a X (opcional, se ve pro) */
.nx-burger.is-open .nx-burger__line:nth-child(1){
  transform: translateY(6px) rotate(45deg);
}
.nx-burger.is-open .nx-burger__line:nth-child(2){
  opacity: 0;
}
.nx-burger.is-open .nx-burger__line:nth-child(3){
  transform: translateY(-6px) rotate(-45deg);
}
.nx-burger__line{
  transition: transform .18s ease, opacity .18s ease;
}

/* Drawer */
.nx-mobileMenu{
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
}
.nx-mobileMenu.is-open{ display: block; }

/* Backdrop */
.nx-mobileMenu__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(11,18,32,.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ✅ Panel blanco sólido con blur */
.nx-mobileMenu__panel{
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  max-width: 520px;
  margin-left: auto;

  border-radius: 26px;
  padding: 14px;

  background: rgba(255,255,255,.96);
  border: 1px solid rgba(11,18,32,.08);

  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);

  box-shadow: 0 30px 90px rgba(0,0,0,.22);

  transform: translateY(-10px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.nx-mobileMenu.is-open .nx-mobileMenu__panel{
  transform: translateY(0);
  opacity: 1;
}

/* Top row inside panel */
.nx-mobileMenu__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.nx-mobileMenu__title{
  font-weight: 950;
  color: rgba(11,18,32,.92);
  font-size: 13px;
  letter-spacing: -0.02em;
}

.nx-mobileMenu__close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,.10);
  background: rgba(11,18,32,.04);
  color: rgba(11,18,32,.86);
  font-weight: 950;
  cursor:pointer;
}

/* Links */
.nx-mobileMenu__links{
  display:grid;
  gap: 10px;
}

.nx-mobileMenu__link{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(11,18,32,.06);
  box-shadow: 0 14px 34px rgba(11,18,32,.06);
  font-weight: 900;
  color: rgba(11,18,32,.88);
}
.nx-mobileMenu__link:active{ transform: translateY(1px); }
.nx-mobileMenu__arrow{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(20,90,220,.08);
  border: 1px solid rgba(20,90,220,.12);
  font-weight: 950;
}

/* ✅ Breakpoint: ocultar nav desktop y mostrar burger */
@media (max-width: 820px){
  .nx-nav--desktop{ display:none; }
  .nx-burger{ display:inline-flex; }
}