/* ==========================================================================
   ARCHIVE-ACTIVIDAD.CSS — Cards de actividad + Timeline de noticias
   Cargado en: archive-actividad + archive-noticia
   ========================================================================== */

/* --------------------------------------------------------------------------
   5b. ARCHIVE ACTIVIDAD — cards visuales con imagen
   -------------------------------------------------------------------------- */

body.post-type-archive-actividad .site-content {
  display: block;
}

/* Grid de tarjetas en la columna main (2 columnas) */
.act-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Tarjeta visual */
.act-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.act-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
}

/* Imagen */
.act-card__img-link {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.act-card__img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-black);
  position: relative;
}

.act-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease-out;
}

.act-card:hover .act-card__img-wrap img {
  transform: scale(1.05);
}

/* Fallback — fondo oscuro diferenciado por tipo + icono centrado */
.act-card__img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.18);
}

.act-card__img-wrap--exposiciones-individuales        { background: #1a1228; }
.act-card__img-wrap--exposiciones-colectivas          { background: #1a1228; }
.act-card__img-wrap--conferencias-seminarios-jornadas { background: #0d1b2a; }
.act-card__img-wrap--mesas-redondas-coloquios-debates { background: #1a140a; }
/* legacy slugs */
.act-card__img-wrap--exposicion  { background: #1a1228; }
.act-card__img-wrap--congreso    { background: #0d1b2a; }
.act-card__img-wrap--taller      { background: #0f1f12; }
.act-card__img-wrap--divulgacion { background: #1f1208; }
.act-card__img-wrap--otro        { background: var(--color-dark-border); }

/* Cuerpo de la tarjeta */
.act-card__body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.act-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.act-card__fecha {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-gray);
}

.act-card__titulo {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
  margin: 0.15rem 0 0;
}

.act-card__titulo a {
  color: var(--color-black);
  text-decoration: none;
  transition: color var(--transition-base);
}

.act-card__titulo a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.act-card__lugar {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-gray);
  margin: 0;
}

.act-card__lineas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.375rem;
}

/* Responsive */
@media (max-width: 900px) {
  .act-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .act-card-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .act-card__titulo {
    font-size: var(--text-sm);
  }
}

/* --------------------------------------------------------------------------
   6. TIMELINE (archive-noticia) — zigzag + separadores de año
   -------------------------------------------------------------------------- */

.not-timeline {
  padding-block: var(--space-lg) var(--space-3xl);
}

/* — Separador de año — */
/* Grid: [label — left half] [dot at 50%] [col vacía].
   ::before: línea amarilla a ancho completo (absoluta, detrás de todo).
   ::after: conector vertical desde el centro hasta el grupo. */
.not-year-sep {
  display: grid;
  grid-template-columns: calc(50% - 5px) 10px 1fr;
  align-items: center;
  gap: 0;
  margin: 56px 0 8px;
  position: relative;
}

/* Línea horizontal a ancho completo — detrás del label y del dot */
.not-year-sep::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--color-primary);
  z-index: 0;
}

/* Conector vertical: desde el centro del separador hasta el inicio del grupo */
.not-year-sep::after {
  content: "";
  position: absolute;
  left: calc(50% - 1px);
  top: 50%;
  height: calc(50% + 8px);
  width: 2px;
  background: var(--color-primary);
  z-index: 1;
}

.not-year-sep:first-child {
  margin-top: 0;
}

/* El label cubre solo el área del texto (no toda la columna) para que
   la línea amarilla sea visible entre el texto y el punto. */
.not-year-sep__label {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  white-space: nowrap;
  padding-right: 16px;
  position: relative;
  z-index: 2;
  background: var(--color-cream);
  width: fit-content;
}

.not-year-sep__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  position: relative;
  z-index: 3;
}

/* La línea derecha ya la cubre el ::before — este elemento queda vacío */
.not-year-sep__line {
  display: none;
}

/* — Grupo de noticias por año — */
.not-year-group {
  position: relative;
  padding: 32px 0 16px;
}

/* Línea vertical central.
   bottom negativo: extiende la línea más allá del grupo hasta el borde amarillo del footer.
   Valor medido empíricamente; estable porque el layout del footer es fijo. */
.not-year-group::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -290px;
  width: 2px;
  background: var(--color-primary);
  transform: translateX(-1px);
}

/* — Cada noticia — */
.not-tl-item {
  position: relative;
  width: calc(50% - 32px);
  margin-bottom: 48px;
}

.not-tl-item:nth-child(odd) {
  margin-left: 0;
}
.not-tl-item:nth-child(even) {
  margin-left: auto;
}

/* Dot en la línea */
.not-tl-item::before {
  content: "";
  position: absolute;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-cream);
  z-index: 2;
}

.not-tl-item:nth-child(odd)::before {
  right: -39px;
}
.not-tl-item:nth-child(even)::before {
  left: -39px;
}

/* Conector horizontal */
.not-tl-item::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 24px;
  height: 2px;
  background: var(--color-gray-light);
}

.not-tl-item:nth-child(odd)::after {
  right: -25px;
}
.not-tl-item:nth-child(even)::after {
  left: -25px;
}

/* — Mobile (≤700px) — */
@media (max-width: 700px) {
  .not-year-group {
    padding-left: 48px;
    padding-right: 0;
  }

  .not-year-group::before {
    left: 24px;
    transform: none;
  }

  .not-tl-item,
  .not-tl-item:nth-child(odd),
  .not-tl-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
  }

  .not-tl-item::before,
  .not-tl-item:nth-child(odd)::before,
  .not-tl-item:nth-child(even)::before {
    left: -31px;
    right: auto;
  }

  .not-tl-item::after,
  .not-tl-item:nth-child(odd)::after,
  .not-tl-item:nth-child(even)::after {
    left: -17px;
    right: auto;
    width: 16px;
  }
}

