/* =============================================================
   Author Box premium — easyabogado.com
   E-E-A-T jurídico (YMYL): colegiado, experiencia, especialidades,
   última revisión legal, redes y verificación.
   ============================================================= */

:root {
  /* Hereda los mismos tokens del TOC. Si no usas el TOC, descomenta:
  --ab-accent:        #1d4ed8;
  --ab-accent-soft:   #3b82f6;
  --ab-accent-bg:     rgba(29, 78, 216, 0.08);
  --ab-bg:            #ffffff;
  --ab-bg-card:       #f8fafc;
  --ab-border:        #e2e8f0;
  --ab-text:          #1e293b;
  --ab-text-muted:    #64748b;
  --ab-text-strong:   #0f172a;
  */
  --ab-accent:        var(--toc-accent,        #1d4ed8);
  --ab-accent-soft:   var(--toc-accent-soft,   #3b82f6);
  --ab-accent-bg:     var(--toc-accent-bg,     rgba(29, 78, 216, 0.08));
  --ab-bg:            var(--toc-bg,            #ffffff);
  --ab-bg-card:       var(--toc-bg-card,       #f8fafc);
  --ab-border:        var(--toc-border,        #e2e8f0);
  --ab-text:          var(--toc-text,          #1e293b);
  --ab-text-muted:    var(--toc-text-muted,    #64748b);
  --ab-text-strong:   var(--toc-text-strong,   #0f172a);
  --ab-success:       #16a34a;
  --ab-gold:          #d97706;
  --ab-radius:        14px;
  --ab-radius-sm:     8px;
}

/* ============================================================
   Contenedor
   ============================================================ */
.author-box {
  margin: 56px 0 24px;
  background: var(--ab-bg);
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

/* Acento decorativo arriba */
.author-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ab-accent), var(--ab-accent-soft));
}

.author-box-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ab-text-muted);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-box-eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--ab-border);
}

/* ============================================================
   Cabecera: foto + identidad
   ============================================================ */
.author-box-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-box-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.author-box-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: var(--ab-bg-card);
  border: 3px solid var(--ab-bg);
  box-shadow: 0 0 0 1px var(--ab-border);
}

/* Tick de verificación tipo Twitter/LinkedIn (colegio profesional) */
.author-box-verified {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--ab-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ab-bg);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.4);
}
.author-box-verified svg { width: 14px; height: 14px; }

.author-box-identity { flex: 1; min-width: 0; }

.author-box-name {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ab-text-strong);
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.author-box-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.author-box-name a:hover { border-bottom-color: var(--ab-accent); }

.author-box-role {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ab-text-muted);
  line-height: 1.45;
}

/* Pills de credenciales (colegio, n.º colegiado, años exp.) */
.author-box-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.author-box-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ab-text);
  background: var(--ab-bg-card);
  border: 1px solid var(--ab-border);
  border-radius: 999px;
  padding: 5px 10px;
  line-height: 1;
}
.author-box-pill svg { width: 12px; height: 12px; color: var(--ab-accent); }
.author-box-pill.is-accent {
  background: var(--ab-accent-bg);
  border-color: transparent;
  color: var(--ab-accent);
}
.author-box-pill.is-accent svg { color: var(--ab-accent); }
.author-box-pill.is-gold {
  background: rgba(217, 119, 6, 0.08);
  border-color: transparent;
  color: var(--ab-gold);
}
.author-box-pill.is-gold svg { color: var(--ab-gold); }

/* ============================================================
   Bio
   ============================================================ */
.author-box-bio {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ab-text);
}
.author-box-bio p { margin: 0 0 10px; }
.author-box-bio p:last-child { margin-bottom: 0; }

/* ============================================================
   Especialidades (tags)
   ============================================================ */
.author-box-specialties {
  margin-top: 18px;
}
.author-box-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ab-text-muted);
  margin: 0 0 8px;
}
.author-box-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.author-box-tags li {
  font-size: 13px;
  font-weight: 500;
  color: var(--ab-text);
  background: var(--ab-bg-card);
  border: 1px solid var(--ab-border);
  border-radius: var(--ab-radius-sm);
  padding: 5px 10px;
  line-height: 1.3;
}

/* ============================================================
   Meta footer: estadísticas + redes + última revisión
   ============================================================ */
.author-box-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ab-border);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.author-box-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.author-box-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.author-box-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ab-text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.author-box-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ab-text-muted);
}

/* ============================================================
   Redes sociales
   ============================================================ */
.author-box-socials {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.author-box-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--ab-radius-sm);
  background: var(--ab-bg-card);
  border: 1px solid var(--ab-border);
  color: var(--ab-text-muted);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.author-box-socials a:hover {
  color: var(--ab-accent);
  background: var(--ab-accent-bg);
  border-color: transparent;
  transform: translateY(-1px);
}
.author-box-socials svg { width: 16px; height: 16px; }

/* ============================================================
   Pie de revisión legal (E-E-A-T crítico para YMYL)
   ============================================================ */
.author-box-review {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--ab-bg-card);
  border-radius: var(--ab-radius-sm);
  font-size: 12.5px;
  color: var(--ab-text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.author-box-review svg {
  width: 16px;
  height: 16px;
  color: var(--ab-success);
  flex-shrink: 0;
  margin-top: 2px;
}
.author-box-review strong { color: var(--ab-text-strong); font-weight: 600; }
.author-box-review time { color: var(--ab-text-strong); font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .author-box { padding: 22px 18px; }
  .author-box-header { gap: 14px; }
  .author-box-avatar { width: 64px; height: 64px; }
  .author-box-verified { width: 22px; height: 22px; }
  .author-box-verified svg { width: 12px; height: 12px; }
  .author-box-name { font-size: 18px; }
  .author-box-role { font-size: 13px; }
  .author-box-bio { font-size: 14.5px; }
  .author-box-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .author-box-stats { gap: 18px; width: 100%; }
}
