/* ==========================================================================
   BARRA DE RED NUEVA ONDA (fuente única: MLCSound/_shared/nuevaonda-bar)
   Copia fiel de la franja "browser-tabs" + TopUtilityBar y del menú flotante
   móvil (MobileBottomNav) de NuevaOndaApp, en HTML/CSS estático.
   Todo va con prefijo .nob- para no chocar con el estilo de cada landing.
   No editar la copia que vive en cada landing: se sobrescribe con install.mjs.
   ========================================================================== */
:root {
  --nob-h: 56px;          /* alto de la franja superior */
  --nob-offset: 56px;     /* parte visible de la franja (lo actualiza nob.js) */
  --nob-bottom: 0px;      /* espacio que ocupa el menú flotante (solo móvil) */
  --nob-grad: linear-gradient(120deg, #d62dab 0%, #f05a28 100%);
}

html.nob-framed { --nob-h: 0px; --nob-offset: 0px; --nob-bottom: 0px; }
html.nob-framed .nob-bar, html.nob-framed .nob-bottom { display: none !important; }

body { padding-top: var(--nob-h) !important; }

.nob-bar, .nob-bar *, .nob-bottom, .nob-bottom * { box-sizing: border-box; }

.nob-bar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--nob-h);
  z-index: 9999; display: flex; align-items: flex-end; padding: 0 14px;
  background: var(--nob-grad);
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, .3), inset 0 2px 3px rgba(255, 255, 255, .25);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px; line-height: 1.2; color: #fff; text-align: left; letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
.nob-bar a { color: inherit; text-decoration: none; }
.nob-bar svg { display: block; }

/* ---- Pestañas (Nueva Onda activa + Nueva News) ---- */
.nob-tabs { display: flex; align-items: flex-end; gap: 4px; height: 100%; margin: 0; }
.nob-tab {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 6px 20px 8px; border-radius: 18px 18px 0 0; border: 0; cursor: pointer;
}
.nob-tab::before, .nob-tab::after {
  content: ''; position: absolute; bottom: 0; width: 14px; height: 14px; pointer-events: none;
}
.nob-tab::before { left: -14px; background: radial-gradient(circle at top left, transparent 14px, var(--nob-fillet) 14px); }
.nob-tab::after { right: -14px; background: radial-gradient(circle at top right, transparent 14px, var(--nob-fillet) 14px); }
.nob-tab-active, .nob-tab-search { background: var(--nob-tab-bg, #f3edf9); --nob-fillet: var(--nob-tab-bg, #f3edf9); z-index: 10; }
.nob-tab-inactive { background: #000; --nob-fillet: #000; z-index: 1; }
.nob-logo-onda { height: 34px; width: auto; }
.nob-logo-news { height: 20px; width: auto; border-radius: 3px; mix-blend-mode: lighten; }
.nob-badge {
  position: absolute; top: -1px; right: 4px; z-index: 2; background: #ff3b30; color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

/* ---- Utilidades (fecha, clima, redes, notificaciones) ---- */
.nob-right { display: flex; align-items: center; gap: 16px; margin-left: auto; margin-right: 14px; height: 100%; }
.nob-date { font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.nob-divider { width: 1px; height: 20px; background: rgba(255, 255, 255, .3); margin: 0 4px; }
.nob-weather {
  display: flex; align-items: center; gap: 5px; font: inherit; font-weight: 600; white-space: nowrap;
  background: transparent; border: 0; padding: 0; color: #fff; cursor: pointer;
}
.nob-social { display: flex; align-items: center; gap: 8px; }
.nob-social a, .nob-weather { transition: transform .2s ease, opacity .2s ease; }
.nob-social a:hover, .nob-weather:hover { transform: scale(1.1); opacity: .8; }
.nob-notify {
  position: relative; display: flex; align-items: center; gap: 8px; background: #10b981; color: #fff;
  border-radius: 20px; padding: 4px 10px 4px 12px; transition: transform .2s ease;
}
.nob-notify::after {
  content: ''; position: absolute; inset: 0; border-radius: 20px; background: rgba(16, 185, 129, .6);
  animation: nob-pulse 2s infinite; pointer-events: none;
}
.nob-notify:hover { transform: scale(1.05); }
.nob-notify-text { font-size: 10px; font-weight: 700; line-height: 1.1; }
@keyframes nob-pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.18); opacity: 0; } }

/* ---- Buscador (pestaña derecha) ---- */
.nob-tab-search { padding: 8px 18px 10px; cursor: default; }
.nob-search { display: flex; align-items: center; gap: 8px; width: 200px; margin: 0; }
.nob-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px;
  color: var(--nob-tab-ink, #000); padding: 0; margin: 0; box-shadow: none; height: auto;
}
.nob-search input::placeholder { color: var(--nob-tab-ink, #000); opacity: .6; }
.nob-search button { display: flex; align-items: center; background: transparent; border: 0; padding: 0 8px; cursor: pointer; color: var(--nob-tab-ink, #000); }

/* ---- Móvil ---- */
.nob-mcluster { display: none; }
.nob-mbtn {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff; border: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.nob-msearch {
  position: absolute; top: var(--nob-h); left: 0; right: 0; z-index: 9998; padding: 10px 14px; background: var(--nob-grad);
}
.nob-msearch[hidden] { display: none; }
.nob-msearch form { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .15); border-radius: 999px; padding: 8px 14px; margin: 0; }
.nob-msearch input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; font-size: 14px; padding: 0; }
.nob-msearch input::placeholder { color: rgba(255, 255, 255, .7); }

@media (max-width: 1400px) { .nob-search { width: 130px; } .nob-date { display: none; } }
@media (max-width: 1100px) { .nob-weather, .nob-weather + .nob-divider { display: none; } }

@media (max-width: 768px) {
  :root { --nob-h: calc(44px + env(safe-area-inset-top)); --nob-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .nob-bar { padding: env(safe-area-inset-top) 10px 0; }
  .nob-tabs { gap: 6px; }
  .nob-tab { height: 36px; padding: 5px 12px 6px; gap: 6px; }
  .nob-tab-inactive { height: 30px; padding: 3px 10px; }
  .nob-logo-onda { height: 20px; }
  .nob-logo-news { height: 16px; }
  .nob-badge { font-size: 9px; padding: 1px 5px; }
  .nob-right, .nob-tab-search { display: none; }
  .nob-mcluster { display: flex; align-items: center; gap: 6px; margin-left: auto; padding-bottom: 6px; }
  /* hueco al final para que el menú flotante no tape el pie (sin pisar el padding propio de cada landing) */
  body::after { content: ''; display: block; height: var(--nob-bottom); }
}

/* ---- Menú flotante móvil (MobileBottomNav) ---- */
.nob-bottom { display: none; }
@media (max-width: 768px) {
  .nob-bottom {
    display: flex; align-items: center; justify-content: space-around; position: fixed;
    left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); z-index: 9000;
    height: 64px; padding: 0 6px; border-radius: 28px; background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }
}
.nob-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; padding: 6px 8px;
  color: #9ca3af; font-size: 11px; font-weight: 600; line-height: 1.2; text-decoration: none; letter-spacing: normal;
}
.nob-item.active { color: #d62dab; }
.nob-item-elevated { margin-top: -26px; }
.nob-explorar {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--nob-grad); color: #fff; border: 4px solid #fff; box-shadow: 0 8px 20px rgba(214, 45, 171, .45);
}

/* ---- Logo Nueva Onda del header de cada landing ----
   Mientras la barra de red está a la vista ya se ve Nueva Onda arriba: el logo
   que acompaña al del programa se esconde (desliza hacia el logo del programa)
   y vuelve a entrar cuando la barra sale de pantalla al hacer scroll.
   Cada landing marca su separador con .nob-hb-sep y su logo con .nob-hb-no. */
.nob-hb-sep, .nob-hb-no {
  transition: opacity .45s cubic-bezier(.2, .7, .2, 1), transform .45s cubic-bezier(.2, .7, .2, 1), filter .45s ease;
  will-change: opacity, transform;
}
html.nob-bar-on .nob-hb-no { opacity: 0; transform: translateX(-14px) scale(.85); filter: blur(2px); pointer-events: none; }
html.nob-bar-on .nob-hb-sep { opacity: 0; transform: scaleY(.2); }
@media (prefers-reduced-motion: reduce) { .nob-hb-sep, .nob-hb-no { transition: opacity .2s linear; transform: none !important; filter: none !important; } }

/* ---- Carrusel "Red Nueva Onda" (solo logos) ---- */
.nob-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.nob-red { position: relative; z-index: 2; padding: clamp(28px, 5vw, 56px) 0; overflow: hidden; }
.nob-red__viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.nob-red__track { display: flex; gap: 18px; width: max-content; animation: nob-marquee 45s linear infinite; padding: 10px 0; }
.nob-red:hover .nob-red__track, .nob-red:focus-within .nob-red__track { animation-play-state: paused; }
@keyframes nob-marquee { to { transform: translateX(-25%); } }
.nob-red__item {
  flex: 0 0 auto; width: 210px; height: 100px; border-radius: 24px; display: flex; align-items: center; justify-content: center;
  padding: 16px 22px; box-sizing: border-box; border: 1px solid rgba(127, 127, 127, .22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18); transition: transform .25s ease, box-shadow .25s ease;
}
.nob-red__item:hover, .nob-red__item:focus-visible { transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 34px rgba(0, 0, 0, .28); }
.nob-red__item img { display: block; max-width: 100%; max-height: 62px; width: auto; height: auto; object-fit: contain; margin: 0; filter: none; }
@media (max-width: 768px) {
  .nob-red__item { width: 160px; height: 80px; border-radius: 20px; padding: 12px 16px; }
  .nob-red__item img { max-height: 48px; }
  .nob-red__track { gap: 12px; animation-duration: 32s; }
}
@media (prefers-reduced-motion: reduce) { .nob-red__track { animation: none; } .nob-red__viewport { overflow-x: auto; } }
