/* --- ANIMACIÓN FADE-IN PARA OBJETOS --- */
.objeto-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.objeto-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- ESTILO PARA PÁGINA INDIVIDUAL DE OBJETOS MÁGICOS --- */
body.single-objetos_magicos {
  background-color: #1a1a1a;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
}

body.single-objetos_magicos .wp-post-image {
  display: block;
  margin: 2rem auto;
  max-width: 400px;
  height: auto;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

body.single-objetos_magicos .entry-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

body.single-objetos_magicos h1,
body.single-objetos_magicos h2,
body.single-objetos_magicos h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: #f2f2f2;
}

body.single-objetos_magicos em {
  display: block;
  text-align: center;
  font-style: italic;
  margin: 1rem 0 2rem;
  color: #bbb;
}

body.single-objetos_magicos ul {
  padding-left: 1.2rem;
  margin: 1rem 0;
}

body.single-objetos_magicos li::marker {
  color: #fff;
}

body.single-objetos_magicos strong {
  color: #fff;
}

/* --- CONTENEDOR DE FILTROS --- */
#filtro-objetos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: start;
}

#filtro-objetos select {
  padding: 0.5rem 0.9rem;
  font-size: 1rem;
  background-color: #1f1f1f;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
}

/* --- BOTÓN RESET --- */
#reset-filtros {
  padding: 0.5rem 1rem;
  background-color: #2a2a2a;
  color: #fff;
  border: 1px solid #555;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#reset-filtros:hover {
  background-color: #444;
}

/* --- GRID DE TARJETAS --- */
.grid-objetos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* --- TARJETA DE OBJETO --- */
.objeto-card {
  background-color: rgba(26, 26, 26, 0.5);
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.objeto-card:hover {
  transform: translateY(-5px);
  background-color: rgba(26, 26, 26, 0.4);
}

/* --- IMAGEN DE OBJETO --- */
.objeto-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.objeto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- SI NO HAY IMAGEN --- */
.no-thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #2a2a2a;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* --- CONTENIDO DE TARJETA --- */
.objeto-info {
  padding: 1rem;
}

.objeto-nombre {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  color: #fff;
}

/* --- ETIQUETAS --- */
.objeto-etiquetas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.etiqueta {
  font-size: 0.8rem;
  background-color: #333;
  color: #ccc;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.etiqueta:hover {
  background-color: #555;
  color: #fff;
}

.etiqueta.tipo,
.etiqueta.rareza,
.etiqueta.clase,
.etiqueta.funcion,
.etiqueta.vinculacion {
  background-color: #3b3b3b;
}

/* --- COLORES DE RAREZA UNIFICADOS --- */
.rareza-comun,
.rareza-infrecuente,
.rareza-raro,
.rareza-muy-raro,
.rareza-legendario,
.rareza-artefacto {
  background-color: #3b3b3b !important;
  color: #ccc !important;
}

.objeto-card.rareza-comun,
.objeto-card.rareza-infrecuente,
.objeto-card.rareza-raro,
.objeto-card.rareza-muy-raro,
.objeto-card.rareza-legendario,
.objeto-card.rareza-artefacto {
  border-left: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  #filtro-objetos {
    flex-direction: column;
    align-items: stretch;
  }

  #reset-filtros {
    width: 100%;
  }
}

/* --- AJUSTE DE CONTENEDOR GENERAL --- */
.contenedor-objetos-magicos {
  width: 100%;
  max-width: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

.contenedor-objetos-magicos > * {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- ESTILO DEL BUSCADOR --- */
#filtro-busqueda {
  background-color: #121212;
  border: 1px solid #fff;
  color: #fff;
  padding: 0.5rem 0.5rem;
  font-size: 1rem;
  border-radius: 4px;
  outline: none;
  width: 140px;
}

#filtro-busqueda::placeholder {
  color: #fff;
  opacity: 0.6;
}

/* --- Corrección para imagen destacada recortada en objetos mágicos --- */
body.single-objetos_magicos .wp-block-post-featured-image {
  aspect-ratio: auto !important;
}

body.single-objetos_magicos .wp-block-post-featured-image img {
  object-fit: contain !important;
  height: auto !important;
  max-height: 600px;
  width: auto !important;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
body.single-objetos_magicos .wp-block-post-featured-image img {
  object-fit: contain !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}
body.single-objetos_magicos .is-layout-constrained {
  max-width: 100% !important;
}

body.single-objetos_magicos .entry-content {
  max-width: 1000px !important;
}
body.single-objetos_magicos {
  background-color: #000 !important;
}

.single-objetos_magicos {
  background-color: #000 !important;
  padding: 0;
  margin: 0;
}
.enlace-retorno {
  text-align: center;
  margin-top: 3em;
}

.enlace-retorno a {
  display: inline-block;
  color: #c7a450;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid #c7a450;
  padding: 0.5em 1.2em;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(199, 164, 80, 0.15);
}

.enlace-retorno a:hover {
  background-color: #c7a450;
  color: #000;
  box-shadow: 0 0 20px rgba(199, 164, 80, 0.4);
}
