/* ============================================================
   css/foro.css
   Estilos de la página "Foro de formuladores" (foro.html).

   Fuente única de verdad para las tarjetas de hilo (.thread-*):
   antes vivían repartidas entre css/sections.css (interior) y
   css/academia.css (tarjeta). Se consolidan acá y se extienden con
   hero, toolbar de filtros + buscador, hilo destacado y badges.

   Reutiliza los tokens de css/styles.css (:root) y componentes de
   css/academia.css (.side-panel, .chip-filter, .cta-button).
   ============================================================ */

/* ------------------------------------------------------------
   1. HERO DEL FORO (banner de bienvenida)
   ------------------------------------------------------------ */
.foro-hero {
  padding: 104px 24px 8px;
  background: var(--bg-main);
}

.foro-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.foro-hero__banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(120, 100, 88, 0.16);
}

.foro-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.foro-hero__stats li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-terracota-deep);
  background: rgba(255, 252, 249, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: var(--shadow-card-flat);
}

.foro-hero__stats .icon { width: 1.1em; height: 1.1em; }

/* ------------------------------------------------------------
   2. CUERPO + LAYOUT (contenido + sidebar)
   ------------------------------------------------------------ */
.foro-section {
  padding: 34px 24px 90px;
  background: var(--bg-main);
}

.foro-list-head { margin-bottom: 18px; }

.foro-list-head h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.foro-list-head p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.foro-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.foro-main { min-width: 0; }

.foro-side {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ------------------------------------------------------------
   3. TOOLBAR: filtros por categoría + buscador
   ------------------------------------------------------------ */
.foro-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.foro-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foro-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 340px;
  background: rgba(255, 252, 249, 0.82);
  border: 1.5px solid rgba(74, 63, 53, 0.14);
  border-radius: 999px;
  padding: 8px 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.foro-search:focus-within {
  border-color: var(--color-cta);
  box-shadow: 0 0 0 3px rgba(234, 184, 163, 0.35);
}

.foro-search .icon {
  width: 1.1em;
  height: 1.1em;
  color: var(--color-muted-warm);
  flex-shrink: 0;
}

.foro-search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--color-text);
}

.foro-search input::placeholder { color: var(--color-muted-warm); }

.foro-count {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--color-muted-warm);
  margin: 0 0 14px;
}

/* ------------------------------------------------------------
   4. HILO DESTACADO
   ------------------------------------------------------------ */
#foroDestacado:not(:empty) { margin-bottom: 20px; }

.thread-card--featured {
  border: 1.5px solid var(--color-cta);
  background: linear-gradient(150deg, rgba(234, 184, 163, 0.20) 0%, rgba(255, 252, 249, 0.9) 100%);
}

.thread-card--featured .thread-title { font-size: 21px; }

/* ------------------------------------------------------------
   5. BADGES
   ------------------------------------------------------------ */
.thread-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 3px 9px;
  border-radius: 999px;
}

.thread-badge .icon { width: 1em; height: 1em; }

.thread-badge--pin {
  background: rgba(234, 184, 163, 0.35);
  color: var(--color-terracota-deep);
}

.thread-badge--unanswered {
  background: rgba(176, 91, 58, 0.14);
  color: var(--color-accent-dark);
}

.thread-badge--solved {
  background: rgba(130, 150, 107, 0.20);
  color: #4f6338;
}

/* ------------------------------------------------------------
   6. LISTA DE HILOS
   ------------------------------------------------------------ */
.foro-thread-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.thread-card {
  display: flex;
  gap: 16px;
  background: rgba(255, 252, 249, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card-flat);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thread-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(120, 100, 88, 0.12);
}

.thread-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(140deg, #EFE3DA, #DCC9BA);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Avatar con iniciales + color determinístico por autor (--avatar-hue) */
.thread-avatar--initials {
  background: hsl(var(--avatar-hue, 25) 45% 82%);
  color: #4A3F35;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.thread-main { flex: 1; min-width: 0; }

.thread-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.thread-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--color-accent-dark);
  background: rgba(234, 184, 163, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
}

.thread-time {
  font-size: 11.5px;
  color: var(--color-muted-warm);
  margin-left: auto;
}

.thread-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

/* El título es un enlace real (no un div con role="link"): así el
   rastreador ve un <a href> y el usuario puede abrir en pestaña nueva.
   Se ve como texto hasta que lo tocás. */
.thread-title__link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.thread-title__link:hover,
.thread-title__link:focus-visible {
  color: var(--color-cta-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thread-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.thread-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.thread-author { font-size: 12.5px; color: var(--color-text-muted); }
.thread-author strong { color: var(--color-text); }

/* flex-wrap: con la acción de reporte son 4 píldoras; a 320px no entran
   en una línea y sin wrap desbordaban la tarjeta. */
.thread-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.thread-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(74, 63, 53, 0.1);
  border-radius: 999px;
  padding: 6px 13px;
}

.thread-action .icon { width: 1em; height: 1em; }

.thread-action--static { cursor: default; }

/* ------------------------------------------------------------
   7. SIDEBAR DEL FORO
   ------------------------------------------------------------ */
.foro-side__copy {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.foro-side .cta-button { width: 100%; justify-content: center; }

.foro-cat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.foro-cat-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.foro-cat-list button:hover {
  background: rgba(234, 184, 163, 0.18);
  color: var(--color-terracota-deep);
}

.foro-cat-list button.is-active {
  background: rgba(234, 184, 163, 0.28);
  color: var(--color-terracota-deep);
}

.foro-cat-list .foro-cat-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-muted-warm);
}

.foro-rules {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.foro-rules li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.foro-rules li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-botanical);
}

/* ------------------------------------------------------------
   8. UTILIDADES
   ------------------------------------------------------------ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   9. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1023px) {
  .foro-layout { grid-template-columns: 1fr; gap: 28px; }
  .foro-side { position: static; }
  .foro-search { max-width: none; }
  .foro-hero { padding: 92px 18px 8px; }
  .foro-hero__banner { border-radius: 18px; }
}

@media (max-width: 600px) {
  .thread-card { padding: 16px; gap: 12px; }
  .thread-avatar { width: 40px; height: 40px; font-size: 14px; }
  .thread-title { font-size: 16.5px; }
  .thread-time { margin-left: 0; }
}

/* ------------------------------------------------------------
   8. DETALLE DEL HILO (hilo.html)
   ------------------------------------------------------------ */
.hilo-section { padding: var(--space-2xl) var(--space-md) var(--space-4xl); }

.hilo-layout {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hilo-breadcrumb { margin: 0; font-size: var(--text-sm); }
.hilo-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent-dark);
  font-weight: 700;
  text-decoration: none;
}
.hilo-breadcrumb a:hover { text-decoration: underline; }

.hilo-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-flat);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hilo-titulo {
  font-family: var(--font-title);
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin: 0;
}

.hilo-autor {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hilo-cuerpo {
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--color-text);
}

.hilo-cuerpo, .hilo-respuesta__cuerpo { overflow-wrap: anywhere; }

.hilo-respuestas { display: flex; flex-direction: column; gap: var(--space-md); }

.hilo-respuestas__title {
  font-family: var(--font-title);
  font-size: var(--text-lg);
  color: var(--color-text);
  margin: 0;
}

.hilo-respuesta {
  display: flex;
  gap: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: var(--space-lg);
}

.hilo-respuesta__main { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.hilo-respuesta__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.hilo-respuesta__cuerpo {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
}

.hilo-responder { max-width: 820px; margin: 0 auto; }

.hilo-loading, .admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: var(--space-2xl);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Acciones como botón (likes) */
button.thread-action {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease;
}
button.thread-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
button.thread-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* La tarjeta del foro ahora es clicable */
.thread-card[data-id] { cursor: pointer; }
.thread-card[data-id]:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------
   9. FORMULARIOS EXTRA (select + captcha)
   ------------------------------------------------------------ */
.form-group select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--bg-card);
  border: 1px solid var(--color-line-warm);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft-sunken);
  -webkit-appearance: none;
  appearance: none;
}
.form-group select:focus { outline: none; box-shadow: var(--focus-ring); }

.turnstile-box { margin: var(--space-sm) 0; }

@media (max-width: 520px) {
  .hilo-card, .hilo-respuesta { padding: var(--space-lg); }
  .hilo-titulo { font-size: var(--text-xl); }
}

/* ------------------------------------------------------------
   10. PANEL DE MODERACIÓN (js/mod-panel.js)
   Solo se monta en el DOM si la sesión tiene rol de staff.
   ------------------------------------------------------------ */
.mod-panel {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}
.mod-panel.open { display: block; }

.mod-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 63, 53, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: modFade 0.22s ease;
}

.mod-panel__sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  box-shadow: -18px 0 48px rgba(74, 63, 53, 0.22);
  animation: modSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modSlide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

body.mod-panel-open { overflow: hidden; }

.mod-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--color-line-warm);
}
.mod-panel__head h2 {
  font-family: var(--font-title);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin: 0;
}
.mod-panel__sub {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.mod-panel__headactions { display: flex; gap: 6px; }

.mod-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-line-warm);
  background: var(--bg-main);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.mod-icon-btn:hover { border-color: var(--color-cta); color: var(--color-accent-dark); }
.mod-icon-btn .icon { width: 16px; height: 16px; }

.mod-panel__tools {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-line-warm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mod-panel__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  border: 1px solid var(--color-line-warm);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  box-shadow: var(--shadow-soft-sunken);
}
.mod-panel__search .icon { width: 16px; height: 16px; color: var(--color-text-muted); flex: none; }
.mod-panel__search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  min-width: 0;
}

.mod-panel__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-panel__chips .chip-filter { font-size: var(--text-xs); padding: 6px 12px; }

.mod-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mod-panel__foot {
  padding: var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--color-line-warm);
}
.mod-panel__foot p {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.mod-item {
  border: 1px solid var(--color-line-warm);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  padding: var(--space-md);
}
.mod-item.is-hidden { border-style: dashed; opacity: 0.82; }

.mod-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}
.mod-item__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}
.mod-item__flags { display: flex; gap: 4px; flex: none; flex-wrap: wrap; }
.mod-item__meta {
  margin: 6px 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.mod-item__excerpt {
  margin: 8px 0 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  opacity: 0.85;
  line-height: 1.45;
}
.mod-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-sm);
}

.mod-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  background: var(--bg-card);
  border: 1px solid var(--color-line-warm);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.mod-btn:hover { border-color: var(--color-cta); color: var(--color-accent-dark); transform: translateY(-1px); }
.mod-btn .icon { width: 13px; height: 13px; }
.mod-btn--sm { padding: 4px 10px; }

.mod-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--color-line-warm);
  color: var(--color-text-muted);
}
.mod-tag--ok { color: #3f7d4f; border-color: #bcd9c3; background: #eef7f0; }
.mod-tag--warn { color: #8a6420; border-color: #e5d3ab; background: #fbf5e7; }
.mod-tag--bad { color: #9c3b2c; border-color: #e8c2b8; background: #fbeeea; }

.mod-empty {
  margin: var(--space-lg) 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Respuestas: contenedor de acciones + estado oculto */
.hilo-respuesta__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.hilo-respuesta.is-hidden { opacity: 0.6; }
.hilo-respuesta.is-hidden .hilo-respuesta__cuerpo { text-decoration: line-through; }

@media (max-width: 520px) {
  .mod-panel__sheet { width: 100%; }
  .mod-panel__head, .mod-panel__tools, .mod-panel__body, .mod-panel__foot {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

/* ============================================================
   Movimiento reducido
   Mismo criterio que en styles.css y glossary.css: si el usuario
   pidió menos movimiento, apagamos las transiciones y animaciones
   propias del foro (hover de tarjetas, panel de moderación, etc.).
   Va al final para ganar en el orden de cascada sin !important.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .foro-search,
  .thread-card,
  .foro-cat-list button,
  button.thread-action,
  .mod-panel__overlay,
  .mod-panel__sheet,
  .mod-icon-btn,
  .mod-btn {
    transition: none;
    animation: none;
  }

  .thread-card:hover,
  button.thread-action:hover,
  .mod-btn:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------
   12. REPORTE DE CONTENIDO Y PERFIL PÚBLICO (Etapa 5)
   ------------------------------------------------------------ */

/* Botón de reporte: mismo look que las demás acciones, solo ícono. */
.thread-action--report { padding: 6px 10px; }
.thread-action--report:hover { color: var(--color-accent-terracota); }

/* El modal de reporte reutiliza el look del modal de acceso; solo
   hace falta estilar el <select>, que el modal de acceso no tenía. */
.report-modal select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  background: var(--bg-card);
  border: 1px solid rgba(74, 63, 53, 0.15);
  border-radius: 12px;
  padding: 11px 13px;
}
.report-modal select:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Perfil público (/perfil/<usuario>). Gated por D6: no se expone hasta
   que la privacidad esté publicada (D12). */
.profile-section { padding: 96px 20px 72px; }
.profile-layout { max-width: 900px; margin: 0 auto; }
.profile-head {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 18px 0 28px;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: var(--shadow-soft);
}
.profile-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  background: rgba(234, 184, 163, 0.35);
}
.profile-name {
  font-family: var(--font-title);
  font-size: 30px;
  margin: 0 0 6px;
  color: var(--color-text);
}
.profile-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-venture {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin: 0 0 8px;
}
.profile-venture .icon { width: 1em; height: 1em; }

.profile-bio {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0;
  max-width: 60ch;
}

@media (max-width: 640px) {
  .profile-head { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }
}

/* ------------------------------------------------------------
   13. AVATARES REALES, INSIGNIAS Y TOP COLABORADORES (Etapa 5)
   ------------------------------------------------------------ */

/* Avatar con imagen real: mismo círculo que las iniciales. */
img.thread-avatar {
  object-fit: cover;
  display: block;
}

/* Insignias de reputación (perfil). */
.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-dark);
  background: rgba(234, 184, 163, 0.22);
  border: 1px solid rgba(234, 184, 163, 0.5);
  border-radius: 999px;
  padding: 4px 11px;
}
.badge .icon { width: 1em; height: 1em; }

/* Top colaboradores del mes (sidebar del foro). */
.foro-top__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foro-top__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.foro-top__item .thread-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.foro-top__rank {
  width: 16px;
  text-align: center;
  font-weight: 800;
  color: var(--color-text-muted);
}
.foro-top__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}
.foro-top__score {
  font-weight: 800;
  color: var(--color-accent-dark);
}
.foro-top__empty {
  font-size: 13px;
  color: var(--color-text-muted);
}

.foro-rules__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.foro-rules__link:hover { border-bottom-color: var(--color-accent-dark); }

/* Like activo (feedback optimista): corazón lleno. */
.thread-action.is-liked { color: var(--color-accent-terracota); }
.thread-action.is-liked svg { fill: currentColor; }
.thread-action:disabled { opacity: 0.7; cursor: progress; }
