/* ==========================================================
   NEL Web Public Portal — layout shell
   Header, footer, hero, Teli launcher
   ========================================================== */

/* -------- Site header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--nel-line);
}
.site-header-inner {
  height: var(--nel-header-h);
  display: flex;
  align-items: center;
  gap: 40px; /* R8: 32 → 40 por el logo más grande */
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--nel-brand-ink);
  padding: 6px 0;
}
/* .brand-lockup now wraps a single <span data-nel-logo="lockup"> — no images. */
.brand-lockup { color: var(--nel-brand-800); --nel-logo-accent: var(--nel-brand-600); }
.brand-lockup:hover { text-decoration: none; }
/* Legacy text spans (no longer emitted, kept for old markup compatibility). */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--nel-brand-ink); }
.brand-sub  { font-size: 11px; font-weight: 500; color: var(--nel-fg-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* R8 · Nav más grande y compacta: 16px/600, gap 2px, subrayado activo 3px pegado al borde inferior del header */
.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav a {
  padding: 8px 14px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: var(--nel-fg-secondary);
  border-radius: var(--nel-r-sm);
  text-decoration: none;
  position: relative;
  transition: color var(--nel-t-fast), background var(--nel-t-fast);
}
.site-nav a:hover { color: var(--nel-brand-800); background: var(--nel-brand-50); text-decoration: none; }
.site-nav a.is-active { color: var(--nel-brand-800); font-weight: 700; }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px;
  /* (header 72 − link 40) / 2 = 16 → la barra se apoya sobre el borde inferior del header */
  bottom: calc((var(--nel-header-h) - 40px) / -2);
  height: 3px; background: var(--nel-brand-800);
  border-radius: 3px 3px 0 0;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

/* Language indicator — single static badge for now (ES only; Chinese pending) */
.lang-badge {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nel-text-muted);
  letter-spacing: 0.08em;
  border: 1px solid var(--nel-border-default);
  border-radius: 8px;
  background: var(--nel-bg-surface);
}
/* Legacy .lang-switch class kept for backward-compat but hidden if it appears */
.lang-switch { display: none !important; }

/* User menu (identity) */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--nel-r-pill);
  border: 1px solid var(--nel-line);
  background: var(--nel-surface);
  color: var(--nel-brand-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--nel-t-fast);
}
.user-menu:hover { border-color: var(--nel-brand-mid); background: var(--nel-surface-2); }
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nel-brand-800), var(--nel-brand-600));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.user-menu .user-name { line-height: 1.1; font-weight: 600; }
.user-menu .user-role { line-height: 1.1; font-size: 11px; color: var(--nel-fg-muted); font-weight: 500; white-space: nowrap; }
.user-menu .user-info { display: flex; flex-direction: column; align-items: flex-start; }

/* -------- Hero -------- */
.hero {
  position: relative;
  /* Single, uniform background — matches the illustration's white so the image dissolves in */
  background: var(--nel-brand-50);
  padding: 72px 0 88px;
  overflow: hidden;
}
/* No decorative gradient overlay — keep the background truly one color */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
  position: relative;
}
.hero-copy .eyebrow { margin-bottom: 16px; display: inline-block; }
.hero-copy .display { margin-bottom: 20px; }
.hero-copy .lead { max-width: 520px; margin-bottom: 32px; }

.hero-search {
  position: relative;
  display: flex;
  gap: 8px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  border-radius: 14px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--nel-shadow-2);
  max-width: 560px;
}
.hero-search input {
  border: none;
  background: transparent;
  flex: 1;
  height: 52px;
  font-size: 16px;
  color: var(--nel-fg);
  outline: none;
}
.hero-search input::placeholder { color: var(--nel-fg-subtle); }
.hero-search .btn { height: 52px; padding: 0 22px; border-radius: 10px; }

.hero-chips { display: flex; gap: 6px; flex-wrap: nowrap; margin-top: 20px; align-items: center; white-space: nowrap; position: relative; z-index: 2; width: max-content; }
.hero-chips-label { font-size: 12px; color: var(--nel-fg-muted); font-weight: 500; margin-right: 2px; flex-shrink: 0; }
.chip-suggest {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 5px 11px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--nel-fg-secondary);
  cursor: pointer;
  transition: all var(--nel-t-fast);
  text-decoration: none;
}
.chip-suggest:hover { border-color: var(--nel-brand-mid); background: var(--nel-brand-soft); color: var(--nel-brand-ink); text-decoration: none; }

.hero-visual {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual img {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
  /* The PNG is fully transparent — no blend mode needed, sits on any surface color. */
}

/* Hero trust bar */
.trust-bar {
  border-top: 1px solid var(--nel-line);
  background: var(--nel-surface);
  padding: 24px 0;
  margin-top: -1px;
}
.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--nel-fg-secondary);
  line-height: 1.35;
}
.trust-item strong { display: block; color: var(--nel-brand-ink); font-weight: 700; font-size: 14px; letter-spacing: -0.005em; }

/* -------- Section -------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--nel-fg-muted); margin: 0; }
.section-link { color: var(--nel-accent); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.section-link:hover { text-decoration: none; gap: 6px; }

/* Audience split (Personas / Organizaciones) */
.audience-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.audience-card {
  padding: 28px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  border-radius: var(--nel-r-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--nel-t-med) var(--nel-ease-out);
  position: relative;
  overflow: hidden;
}
.audience-card { box-shadow: var(--nel-shadow-1); }
.audience-card:hover { border-color: var(--nel-brand-600); box-shadow: var(--nel-shadow-2); transform: translateY(-2px); }
.audience-card:active { transform: translateY(1px); box-shadow: var(--nel-shadow-1); }
.audience-card:focus-visible { outline: none; border-color: var(--nel-brand-600); box-shadow: 0 0 0 3px rgba(30,125,221,.28); }
/* Both audience cards share one visual treatment — no grey/dashed "empty" variant */
.audience-card.is-empty { background: var(--nel-surface); border-style: solid; }
.audience-card .icon-plate { transition: background var(--nel-t-fast) var(--nel-ease-out), color var(--nel-t-fast) var(--nel-ease-out); }
.audience-card:hover .icon-plate { background: var(--nel-brand-800) !important; color: #fff !important; }
.audience-card h3 { transition: color var(--nel-t-fast) var(--nel-ease-out); }
.audience-card:hover h3 { color: var(--nel-brand-800); }
.audience-count > svg { transition: transform var(--nel-t-med) var(--nel-ease-out); }
.audience-card:hover .audience-count > svg { transform: translateX(4px); }
.audience-head { display: flex; align-items: center; gap: 14px; }
.audience-head .icon-plate { width: 48px; height: 48px; border-radius: 12px; }
.audience-count { font-size: 13px; color: var(--nel-fg-muted); font-weight: 500; margin-top: auto; display: flex; align-items: center; gap: 6px; }
.audience-count b { color: var(--nel-brand-ink); font-size: 15px; font-weight: 700; }

/* Service featured card */
.service-card {
  padding: 24px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  border-radius: var(--nel-r-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--nel-t-med) var(--nel-ease-out);
  height: 100%;
}
.service-card:hover { border-color: var(--nel-brand-mid); box-shadow: var(--nel-shadow-2); transform: translateY(-2px); }
.service-illus {
  width: 80px; height: 80px;
  background: transparent;
  border-radius: 14px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.service-illus img { width: 100%; height: 100%; object-fit: contain; }
.service-title { font-size: 16px; font-weight: 600; color: var(--nel-brand-ink); line-height: 1.35; }
.service-desc  { font-size: 13px; color: var(--nel-fg-muted); line-height: 1.5; }
.service-meta  { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--nel-line-soft); flex-wrap: wrap; }

/* Quick actions row */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.qa-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  border-radius: var(--nel-r-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--nel-t-med) var(--nel-ease-out);
}
.qa-card:hover { border-color: var(--nel-brand-mid); background: var(--nel-surface); box-shadow: var(--nel-shadow-2); text-decoration: none; transform: translateY(-1px); }
.qa-card .icon-plate { width: 44px; height: 44px; }
.qa-title { font-size: 15px; font-weight: 600; color: var(--nel-brand-ink); margin-bottom: 2px; }
.qa-desc  { font-size: 12px; color: var(--nel-fg-muted); }
.qa-arrow { margin-left: auto; color: var(--nel-fg-subtle); transition: transform var(--nel-t-fast); }
.qa-card:hover .qa-arrow { transform: translateX(3px); color: var(--nel-brand); }

/* -------- Footer -------- */
.site-footer {
  background: var(--nel-brand-ink);
  color: rgba(255,255,255,0.72);
  padding: 64px 0 32px;
  margin-top: 100px;
}
.site-footer h4 {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--nel-track-caps);
  margin-bottom: 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand.on-dark, .footer-brand { color: #fff; --nel-logo-accent: var(--nel-brand-400, #7DBAF4); }
.footer-brand-text { color: rgba(255,255,255,0.9); font-weight: 700; font-size: 15px; }
.footer-brand-sub { color: rgba(255,255,255,0.55); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.footer-desc { color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 16px; line-height: 1.6; max-width: 320px; }

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  padding: 5px 0;
  text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* -------- Teli launcher (bottom-right) -------- */
.teli-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.teli-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 8px;
  height: 60px;
  border-radius: 999px;
  background: var(--nel-surface);
  border: 1px solid var(--nel-line);
  color: var(--nel-brand-ink);
  box-shadow: var(--nel-shadow-3);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--nel-t-med) var(--nel-ease-out);
}
.teli-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(15,23,42,.14), 0 4px 8px rgba(15,23,42,.04); }
.teli-btn img { width: 44px; height: 44px; border-radius: 999px; background: var(--nel-brand-soft); padding: 4px; }
.teli-btn .teli-status { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.teli-btn .teli-name { font-size: 14px; font-weight: 700; }
.teli-btn .teli-hint { font-size: 11px; color: var(--nel-fg-muted); font-weight: 500; }
.teli-online-dot { width: 8px; height: 8px; border-radius: 999px; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,.2); margin-left: 8px; }

/* Notice bar */
.notice-bar {
  padding: 14px 20px;
  border: 1px solid rgba(11,105,199,.14);
  background: linear-gradient(90deg, var(--nel-info-soft), rgba(228,231,243,.4));
  border-radius: var(--nel-r-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--nel-accent-ink);
  font-size: 13px;
  line-height: 1.5;
}

/* -------- Responsive -------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
  .trust-bar-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .site-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .audience-split { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}
