/* --- Botones de filtro --- */
.npdf-container { margin: 18px 0; }
.npdf-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom: 14px; }
.npdf-buttons { display:flex; flex-wrap:wrap; gap:10px; }
.npdf-btn,
.npdf-reset,
.npdf-more {
  border: 1px solid #1c5048;
  background: #1c5048;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
/* Hover solicitado */
.npdf-btn:hover,
.npdf-reset:hover,
.npdf-more:hover{
  background:#9fcfc6 !important;
  color:#1c5048 !important;
  border-color:#9fcfc6 !important;
  filter:none !important;
}

/* Dropdown (móvil) */
.npdf-filter-select{
  display:none;
  border:1px solid #1c5048;
  background:#fff;
  color:#1c5048;
  border-radius:999px;
  padding:10px 16px;
  font-weight:600;
  line-height:1;
}

@media (max-width:600px){
  .npdf-buttons{display:none !important;}
  .npdf-filter-select{display:block !important; width:100%; max-width:420px;}
}

.npdf-btn.active { filter: brightness(0.82); }

.npdf-btn:focus-visible,
.npdf-reset:focus-visible,
.npdf-more:focus-visible {
  outline: 2px solid rgba(28, 80, 72, 0.35);
  outline-offset: 2px;
}
.npdf-more { margin-top: 18px; }
.npdf-container.npdf-loading .npdf-more { opacity: .7; cursor: default; }

/* --- Timeline --- */
.npdf-timeline { margin: 10px 0 18px; }
.npdf-timeline-labels { display:flex; justify-content:space-between; font-size:14px; }
.npdf-range-slider { width:100%; position:relative; height:40px; }

/* Línea base (gris) + selección por gradiente inyectado vía JS */
.npdf-range-slider::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top: 21px;
  height:6px;
  background:#d0d0d0;
  border-radius:999px;
}

.npdf-range-slider input[type=range]{
  appearance:auto;
  position:absolute;
  left:0; right:0;
  top: 15px;
  width:100%;
  pointer-events:none;
  height:18px;
  background: transparent;
  border-radius: 999px;
}
.npdf-range-slider input[type=range]::-webkit-slider-thumb{
  appearance:auto;
  pointer-events:auto;
  width:16px; height:16px;
  background: #1c5048;
  border: 2px solid #fff;
  border-radius: 50%;
}

.npdf-range-slider input[type=range]::-moz-range-thumb{
  pointer-events:auto;
  width:16px; height:16px;
  background: #1c5048;
  border: 2px solid #fff;
  border-radius: 50%;
}

/* Ocultamos la pista nativa para que no “pinte” fuera del rango seleccionado */
.npdf-range-slider input[type=range]::-webkit-slider-runnable-track{ background: transparent; }
.npdf-range-slider input[type=range]::-moz-range-track{ background: transparent; }

.npdf-timeline-years-box{ display:flex; justify-content:space-between; margin-top:10px; font-weight:700; }

/* --- Resultados (grid) --- */
.npdf-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-bottom: 25px;
}
.npdf-article{
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
  transition:.2s;
}
.npdf-thumb img{
  width:100%;
  height:153px;
  object-fit:cover;
  display:block;
}
.npdf-info{ padding:18px; }
.npdf-cat{
  font-size:12px;
  color:#1c5048;
  font-weight:700;
  margin-bottom:6px;
  display:block;
  text-transform:uppercase;
}
h3.npdf-title{ margin:0.2rem 0; }
.npdf-title a{
  font-size:24px;
  line-height:1.1em;
  color:#000;
  text-decoration:none;
}

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

/**Mejoras**/
.npdf-container{margin:18px 0;--newspack-theme-color-primary:#1c5048;font-family: 'SalvoSansCond-Bold', sans-serif;}
.npdf-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px;}
.npdf-buttons{display:flex;flex-wrap:wrap;gap:10px;}

.npdf-btn,
.npdf-reset,
.npdf-more{
  border:1px solid var(--newspack-theme-color-primary,#1c5048);
  background:var(--newspack-theme-color-primary,#1c5048);
  color:#fff;
  border-radius:999px;
  padding:10px 16px;
  font-weight:600;
  cursor:pointer;
  line-height:1;
  transition:filter .15s ease, transform .05s ease;
}
.npdf-btn:hover,
.npdf-reset:hover,
.npdf-more:hover{ filter:brightness(0.95); }
.npdf-btn:active,
.npdf-reset:active,
.npdf-more:active{ transform:translateY(1px); }

.npdf-btn.active{
  filter:brightness(0.88);
}

.npdf-more{margin-top:18px;}
.npdf-container.npdf-loading .npdf-more{opacity:.7;cursor:default;}

/* --- Timeline --- */
.npdf-timeline{margin:10px 0 18px; padding:0; background:transparent !important;}
.npdf-timeline-labels{display:flex;justify-content:space-between;font-size:14px;}
.npdf-range-slider{width:100%;position:relative;height:40px;background:transparent !important;}

/* Dos inputs superpuestos (start/end).
   El fondo (gradiente) lo aplica el JS al input, aquí solo aseguramos que sea visible y “limpio”. */
.npdf-range-slider input[type=range]{
  -webkit-appearance:none;
  appearance:none;
  position:absolute;
  left:0; right:0;
  top:16px;
  width:100%;
  height:8px;
  margin:0;
  pointer-events:none; /* solo se arrastran los thumbs */
  background:#d0d0d0;  /* este será reemplazado por el gradiente del JS */
  border-radius:999px;
  outline:none;
  box-shadow:none;
  accent-color:var(--newspack-theme-color-primary,#1c5048);
}

/* Asegurar orden al superponer */
.npdf-range-slider .npdf-start-year{z-index:2;}
.npdf-range-slider .npdf-end-year{z-index:3;}

/* Track (lo dejamos transparente para que se vea el background/gradiente del input) */
.npdf-range-slider input[type=range]::-webkit-slider-runnable-track{
  height:8px;
  background:transparent;
  border-radius:999px;
}
.npdf-range-slider input[type=range]::-moz-range-track{
  height:8px;
  background:transparent;
  border-radius:999px;
}

/* Thumb / “punto” */
.npdf-range-slider input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  pointer-events:auto;
  width:18px;height:18px;
  background:var(--newspack-theme-color-primary,#1c5048);
  border:2px solid var(--newspack-theme-color-primary,#1c5048);
  border-radius:50%;
  box-shadow:0 2px 6px rgba(0,0,0,0.18);
  margin-top:-5px; /* centra sobre el track de 8px */
}
.npdf-range-slider input[type=range]::-moz-range-thumb{
  pointer-events:auto;
  width:18px;height:18px;
  background:var(--newspack-theme-color-primary,#1c5048);
  border:2px solid var(--newspack-theme-color-primary,#1c5048);
  border-radius:50%;
  box-shadow:0 2px 6px rgba(0,0,0,0.18);
}

/* Fix Firefox: evita que el control “desaparezca” visualmente */
.npdf-range-slider input[type=range]::-moz-range-progress{
  background:transparent;
}

/* Focus */
.npdf-range-slider input[type=range]:focus::-webkit-slider-thumb{
  box-shadow:0 0 0 4px rgba(28,80,72,0.18), 0 2px 6px rgba(0,0,0,0.18);
}
.npdf-range-slider input[type=range]:focus::-moz-range-thumb{
  box-shadow:0 0 0 4px rgba(28,80,72,0.18), 0 2px 6px rgba(0,0,0,0.18);
}

.npdf-timeline-years-box{display:flex;justify-content:space-between;margin-top:10px;color:#1c5048;}

/* --- Resultados (grid) --- */
.npdf-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:28px;}
.npdf-article{
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
  transition:.2s;
}
.npdf-thumb img{width:100%;height:153px;object-fit:cover;display:block;}
.npdf-info{padding:18px;}
.npdf-cat{font-size:12px;color:#1c5048;font-weight:700;margin-bottom:6px;display:block;text-transform:uppercase;}
h3.npdf-title{margin:0.2rem 0;}
.npdf-title a{font-size:24px;line-height:1.1em;color:#000;text-decoration:none;}

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

input[type=range]{
 border:none!important;
 padding:0!important;
}
.npdf-range-slider::before{
  top:17px!important;
 }
