/* =========================
   RESET BÁSICO
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  background: #f5f6fa;
  color: #222;
}

/* =========================
   NAVEGACIÓN (MEJORADA)
========================= */
.top-nav {
  background: #20232a;
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.top-nav h1 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.top-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.top-nav nav a {
  color: #61dafb;
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px; /* botones tipo pill */
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.top-nav nav a:hover {
  background: rgba(97, 218, 251, 0.15);
  border-color: #61dafb;
  text-decoration: none;
  transform: translateY(-1px);
}

.top-nav nav a:active {
  transform: translateY(0);
}

/* =========================
   INTRO
========================= */
.intro {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* =========================
   SECCIONES
========================= */
.section {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.section h2 {
  margin-bottom: 1.5rem;
}

/* =========================
   GRID DE CASILLAS
========================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* =========================
   TARJETAS
========================= */
.card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  flex-grow: 1;
  margin-bottom: 0.75rem;
}

.card a {
  text-align: center;
  background: #61dafb;
  color: #000;
  padding: 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.card a:hover {
  background: #4fc3e8;
}

/* =========================
   TARJETAS VACÍAS
========================= */
.card.empty {
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #eef0f5;
  color: #555;
}

/* =========================
   CUADRO DE CONCLUSIÓN
========================= */
#conclusion .card {
  background: #ffffff;
  border-left: 6px solid #61dafb;
  padding: 1.5rem;
}

#conclusion h2 {
  margin-bottom: 1rem;
}

#conclusion p {
  margin-bottom: 1rem;
}

#conclusion ul {
  list-style: none;            /* ✅ quita el punto negro por defecto */
  margin: 1rem 0 1.25rem 0;     /* mejor alineado con el texto */
  padding-left: 0;
}


#conclusion li {
  margin-bottom: 0.5rem;
}


/* =========================
   FOOTER
========================= */
.footer {
  background: #20232a;
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 4rem;
  font-size: 0.95rem;
}

.footer p {
  opacity: 0.85;
}
/* =========================
   MANUALES PROPIOS
========================= */

/* Diferenciamos visualmente el bloque */
#manuales {
  background: #eef6fb;
  padding: 3rem 1rem;
  margin-top: 4rem;
  border-top: 2px solid #61dafb;
}

/* Ajuste del contenedor interno */
#manuales .section {
  margin: 0 auto;
}

/* Tarjetas de manuales */
#manuales .card {
  border: 2px solid #61dafb;
  background: #ffffff;
}

/* Título del manual */
#manuales .card h3 {
  color: #20232a;
  font-size: 1.1rem;
}

/* Texto más didáctico */
#manuales .card p {
  font-size: 0.95rem;
}

/* Botón especial para manuales */
#manuales .card a {
  background: #20232a;
  color: #ffffff;
}

#manuales .card a:hover {
  background: #000000;
}

/* Etiqueta "Manual propio" */
.manual-badge {
  align-self: flex-start;
  background: #61dafb;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

#manuales-js {
  background: #eef6fb;
  padding: 3rem 1rem;
  margin-top: 4rem;
  border-top: 2px solid #61dafb;
}

#manuales-js .section {
  margin: 0 auto;
}

#manuales-js .card {
  border: 2px solid #61dafb;
}

#manuales-js .card a {
  background: #20232a;
  color: #fff;
}

#manuales-js .card a:hover {
  background: #000;
}
/* =========================
   MEJORAS PRO (PEGAR AL FINAL)
========================= */

html {
  scroll-behavior: smooth;
}

/* Para que al hacer click en anclas no quede tapado por la nav */
.section {
  scroll-margin-top: 120px;
}

/* Navegación centrada y botones */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.top-nav h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
}

.top-nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.top-nav nav a {
  margin-right: 0;              /* quitamos el margin anterior */
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(97, 218, 251, 0.12);
  border: 1px solid rgba(97, 218, 251, 0.35);
  color: #61dafb;
  transition: transform 0.08s ease, background 0.15s ease, border 0.15s ease;
}

.top-nav nav a:hover {
  text-decoration: none;
  background: rgba(97, 218, 251, 0.22);
  border-color: rgba(97, 218, 251, 0.55);
  transform: translateY(-1px);
}

.top-nav nav a:focus-visible {
  outline: 3px solid rgba(97, 218, 251, 0.55);
  outline-offset: 3px;
}

/* Textos de apoyo */
.section-lead {
  max-width: 900px;
  margin: 0 0 1.25rem 0;
  color: #333;
}

/* Subtítulos dentro de una sección */
.section-subtitle {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.05rem;
  color: #222;
}

/* Badges */
.manual-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(32, 35, 42, 0.08);
  color: #20232a;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(32, 35, 42, 0.14);
}

/* Botón secundario para repos */
.btn-secondary {
  margin-top: 0.55rem;
  background: #20232a !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background: #15171c !important;
}

/* Checklist sin punto negro por defecto */
ul.checklist {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.25rem;
}

ul.checklist li {
  margin-bottom: 0.55rem;
}

/* Imágenes: altura consistente y buen recorte */
.card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Responsive: un pelín más compacto */
@media (max-width: 520px) {
  .top-nav h1 {
    font-size: 1.1rem;
    text-align: center;
  }
  .top-nav nav a {
    padding: 0.4rem 0.7rem;
    font-size: 0.95rem;
  }
}
