/* =========================================================================
 * hub.css — Portada del repositorio de aprendizaje.
 * Misma estética que las secciones: fondo pastel, tarjetas blancas.
 * ========================================================================= */

.hub { max-width: 1080px; margin: 0 auto; padding: 40px 20px 60px; }

.hub-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.hub-logo {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(140deg, #6366f1, #8b5cf6);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(99, 102, 241, .35);
}
.hub-logo svg { width: 28px; height: 28px; }
.hub-brand-name { text-align: left; }
.hub-brand-name h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); letter-spacing: -.5px; }
.hub-brand-name p {
  margin: 2px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  color: #64748b; text-transform: uppercase;
}

.hub-sub {
  text-align: center; max-width: 94ch; margin: 8px auto 34px;
  color: #475569; font-size: 14.5px; line-height: 1.7;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.hub-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(140deg, rgba(233, 250, 239, .9), rgba(255, 255, 255, .92) 45%, rgba(252, 238, 243, .85));
  border-radius: 22px; padding: 22px 22px 18px;
  box-shadow: 0 12px 32px rgba(30, 41, 59, .09);
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(30, 41, 59, .14); }
.hub-card:hover .hub-go { background: var(--hc, #6366f1); color: #fff; }

.hub-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, var(--hc, #6366f1) 13%, white);
  color: var(--hc, #6366f1);
  display: flex; align-items: center; justify-content: center;
}
.hub-icon svg { width: 24px; height: 24px; }

.hub-card h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.hub-card p { margin: 0; font-size: 12.5px; line-height: 1.55; color: #475569; flex: 1; }

.hub-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.hub-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--hc, #6366f1);
  background: #fff; border: 1.5px solid color-mix(in srgb, var(--hc, #6366f1) 28%, white);
  border-radius: 999px; padding: 4px 11px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, .05);
}
.hub-go {
  width: 34px; height: 34px; border-radius: 11px;
  background: #fff; color: var(--hc, #6366f1);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(30, 41, 59, .08);
  transition: background .18s, color .18s;
}
.hub-go svg { width: 16px; height: 16px; }

.hub-card-admin { border: 1.5px dashed color-mix(in srgb, var(--hc) 45%, white); }
.hub-card-soon { opacity: .55; pointer-events: none; }
.hub-soon-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 9px; font-weight: 700; letter-spacing: 1.6px; color: #94a3b8;
  background: #fff; border-radius: 999px; padding: 4px 10px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, .06);
}

.hub-footer { margin-top: 40px; text-align: center; font-size: 11px; color: #94a3b8; letter-spacing: 1px; }
.hub-footer a { color: inherit; text-decoration: none; }
.hub-footer a:hover { color: #64748b; text-decoration: underline; }

/* ============================ animación de entrada ====================== */
@keyframes hub-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hub-brand, .hub-sub, .hub-grid > *, .hub-footer {
  animation: hub-in 1.1s cubic-bezier(.16, 1, .3, 1) both;
}
.hub-brand { animation-delay: .1s; }
.hub-sub   { animation-delay: .28s; }
.hub-grid > *:nth-child(1) { animation-delay: .46s; }
.hub-grid > *:nth-child(2) { animation-delay: .58s; }
.hub-grid > *:nth-child(3) { animation-delay: .70s; }
.hub-grid > *:nth-child(4) { animation-delay: .82s; }
.hub-grid > *:nth-child(5) { animation-delay: .94s; }
.hub-grid > *:nth-child(6) { animation-delay: 1.06s; }
.hub-grid > *:nth-child(n+7) { animation-delay: 1.18s; }
.hub-footer { animation-delay: 1.4s; }

@media (prefers-reduced-motion: reduce) {
  .hub-brand, .hub-sub, .hub-grid > *, .hub-footer {
    opacity: 1; animation: none;
  }
}
