/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: #333;
  margin: 0;
  padding-top: 0px; /* espacio para el header fijo */
  min-height: 100vh;
  line-height: 1.1;
}

/* Header normal (se mueve con el scroll) */
header {
  position: relative;
  height: 60px;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

header h1 {
  font-size: 20px;
  line-height: 60px;
  margin: 0;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 15px;
  font-weight: bold;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: #030300; /* dorado cine */
}

/* Contenedor principal */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.layout {
  display: flex;
  gap: 20px;
}

/* Contenido central */
main.content {
  flex: 1;
  margin: 0;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.8s ease;
}

/* Animación general */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contenedores principales */
.contenedor {
  background: #eaeaea;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Contenedores internos */
.contenedor-interno {
  background: #ccc;
  padding: 15px;
  border-radius: 4px;
  font-size: 20px;
  font-weight: normal;
  text-align: left;
}

/* ===========================
   ÍNDICE DE TAXONOMÍA (AÑOS)
   =========================== */
.taxonomy__index {
  list-style: none;
  padding-left: 0;
  column-count: 3;
  column-gap: 24px;
}

.taxonomy__index li {
  margin: 0 0 8px;
  break-inside: avoid;
}

.taxonomy__index a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-decoration: none;
  color: #333;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ddd;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.taxonomy__index a:hover {
  background: #333;
  color: #fff;
  transform: translateX(4px);
}

.taxonomy__index strong {
  font-weight: 700;
  font-size: 16px;
}

.taxonomy__count {
  color: #666;
  font-size: 0.9em;
  background: #f2f2f2;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Responsive para el índice */
@media (max-width: 900px) {
  .taxonomy__index { column-count: 2; }
}
@media (max-width: 600px) {
  .taxonomy__index { column-count: 1; }
}

/* Posts por año */
.posts-por-anio {
  margin-top: 30px;
  animation: fadeIn 0.8s ease;
}

.posts-por-anio h4 {
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: bold;
  padding-left: 10px;
  border-left: 4px solid #333; /* barra cine */
  color: #222;
}

/* Grid de tarjetas pequeñas */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 20px; /* espacio al final del bloque de tarjetas */
}

.post-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.6s ease;
}

.post-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.post-card a {
  text-decoration: none;
  color: #333;
  display: block;
}

.post-card h5 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.post-card .date {
  font-size: 12px;
  color: #777;
  margin-bottom: 8px;
  display: block;
}

.post-card .excerpt {
  font-size: 14px;
  color: #555;
  margin: 0;
}

/* Responsive para las tarjetas */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* Footer */
footer {
  text-align: center;
  padding: 10px;
  background: #f4f4f4;
  border-top: 1px solid #ddd;
}

/* ===== SOLO EFECTOS (sin cambiar tamaños/espaciados) ===== */

/* Focus visible (teclado) en enlaces clave */
header nav a:focus-visible,
.taxonomy__index a:focus-visible,
.post-card a:focus-visible {
  outline: 2px solid #333;
  outline-offset: 4px;
  border-radius: 6px;
}

/* Hover del header con mejor contraste (sin cambiar layout) */
header nav a {
  transition: color .25s ease;
}
header nav a:hover {
  color: #eaeaea; /* mejor contraste que #030300 sobre #333 */
}

/* Suaviza*
