/* ===================================================================
 * MyHumanBlueprint Child Theme — components.css
 * Componentes reutilizables: tipografía, buttons, cards, badges,
 * human-box, sidebars, navegación de posts.
 * =================================================================== */

/* ─── RESET Y BASE ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ─── TIPOGRAFÍA EXTENDIDA ─────────────────────────────────────── */

.mhb-lead {
  font-size: 1.15rem;
  color: var(--mhb-text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.mhb-caption {
  font-size: 0.8rem;
  color: var(--mhb-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mhb-eyebrow {
  font-family: var(--mhb-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mhb-gold);
  margin-bottom: 8px;
  display: block;
}

/* ─── BADGES Y ETIQUETAS ──────────────────────────────────────── */

.mhb-category-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--mhb-violet-light);
  font-family: var(--mhb-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.mhb-category-badge:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
  text-decoration: none;
}

.mhb-tag {
  display: inline-block;
  color: var(--mhb-text-muted);
  font-size: 0.8rem;
  margin-right: 8px;
  transition: color 0.2s ease;
  text-decoration: none;
}
.mhb-tag:hover {
  color: var(--mhb-gold);
  text-decoration: none;
}

/* ─── CARD BASE ───────────────────────────────────────────────── */
/* (definido también en style.css, aquí se extiende) */

.mhb-card .mhb-card-title {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1.1rem;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}

.mhb-card p {
  color: var(--mhb-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── CTA BLOCK ───────────────────────────────────────────────── */

.mhb-cta-block {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.15), rgba(201, 169, 110, 0.08));
  border: 1px solid var(--mhb-gold);
  border-radius: 12px;
  padding: 28px 32px;
  text-align: center;
  margin: 2rem 0;
}
.mhb-cta-block p {
  font-family: var(--mhb-font-heading);
  font-size: 1.1rem;
  color: var(--mhb-text-primary);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* ─── HUMAN BOX ───────────────────────────────────────────────── */

.mhb-human-box {
  background: var(--mhb-lavender-bg, #E8E0F0);
  border: 1px solid var(--mhb-lavender-border, rgba(139, 92, 246, 0.25));
  border-radius: 10px;
  padding: 20px 24px;
  color: #2C1A3E;
  font-family: var(--mhb-font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 1.5rem 0;
}
.mhb-human-box .mhb-human-box-titulo {
  color: #3D2D6A;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.mhb-human-box p:last-child {
  margin-bottom: 0;
}

/* Light mode: el human-box siempre es claro (igual que en el PDF) */
body.mhb-light .mhb-human-box,
[data-theme="light"] .mhb-human-box {
  border-color: rgba(109, 40, 217, 0.2);
}

/* ─── GATE CARD ───────────────────────────────────────────────── */

.mhb-gate-card {
  text-align: center;
  padding: 28px 24px;
}

.mhb-gate-number {
  font-family: var(--mhb-font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mhb-violet-light);
  margin-bottom: 6px;
}

.mhb-gate-card h4 {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.mhb-gate-placeholder {
  color: var(--mhb-text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 16px;
}

.mhb-gate-link {
  display: inline-block;
  color: var(--mhb-gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
  transition: all 0.2s ease;
}
.mhb-gate-link:hover {
  color: var(--mhb-gold-bright);
  border-bottom-color: var(--mhb-gold-bright);
}

/* ─── TIPO CARD ───────────────────────────────────────────────── */

.mhb-tipo-card {
  padding: 32px 24px;
  text-align: center;
}

.mhb-tipo-porcentaje {
  font-size: 0.78rem;
  color: var(--mhb-violet-light);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.mhb-tipo-descripcion {
  font-size: 0.92rem;
  color: var(--mhb-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.mhb-tipo-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: left;
}

.mhb-tipo-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.mhb-tipo-meta-label {
  color: var(--mhb-text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.mhb-tipo-meta-value {
  color: var(--mhb-gold);
  font-weight: 500;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────── */

.mhb-sidebar-title {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mhb-glass-border);
}

.mhb-sidebar-cta .mhb-sidebar-cta-title {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1rem;
  margin-bottom: 8px;
}

.mhb-sidebar-cta .mhb-sidebar-cta-desc {
  color: var(--mhb-text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.mhb-sidebar-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mhb-sidebar-categories ul li {
  padding: 5px 0;
  border-bottom: 1px solid var(--mhb-glass-border);
  font-size: 0.88rem;
}
.mhb-sidebar-categories ul li:last-child {
  border-bottom: none;
}

.mhb-sidebar-categories ul li a {
  color: var(--mhb-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.mhb-sidebar-categories ul li a:hover {
  color: var(--mhb-gold);
}

.mhb-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mhb-recent-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--mhb-glass-border);
  font-size: 0.88rem;
}
.mhb-recent-item:last-child {
  border-bottom: none;
}
.mhb-recent-item a {
  color: var(--mhb-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
}
.mhb-recent-item a:hover {
  color: var(--mhb-gold);
}

/* ─── WIDGETS ─────────────────────────────────────────────────── */

.mhb-widget {
  margin-bottom: 24px;
}
.mhb-widget-title {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mhb-glass-border);
}

/* ─── NAVEGACIÓN ENTRE POSTS ──────────────────────────────────── */

.mhb-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--mhb-glass-border);
  border-bottom: 1px solid var(--mhb-glass-border);
  margin: 32px 0;
}

.mhb-post-nav-prev,
.mhb-post-nav-next {
  flex: 1;
}

.mhb-post-nav-next {
  text-align: right;
}

.mhb-post-nav a {
  color: var(--mhb-text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: block;
}
.mhb-post-nav a:hover {
  color: var(--mhb-gold);
}

/* ─── READ MORE LINK ──────────────────────────────────────────── */

.mhb-read-more {
  color: var(--mhb-gold);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}
.mhb-read-more:hover {
  color: var(--mhb-gold-bright);
}

/* ─── MENSAJES DE ERROR SHORTCODE ─────────────────────────────── */

.mhb-error {
  color: var(--mhb-error, #EF4444);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

/* ─── LOADING SPINNER ─────────────────────────────────────────── */

.mhb-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(201, 169, 110, 0.2);
  border-top-color: var(--mhb-gold);
  border-radius: 50%;
  animation: mhb-spin 0.8s linear infinite;
}

@keyframes mhb-spin {
  to { transform: rotate(360deg); }
}

/* ─── RESPONSIVE BASE ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .mhb-post-nav {
    flex-direction: column;
    gap: 12px;
  }
  .mhb-post-nav-next {
    text-align: left;
  }
  .mhb-tipo-meta {
    font-size: 0.82rem;
  }
}
