/* ===== Negocios en Web — barra de demo y pantalla de carga =====
   Se suma a cada demo de inmobiliaria sin tocar su diseño propio. */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Instrument+Sans:wght@400;500;600&display=swap");

.nw-bar, .nw-splash {
  --nw-ink: #0E1A2B;
  --nw-ink-2: #A9B4C9;
  --nw-cobalt: #2346E8;
  --nw-cobalt-dk: #1733B8;
  --nw-signal: #12B886;
  font-family: "Instrument Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Barra ---- */
.nw-bar {
  position: relative; z-index: 60;
  background: var(--nw-ink); color: #fff;
  font-size: 14px; line-height: 1.3;
}
.nw-bar__in {
  max-width: 1240px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap;
}
.nw-bar a { color: inherit; text-decoration: none; }
.nw-bar__brand { display: inline-flex; align-items: center; gap: 8px; font: 500 15px/1 "Bricolage Grotesque", system-ui, sans-serif; white-space: nowrap; }
.nw-bar__brand b { font-weight: 800; }
.nw-bar__brand svg { width: 24px; height: 24px; flex: none; }
.nw-bar__info { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; flex: 1; min-width: 0; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.16); }
.nw-bar__plan { font-weight: 600; }
.nw-bar__note { color: var(--nw-ink-2); }
.nw-bar__price { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.nw-bar__price s { color: var(--nw-ink-2); font-weight: 400; }
.nw-bar__off { background: var(--nw-signal); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.nw-bar__actions { display: flex; align-items: center; gap: 8px; }
.nw-bar__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px;
  border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap;
  border: 1.5px solid rgba(255,255,255,.28); transition: background-color .2s, border-color .2s;
}
.nw-bar__btn:hover { border-color: #fff; }
.nw-bar__btn--solid { background: var(--nw-cobalt); border-color: var(--nw-cobalt); }
.nw-bar__btn--solid:hover { background: var(--nw-cobalt-dk); border-color: var(--nw-cobalt-dk); }
.nw-bar :focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 6px; }

@media (max-width: 760px) {
  .nw-bar__in { padding: 10px 14px; gap: 8px 12px; }
  .nw-bar__info { order: 3; flex-basis: 100%; padding-left: 0; border-left: 0; font-size: 13px; }
  .nw-bar__note { display: none; }
  .nw-bar__actions { margin-left: auto; }
  .nw-bar__btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .nw-bar__brand span { display: none; }
}

/* ---- Pantalla de carga ---- */
.nw-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: #F4F6FA; color: var(--nw-ink);
  transition: opacity .35s ease, visibility .35s ease;
  animation: nw-splash-failsafe 0s linear 6s forwards; /* si el JS falla, se oculta sola */
}
.nw-splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.nw-splash__box { display: grid; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.nw-splash__mark { width: 56px; height: 56px; color: var(--nw-cobalt); }
.nw-splash__mark rect { transform-origin: center; animation: nw-pulse 1.4s ease-in-out infinite; }
.nw-splash__title { margin: 0; font: 800 clamp(22px, 4vw, 30px)/1.1 "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: -0.02em; }
.nw-splash__sub { margin: -8px 0 0; color: #44506A; font-size: 15px; }
.nw-splash__track { width: 180px; height: 4px; border-radius: 4px; background: #D9DFEA; overflow: hidden; }
.nw-splash__track i { display: block; height: 100%; width: 40%; border-radius: 4px; background: var(--nw-cobalt); animation: nw-load 1.1s ease-in-out infinite; }

@keyframes nw-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes nw-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.92); } }
@keyframes nw-splash-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

@media (prefers-reduced-motion: reduce) {
  .nw-splash__mark rect, .nw-splash__track i { animation: none; }
  .nw-splash__track i { width: 100%; }
}
.nw-seen .nw-splash { display: none; }
@media (max-width: 760px) { .nw-bar__panel { display: none; } }
