/* =========================================
   ARCHIVE: ENFERMEDADES
   Fondo blanco + tarjetas con estilo oscuro
   ========================================= */

body.archive.post-type-archive-projects {
  background: #ffffff;
  /* ✅ Fondo blanco */
  color: #1a1a1a;
  font-family: "Inter", "Segoe UI", sans-serif;
}

/* ===== BUSCADOR SUPERIOR ===== */
.busqueda-enfermedades {
  text-align: center;
  margin-bottom: 2rem;
}

.busqueda-enfermedades form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f9f9fb;
  border: 1px solid #392551;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 2px 8px rgba(57, 37, 81, 0.15);
}

.busqueda-enfermedades input[type="text"] {
  background: transparent;
  border: none;
  color: #1a1a1a;
  outline: none;
  font-size: 1rem;
  width: 260px;
}

.busqueda-enfermedades input::placeholder {
  color: #777;
}

.busqueda-enfermedades button {
  background: #392551;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.busqueda-enfermedades button:hover {
  background: #5d3c8f;
}

/* ===== ENCABEZADO ===== */
.encabezado-archive {
  text-align: center;
  margin-bottom: 2.5rem;
}

.encabezado-archive h1 {
  font-size: 2rem;
  color: #120a1f;
  margin-bottom: 0.5rem;
}

.encabezado-archive p {
  color: #555;
  font-size: 1rem;
}

/* ===== GRID DE ENFERMEDADES ===== */
.grid-enfermedades {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.enfermedad-item {
  background: #E1E8F0;
  border: 0px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
  overflow: hidden;
  position: relative;
}

.enfermedad-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(57, 37, 81, 0.6);
}

/* Quitar click cubriendo todo */
.enfermedad-item>a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Contenido con padding */
.enfermedad-content {
  padding: 1rem 1rem 0rem 1rem;
}

.enfermedad-item h2 {
  font-size: 1.1rem;
  color: #051229;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.enfermedad-item p {
  color: #000;
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
  line-height: 1.5;
}

/* ===== BOTÓN VER MÁS ===== */
/* ===== BOTÓN VER MÁS ===== */
.btn-ver-mas {
  display: inline-block;
  font-size: 0.95rem;
  color: #392551;
  font-weight: 600;
  cursor: pointer;
  margin: 0 1.4rem 1.2rem;
  position: relative;
  text-decoration: none;
  /* Quitamos el subrayado default */
  padding-bottom: 2px;
}

/* Subrayado personalizado elegante */
.btn-ver-mas::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #392551;
  transition: width 0.25s ease;
}

/* Efecto hover: línea que se contrae */
.enfermedad-item:hover .btn-ver-mas::after {
  width: 40%;
}


/* ===== SIN RESULTADOS ===== */
.sin-resultados {
  text-align: center;
  color: #777;
  padding: 2rem;
  font-style: italic;
}

/* ===== PAGINACIÓN ===== */
.paginacion {
  text-align: center;
  margin-top: 2.5rem;
}

.paginacion .page-numbers {
  color: #392551;
  margin: 0 6px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #392551;
  transition: all 0.2s ease;
}

.paginacion .page-numbers.current,
.paginacion .page-numbers:hover {
  background: #392551;
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .busqueda-enfermedades input[type="text"] {
    width: 180px;
  }

  .grid-enfermedades {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
}

/* ===== FILTROS DE CATEGORÍAS ===== */
.filtros-enfermedades {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn-filtro {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: #f0f2f5;
  color: #392551;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-filtro:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.btn-filtro.activo {
  background: #392551;
  color: #ffffff;
  border-color: #392551;
  box-shadow: 0 2px 6px rgba(57, 37, 81, 0.2);
}

/* ===== ESTADO DE CARGA AJAX ===== */
.grid-enfermedades.loading,
.paginacion.loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}