/* ════════════════════════════════════════════════════════════════
   JAENENSE.COM — assets/css/layout.css
   Topbar sticky, tab bar mobile, layout del portal, footer.
   Depende de base.css.
   ════════════════════════════════════════════════════════════════ */

/* ── TOPBAR STICKY ───────────────────────────────────────────── */
.j-topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--cafe-0);
  border-bottom: 1px solid rgba(255,255,255,.08);
  height: 48px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}

.j-brand {
  font-family: var(--font-brand);
  font-weight: 800; font-size: 17px;
  color: #fff; letter-spacing: -.3px;
  text-decoration: none;
}
.j-brand em { color: var(--cafe-4); font-style: normal; }

.j-topbar-r {
  display: flex; align-items: center; gap: 10px;
}

.j-date {
  font-size: 11px; color: rgba(255,255,255,.45);
  font-variant-numeric: tabular-nums;
}

.j-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; color: #4ADE80;
  background: rgba(74,222,128,.12);
  padding: 2px 8px; border-radius: 20px;
  border: 1px solid rgba(74,222,128,.2);
}
.j-live .live-dot { background: #4ADE80; }

/* ── LAYOUT PRINCIPAL ────────────────────────────────────────── */
.j-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad);
  /* Espacio para el tab bar inferior en móvil */
  padding-bottom: calc(56px + 12px + env(safe-area-inset-bottom));
}

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.j-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3);
  padding: 8px 0 4px;
}
.j-breadcrumb a { color: var(--cafe-3); transition: color .15s; }
.j-breadcrumb a:hover { color: var(--cafe-2); }
.j-breadcrumb-sep { color: var(--border); }
.j-breadcrumb-current { color: var(--ink-2); font-weight: 500; }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.j-section { margin-bottom: 10px; }

.j-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}

.j-section-title {
  font-family: var(--font-brand);
  font-size: 15px; font-weight: 700; color: var(--ink-0);
  display: flex; align-items: center; gap: 7px;
}

.j-section-link {
  font-size: 12px; color: var(--cafe-3); font-weight: 500;
}
.j-section-link:hover { color: var(--cafe-2); }

/* Separador de categoría */
.j-cat-title {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-3);
  margin: 14px 0 8px;
  display: flex; align-items: center; gap: 8px;
}
.j-cat-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── TAB BAR MOBILE (navegación inferior) ────────────────────── */
.j-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--cafe-0);
  border-top: 1px solid rgba(255,255,255,.08);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
}

.j-tab {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; font-size: 9.5px;
  color: rgba(255,255,255,.4);
  text-decoration: none;
  padding: 6px 2px;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.j-tab:hover { color: rgba(255,255,255,.7); }
.j-tab.act   { color: var(--cafe-4); }

.j-tab-icon { font-size: 18px; line-height: 1; }

/* ── ALERTA GLOBAL (banner superior en cada página) ──────────── */
.j-alerta-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: #B91C1C;
  padding: 11px 14px; margin-bottom: 10px;
  border-radius: var(--r);
  font-size: 13px; color: #fff; line-height: 1.4;
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:none; }
}
.j-alerta-banner strong { font-weight: 600; }
.j-alerta-banner button {
  margin-left: auto; background: rgba(255,255,255,.15);
  color: #fff; font-size: 16px; padding: 2px 6px;
  border-radius: 4px; cursor: pointer; flex-shrink: 0;
}

/* ── HERO DE PÁGINA (compartido por varias secciones) ────────── */
.j-page-hero {
  border-radius: var(--r-l); padding: 22px 20px 18px;
  margin-bottom: 10px; position: relative; overflow: hidden;
}
.j-page-hero::after {
  position: absolute; right: 14px; top: 10px;
  font-size: 52px; opacity: .12; line-height: 1;
}
.j-hero-eyebrow {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 8px; font-weight: 600; position: relative; z-index: 1;
}
.j-hero-h1 {
  font-family: var(--font-brand);
  font-size: clamp(21px, 5.5vw, 28px);
  font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: 6px;
  position: relative; z-index: 1;
}
.j-hero-h1 em { font-style: normal; }
.j-hero-sub {
  font-size: 12.5px; color: rgba(255,255,255,.55);
  line-height: 1.5; margin-bottom: 14px;
  position: relative; z-index: 1;
}
.j-hero-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; position: relative; z-index: 1;
}

/* Meta pills (estado del dato) */
.j-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: 20px;
}
.j-pill-live { background: rgba(74,222,128,.15); color:#4ADE80; border:1px solid rgba(74,222,128,.25); }
.j-pill-warn { background: rgba(200,130,42,.2); color:var(--cafe-4); border:1px solid rgba(200,130,42,.25); }
.j-pill-info { background: rgba(255,255,255,.08); color:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.12); }

/* ── FOOTER DE PÁGINA ────────────────────────────────────────── */
.j-footnote {
  font-size: 11.5px; color: var(--ink-3);
  padding: 10px 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.j-footnote a { color: var(--cafe-3); }
.j-footnote a:hover { color: var(--cafe-2); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .j-page { padding: 8px; padding-bottom: calc(56px + 8px); }
}

@media (min-width: 760px) {
  .j-page { padding: 16px; padding-bottom: calc(56px + 16px); }
}
