/* ============================================================
   articulo.css — CSS de la LISTA (articulos.php) y el ARTÍCULO
   individual (articulo.php) del rediseño "Foco".
   El grid de tarjetas (.articles/.article-card) ya vive en
   rincon.css; aquí sobre todo el CUERPO del artículo (tipografía
   de lectura) y la cabecera, más los átomos de la lista.
   Cero style inline.
   ============================================================ */

/* ---------- Botón pequeño (no existe en rincon.css) ---------- */
.btn--sm { font-size: 12.5px; padding: 6px 12px; }

/* =========================================================
   LISTA DE ARTÍCULOS (articulos.php)
   ========================================================= */
.art-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4);
}
/* El mini-toggle de rincon.css apunta a <button>; aquí usamos <a> */
.art-toolbar .mini-toggle a {
  font-size: 11.5px; font-weight: 600; padding: 4px 12px; border-radius: var(--r-pill);
  color: var(--muted); white-space: nowrap;
}
.art-toolbar .mini-toggle a.is-active { background: var(--ink); color: #fff; }
.art-toolbar .mini-toggle a:hover { text-decoration: none; }

/* Chips de filtro por etiqueta */
.art-tagfilter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-5); }
.art-tagchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--ink); background: var(--surface);
}
.art-tagchip:hover { background: var(--hover); text-decoration: none; }
.art-tagchip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.art-tagchip__n { font-size: 11px; color: var(--muted); font-weight: 500; }
.art-tagchip.is-active .art-tagchip__n { color: rgba(255,255,255,.7); }
.art-tagchip--jugador { border-left: 3px solid var(--pos-b); }
.art-tagchip--equipo  { border-left: 3px solid var(--pos-p); }
.art-tagchip--tema    { border-left: 3px solid var(--accent); }

/* Extras dentro de la tarjeta de la lista */
.art-card__excerpt {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-card__foot { margin-top: auto; flex-wrap: wrap; }
.art-card__author { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.art-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
  background: var(--zebra); flex-shrink: 0;
}

/* Paginación */
.art-pager {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.art-pager__info { font-size: 13px; color: var(--muted); }

/* =========================================================
   ARTÍCULO INDIVIDUAL (articulo.php)
   ========================================================= */
.article-full {
  max-width: 760px;      /* medida cómoda de lectura */
  margin: var(--sp-4) auto 0;
}

.art-draft-note {
  background: var(--accent-soft); color: #8F5E12;
  border-radius: var(--r-input); padding: 8px 14px;
  font-size: 13px; font-weight: 600; margin-bottom: var(--sp-4);
}

/* --- Cabecera --- */
.art-head { margin-bottom: var(--sp-5); }
.art-title {
  font-family: var(--score); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(28px, 4.5vw, 40px); line-height: 1.12; color: var(--ink);
}
.art-lead {
  margin-top: var(--sp-3); font-size: 18px; line-height: 1.5;
  color: var(--muted); font-weight: 500;
}
.art-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: var(--sp-4); padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.art-meta__author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.art-meta__sep { color: var(--line); }
.art-meta__share { margin-left: auto; display: inline-flex; }
.art-avatar--lg { width: 30px; height: 30px; }
.art-avatar--ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--score); font-weight: 700; font-size: 12px;
  color: #fff; background: var(--ink);
}

/* --- Portada --- */
.art-cover {
  margin: 0 0 var(--sp-5); border-radius: var(--r-card); overflow: hidden;
  background: var(--zebra); border: 1px solid var(--line);
}
.art-cover img { display: block; width: 100%; height: auto; }

/* --- Cuerpo (HTML del editor WYSIWYG) --- */
.art-body {
  font-size: 17.5px; line-height: 1.72; color: var(--ink);
  overflow-wrap: break-word;
}
.art-body > *:first-child { margin-top: 0; }
.art-body p { margin: 0 0 1.15em; }
.art-body h2 {
  font-family: var(--score); font-weight: 700; font-size: 26px; line-height: 1.2;
  color: var(--ink); margin: 1.6em 0 .5em;
}
.art-body h3 {
  font-family: var(--score); font-weight: 600; font-size: 21px; line-height: 1.25;
  color: var(--ink); margin: 1.4em 0 .4em;
}
.art-body h4 { font-weight: 600; font-size: 18px; margin: 1.3em 0 .4em; color: var(--ink); }
.art-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.art-body a:hover { color: var(--accent); }
.art-body strong { font-weight: 600; }
.art-body ul, .art-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.art-body li { margin-bottom: .4em; }
.art-body img {
  max-width: 100%; height: auto; display: block;
  margin: 1.4em auto; border-radius: var(--r-card);
}
.art-body figure { margin: 1.4em 0; }
.art-body figure img { margin: 0 auto; }
.art-body figcaption {
  font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px;
}
.art-body iframe, .art-body video { max-width: 100%; }
.art-body blockquote {
  margin: 1.4em 0; padding: 6px 0 6px var(--sp-4);
  border-left: 3px solid var(--accent); color: var(--muted);
  font-size: 18px; font-style: italic;
}
.art-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.art-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--zebra); padding: 2px 6px; border-radius: 6px;
}
.art-body pre {
  background: var(--court-a); color: #fff; padding: var(--sp-4);
  border-radius: var(--r-card); overflow-x: auto; margin: 1.4em 0; font-size: 14px;
}
.art-body pre code { background: none; padding: 0; color: inherit; }

/* Tablas dentro del artículo: scroll horizontal sin romper la página */
.art-body table {
  width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px;
  display: block; overflow-x: auto; white-space: nowrap;
}
.art-body th, .art-body td {
  border: 1px solid var(--line); padding: 8px 12px; text-align: left;
}
.art-body thead th { background: var(--ink); color: #fff; font-weight: 600; }
.art-body tbody tr:nth-child(even) { background: var(--zebra); }

/* Menciones @jugador/@equipo del editor (si vienen como enlaces con clase) */
.art-body .mention, .art-body a.mention {
  font-weight: 600; color: var(--accent-deep); text-decoration: none;
  background: var(--accent-soft); padding: 1px 6px; border-radius: 6px;
}
.art-body .mention:hover { background: rgba(240,162,60,.28); }

/* --- Etiquetas del artículo --- */
.art-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.art-tag {
  font-size: 12.5px; font-weight: 600; line-height: 1;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--ink); background: var(--surface);
}
.art-tag:hover { background: var(--hover); text-decoration: none; }
.art-tag--jugador { border-left: 3px solid var(--pos-b); }
.art-tag--equipo  { border-left: 3px solid var(--pos-p); }
.art-tag--tema    { border-left: 3px solid var(--accent); }

/* =========================================================
   COMENTARIOS (articulo.php)
   ========================================================= */
.art-comments {
  max-width: 760px; margin: var(--sp-6) auto 0;
  padding-top: var(--sp-5); border-top: 1px solid var(--line);
}
.art-comments__title {
  font-family: var(--score); font-weight: 700; font-size: 22px;
  color: var(--ink); margin-bottom: var(--sp-4);
}
.art-comments__count { color: var(--muted); font-weight: 600; }

.art-comments__list { display: flex; flex-direction: column; gap: var(--sp-3); }
.art-comments__empty {
  color: var(--muted); font-size: 15px; padding: var(--sp-3) 0;
}

/* --- Comentario individual --- */
.art-comment {
  padding: var(--sp-4); border: 1px solid var(--line);
  border-radius: var(--r-card); background: var(--surface);
}
.art-comment--hidden { opacity: .55; background: var(--zebra); }
.art-comment__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-2);
}
.art-comment__author { display: inline-flex; align-items: center; gap: 8px; }
.art-comment__avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--zebra); flex-shrink: 0;
}
.art-comment__avatar--ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--score); font-weight: 700; font-size: 11px;
  color: #fff; background: var(--ink);
}
.art-comment__nick { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.art-comment__meta { display: inline-flex; align-items: center; gap: 10px; }
.art-comment__date { font-size: 12.5px; color: var(--muted); }
.art-comment__toggle {
  font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-pill); padding: 3px 10px; cursor: pointer;
}
.art-comment__toggle:hover { background: var(--hover); }
.art-comment__body {
  font-size: 15.5px; line-height: 1.6; color: var(--ink); overflow-wrap: break-word;
}

/* --- Formulario de nuevo comentario --- */
.art-comment-form { margin-top: var(--sp-5); }
.art-comment-form__label {
  display: block; font-family: var(--score); font-weight: 600;
  font-size: 16px; color: var(--ink); margin-bottom: var(--sp-2);
}
.art-comment-form textarea {
  width: 100%; min-height: 92px; resize: vertical;
  padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r-input); font-family: var(--sans);
  font-size: 15px; line-height: 1.5; background: var(--surface); color: var(--ink);
}
.art-comment-form textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.art-comment-form__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-top: var(--sp-3);
}
.art-comment-form__count {
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.art-comment-form__error { color: var(--down); font-size: 13.5px; margin-top: var(--sp-2); }

/* --- Aviso de login (sin sesión) --- */
.art-comment-login {
  margin-top: var(--sp-5); padding: var(--sp-4);
  border: 1px dashed var(--line); border-radius: var(--r-card);
  background: var(--zebra); color: var(--muted); font-size: 15px;
}
.art-comment-login p { margin: 0; }
.art-comment-login__link {
  color: var(--accent-deep); font: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.art-comment-login__link:hover { color: var(--accent); }

/* --- Buscador del 404 --- */
.art-404-search { display: flex; gap: 8px; margin: var(--sp-3) 0; flex-wrap: wrap; }
.art-404-search input {
  flex: 1; min-width: 200px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: var(--r-input);
  font-family: var(--sans); font-size: 14px; background: var(--surface); color: var(--ink);
}
.art-404-links { margin-top: var(--sp-3); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .art-body { font-size: 16.5px; }
  .art-meta__share { margin-left: 0; }
}
