.categories{
    position: relative;
    min-height: 40vh;
    background-image: url("../img/bg/202.webp;");
    background-position: center;
    background-size: cover;
}
.ndm-archive-list{
    display: flex;
    flex-wrap: wrap;
}
.categories .seccion_container{text-align: center;color: var(--paper);position: relative;z-index: 4;padding: 1em 0;}
.categories_body h2{width: 100%;}
.ndm-card__thumb{
    width:100%;
    aspect-ratio: 16/9;
    overflow:hidden;
    display:block;
  position:relative;
}
.ndm-card__thumb img{
    width:100%;
    height:100%;
    object-fit: cover;
    display:block;
  position:static; /* o elimina absolute */
}

/* RESPONSIVE */
@media (max-width:959px){
    .categories{
        min-height: 20vh;
    }
}

@media (min-width:960px){
    .categories{
        min-height: 40vh;
    }
    .categories_body{
        padding: 2em 2% 3em 13%;
        display: flex;
    }
    .categories_body .entry_sidebar{padding-top: 4em;}
    .ndm-archive-list{
        width: 100%;
    }
    .ndm-card{width: 48%;}
}
/* ===== Archive wrapper (nuevo) ===== */
.ndm-archive__title{
  width: 100%;
  margin: 0 0 18px;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ===== Listado: mejor que flex para cards ===== */
.ndm-archive-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

/* Desktop: 2 columnas */
@media (min-width:960px){
  .ndm-archive-list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Card pro ===== */
.ndm-card{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(2, 6, 23, .08);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ndm-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(2, 6, 23, .14);
  border-color: rgba(15, 23, 42, .14);
}

/* Thumb ya lo tienes bien; sumo zoom suave */
.ndm-card__thumb{
  width:100%;
  aspect-ratio: 16/9;
  overflow:hidden;
  display:block;
}
.ndm-card__thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1.01);
  transition: transform .35s ease;
}
.ndm-card:hover .ndm-card__thumb img{
  transform: scale(1.06);
}

/* Body */
.ndm-card__body{
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Meta: fecha + categoría como chip */
.ndm-card__meta{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ndm-card__date{
  font-size: .85rem;
  opacity: .75;
}

.ndm-card__cat{
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: rgba(15, 23, 42, .9);
  border: 1px solid rgba(15, 23, 42, .08);
  transition: transform .2s ease, background .2s ease;
}
.ndm-card__cat:hover{
  transform: translateY(-1px);
  background: rgba(15, 23, 42, .09);
}

/* Título */
.ndm-card__title{
  margin: 0;
  line-height: 1.15;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.ndm-card__title a{
  color: inherit;
  text-decoration: none;
}
.ndm-card__title a:hover{
  text-decoration: underline;
}

/* Extracto: 3 líneas y listo */
.ndm-card__excerpt{
  margin: 0;
  opacity: .86;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Botón pro */
.ndm-card__btn{
  margin-top: 6px;
  align-self: flex-start;
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .14);
  background: rgba(255,255,255,.7);
  color: rgba(15, 23, 42, .95);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.ndm-card__btn:hover{
  transform: translateY(-1px);
  background: rgba(15, 23, 42, .06);
  border-color: rgba(15, 23, 42, .22);
}

/* ===== Ajustes de tu layout en desktop ===== */
@media (min-width:960px){
  .ndm-archive{ width: 68%; } /* lo mantengo por tu layout con sidebar */
  /* OJO: ya no necesitas .ndm-card{width:48%;} porque grid controla columnas */
  .ndm-card{ width: auto; }
  .ndm-archive .archive_section_title{font-size: 200%;color: var(--brand-dark);}
}

.archive_section_title{
  position: relative;
  padding-left: 18px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 800;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  display: inline-block;
}

/* Línea vertical */
.archive_section_title::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  height: 1.2em;
  background: var(--brand-dark);
  border-radius: 4px;
}
.archive_section_title::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  height: 1.2em;
  background: linear-gradient(
    to bottom,
    var(--brand-dark),
    var(--brand-dark)
  );
  border-radius: 4px;
}
