/* ═══════════════════════════════════════════
   REX Blog — Artículo individual
   Usa el tema claro de style.css
   ═══════════════════════════════════════════ */

/* ── Topbar ─────────────────────────────────── */
.art-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}

.art-topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  max-width: 860px;
  margin: 0 auto;
  min-width: 0;
}

.art-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  transition: color var(--t);
  white-space: nowrap;
}
.art-back:hover { color: var(--rex-orange); }

.art-topbar-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* Tag colorido en el topbar */
.art-topbar-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Título truncado en el topbar */
.art-topbar-title {
  font-family: var(--f-head);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ── Wrapper ─────────────────────────────────── */
.art-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 16px 28px;
}

/* ── Card ────────────────────────────────────── */
.art-card {
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}

.art-badge-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--rex-red), var(--rex-orange), var(--rex-yellow));
}

/* ── Header del artículo ─────────────────────── */
.art-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.art-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.art-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,101,0,.10);
  color: var(--rex-orange);
}

.art-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.art-title {
  font-family: var(--f-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 12px;
}

.art-lead {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ── Imagen ──────────────────────────────────── */
.art-img-wrap { width: 100%; }

.art-img-wrap img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

/* Placeholder hasta tener foto real */
.art-img-placeholder {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--f-body);
}
.art-img-placeholder i { font-size: 28px; }
.art-img-placeholder--sm {
  min-height: 120px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Cuerpo ──────────────────────────────────── */
.art-body {
  padding: 24px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
  font-family: var(--f-body);
}

.art-body p { margin-bottom: 16px; }
.art-body p:last-child { margin-bottom: 0; }

.art-body h2 {
  font-family: var(--f-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 24px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.art-body ul, .art-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.art-body li { line-height: 1.6; }
.art-body strong { color: var(--text); font-weight: 700; }

/* ── Botones fuera de la card ───────────────── */
.art-footer {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: transparent;
}

/* Botones: estilo claro, coherente con el tema */
.art-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.art-cta:hover {
  border-color: var(--rex-orange);
  color: var(--rex-orange);
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.art-cta--wa {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}
.art-cta--wa:hover {
  background: #1ebe5b;
  border-color: #1ebe5b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,211,102,.35);
}

/* Volver al blog */
.art-back-footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .art-back-footer {
    margin-top: 48px;
  }
}

.art-back-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: color var(--t), border-color var(--t);
}
.art-back-footer a:hover { color: var(--text); border-color: var(--text-2); }

/* ── Desktop ─────────────────────────────────── */
@media (min-width: 768px) {
  .art-wrap { padding: 36px 16px 36px; }
  .art-header { padding: 32px 32px 24px; }
  .art-title { font-size: 28px; }
  .art-lead { font-size: 16px; }
  .art-body { padding: 32px; font-size: 16px; }
  .art-body h2 { font-size: 18px; }
  .art-footer { padding: 20px 32px 28px; }
}
