/* ─────────────────────────────────────────────────────────
   Comunidad — work.thenucleo.com/comunidad
   Hereda design tokens, nav y footer de la landing principal.
   ───────────────────────────────────────────────────────── */

/* ── FONTS ──────────────────────────────────────────────── */
@font-face { font-family: 'NewBlack'; src: url('/fonts/NewBlackTypeface-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'NewBlack'; src: url('/fonts/NewBlackTypeface-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'NewBlack'; src: url('/fonts/NewBlackTypeface-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:           #171717;
  --bg-card:      rgba(30,30,30,.85);
  --card-solid:   #1e1e1e;
  --border:       #2a2a2a;
  --border-hover: #3a3a3a;
  --text:         #E8EAE9;
  --text-bright:  #ffffff;
  --muted:        #8a8a8a;
  --subtle:       #c8c8c8;
  --accent:       #C7B299;
  --accent-dim:   rgba(199,178,153,.12);
  --accent-glow:  rgba(199,178,153,.25);
  --yellow:       #F3F959;
  --yellow-dim:   rgba(243,249,89,.10);
  --yellow-glow:  rgba(243,249,89,.25);
  --yellow-mid:   rgba(243,249,89,.50);
  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,.12);
  --red:          #ef4444;
  --orange:       #f59e0b;
  --mono:         'NewBlack', monospace;
  --sans:         'NewBlack', sans-serif;
  --display:      'NewBlack', sans-serif;
}

/* ── RESET / BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ── NAV (idéntico a la landing) ────────────────────────── */
nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 48px); max-width: 1120px;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 16px;
  background: rgba(23,23,23,.28);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04) inset;
  transition: background .4s, border-color .4s, box-shadow .4s, top .4s cubic-bezier(.16,1,.3,1), padding .3s;
}
nav.scrolled {
  top: 12px;
  background: rgba(23,23,23,.50);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05) inset;
  padding: 12px 28px;
}
.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-isotipo { height: 34px; width: 34px; }
.nav-logotipo { height: 22px; width: auto; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px; color: var(--subtle);
  font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--text-bright); }
.nav-links a.active { color: var(--yellow); position: relative; }
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--yellow);
  opacity: .5;
  border-radius: 1px;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-sm {
  background: var(--yellow); color: var(--bg);
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 9px 20px; border-radius: 8px; border: none;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.btn-sm:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--yellow-glow); }
.btn-sm-ghost {
  background: transparent;
  color: var(--text);
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-sm-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.nav-user {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-right: 4px;
  display: none;
}

/* ── PAGE LAYOUT ────────────────────────────────────────── */
.page {
  max-width: 1024px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}
.page-narrow { max-width: 760px; }

.crumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  display: inline-block;
  margin-bottom: 18px;
}
.crumb:hover { color: var(--yellow); }

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.section-label::before { content: ''; width: 20px; height: 1px; background: var(--yellow); }

h1.page-title {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
h1.page-title em { font-style: normal; color: var(--yellow); text-shadow: 0 0 40px rgba(243,249,89,.12); }
.page-sub {
  color: var(--subtle);
  font-size: 16px;
  line-height: 1.55;
  max-width: 680px;
  margin-bottom: 40px;
}

h2.section-h2 {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  color: var(--text-bright);
  margin: 56px 0 18px;
  letter-spacing: -0.005em;
}
h3.section-h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 24px 0 8px;
}

p { color: var(--text); line-height: 1.65; font-size: 15px; }
p + p { margin-top: 0.75em; }
.muted { color: var(--muted); font-size: 13px; }

/* ── FILTERS ────────────────────────────────────────────── */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.filters button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.filters button:hover { border-color: var(--border-hover); color: var(--text); }
.filters button.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--bg);
  font-weight: 600;
}

/* ── CARD (propuesta) ───────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  transition: border-color .25s, transform .25s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  opacity: .6;
}
.card:hover { border-color: var(--border-hover); }

.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag-yellow { color: var(--yellow); border-color: rgba(243,249,89,.25); background: var(--yellow-dim); }
.tag-accent { color: var(--accent); border-color: rgba(199,178,153,.25); background: var(--accent-dim); }
.tag-green  { color: var(--green); border-color: rgba(34,197,94,.25); background: var(--green-dim); }
.tag-mute   { color: var(--muted); }

.meta-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}

.card-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 12px 0 8px;
  line-height: 1.25;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--yellow); }
.card-body {
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.6;
}

.card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: 14px;
}

/* ── VOTE BUTTON ────────────────────────────────────────── */
.vote-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.vote-btn .arrow { font-size: 12px; }
.vote-btn:hover { border-color: var(--yellow-mid); color: var(--yellow); }
.vote-btn.voted {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
}
.vote-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── PROGRESS BAR (pool) ────────────────────────────────── */
.progress {
  height: 4px; width: 100%;
  background: rgba(255,255,255,.05);
  border-radius: 100px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--yellow));
  transition: width .4s cubic-bezier(.16,1,.3,1);
}
.pool-summary {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.pool-summary strong { color: var(--text-bright); font-weight: 600; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--yellow); color: var(--bg);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 11px 22px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--yellow-glow); }
.btn:disabled {
  background: rgba(243,249,89,.18);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* ── FORMS ──────────────────────────────────────────────── */
label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
}
input, textarea, select {
  width: 100%;
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: border-color .2s, background .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--yellow);
  background: rgba(30,30,30,1);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; cursor: pointer; }

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  font-family: var(--sans);
}
.alert-info    { background: var(--yellow-dim); border-color: rgba(243,249,89,.25); color: var(--yellow); }
.alert-success { background: var(--green-dim); border-color: rgba(34,197,94,.3); color: #86efac; }
.alert-error   { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3); color: #fca5a5; }

.empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.015);
}
.empty p + p { margin-top: 14px; }

/* ── COMMENTS ───────────────────────────────────────────── */
.comment {
  border-left: 2px solid var(--border);
  padding: 8px 0 8px 16px;
  margin: 14px 0;
}
.comment-author {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .04em;
}
.comment-body { color: var(--text); font-size: 14px; line-height: 1.6; }

/* ── ADMIN CARDS ────────────────────────────────────────── */
.admin-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 16px;
}
.admin-uid { font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; }

/* ── FOOTER (idéntico a la landing) ─────────────────────── */
footer {
  position: relative; z-index: 10;
  background: var(--bg);
  width: 100%;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.f-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 56px 48px 40px;
  max-width: 1200px; margin: 0 auto;
  gap: 48px;
}
.f-brand { display: flex; flex-direction: column; gap: 16px; max-width: 320px; }
.f-logotipo { height: 22px; width: auto; opacity: .85; }
.f-tagline { font-size: 14px; color: var(--subtle); line-height: 1.6; }
.f-social { display: flex; gap: 12px; margin-top: 4px; }
.f-social a {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s, background .3s, transform .3s;
}
.f-social a:hover {
  border-color: rgba(243,249,89,.3);
  background: var(--yellow-dim);
  transform: translateY(-2px);
}
.f-social a svg { width: 16px; height: 16px; fill: var(--muted); transition: fill .3s; }
.f-social a:hover svg { fill: var(--yellow); }
.f-cols { display: flex; gap: 64px; }
.f-col h3 {
  font-size: 11px; font-weight: 600; color: var(--yellow);
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 16px;
  font-family: var(--mono);
}
.f-col a {
  display: block; font-size: 13px; color: var(--muted);
  padding: 4px 0;
  transition: color .2s, padding-left .2s;
}
.f-col a:hover { color: var(--text-bright); padding-left: 4px; }
.f-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.04);
  gap: 12px;
  flex-wrap: wrap;
}
.f-copy { font-size: 12px; color: var(--muted); }
.f-mono {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.f-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--green);
  font-family: var(--mono);
}
.f-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  nav { width: calc(100% - 24px); padding: 12px 18px; top: 10px; border-radius: 14px; }
  nav.scrolled { padding: 10px 18px; top: 8px; }
  .page { padding: 100px 18px 60px; }
  .f-top { flex-direction: column; gap: 32px; padding: 40px 20px 32px; }
  .f-brand { max-width: 100%; }
  .f-cols { gap: 40px; flex-wrap: wrap; }
  .f-bottom { flex-direction: column; align-items: flex-start; padding: 16px 20px; gap: 10px; }
}
