body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  touch-action: pan-y;
}

/* Fondo principal con grid para dos tarjetas */
.fondo-adopcion {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* dos columnas */
  gap: 2rem;
  justify-items: center;
  align-items: start;
  padding: 4rem 2rem 2rem; /* más espacio arriba para las flechas */
  background-image: url('imagenes/portadauser.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative; /* necesario para posicionar las flechas */
}

/* Fondo principal en escritorio: ocupa toda la pantalla */
@media (min-width: 1024px) {
  .fondo-adopcion {
    background-size: cover;   /* llena toda la pantalla */
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* Fondo en móviles/tablets: se mantiene contain */
@media (max-width: 1023px) {
  .fondo-adopcion {
    background-size: contain;
    background-position: top center;
    background-repeat: no-repeat;
  }
}

/* Título gráfico integrado con el background */
.titulo-adopciones {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0; /* espacio arriba y abajo */
  position: relative;
  z-index: 2; /* asegura que quede por encima del fondo */
}

.titulo-adopciones img {
  max-width: 1100px;   /* tamaño máximo en escritorio */
  width: 100%;        /* ocupa todo el ancho disponible */
  height: auto;
  display: block;
  
}


/* Tarjeta animal */
.animal-card {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: fadeSlideIn 0.8s ease forwards;
  opacity: 0;
}

/* Imagen del animal */
.card-image {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.animal-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  display: block;
}

/* Nombre del animal: blanco sobre fondo violeta */
.animal-nombre {
  font-size: 2rem;
  font-weight: bold;
  color: #ffffff; /* texto blanco */
  background-color: #5e1d54; /* violeta institucional */
  text-align: left;
  padding: 1rem;
}

/* Estado */
.estado {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  border-radius: 999px;
  margin: 0.5rem 1rem;
}

.estado.disponible {
  background-color: #95c11f; /* verde institucional */
  border: 2px solid #ffffff; /* borde blanco */
}

.estado.adoptado {
  background-color: #dc3545; /* rojo */
  border: 2px solid #ffffff; /* borde blanco */
}

/* Contenido de la tarjeta con fondo verde institucional */
.card-content {
  padding: 1rem;
  text-align: left;
  color: white;
  font-size: 1rem;
  line-height: 1.5;
  background-color: #95c11f; /* verde institucional */
}

.card-content p strong {
  font-weight: bold;
  color: white;
}

/* Animación */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Paginación centrada arriba */
.paginacion {
  position: absolute;
  top: 13rem;              /* distancia desde arriba */
  left: 50%;              /* referencia al centro */
  transform: translateX(-50%); /* centrado horizontal */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.paginacion .flecha {
  display: flex;
  flex-direction: column; /* texto arriba, flecha abajo */
  justify-content: center;
  align-items: center;
  text-decoration: none;
  gap: 0.3rem;
}

.paginacion .flecha-texto {
  color: #cc5500; /* naranja oscuro */
  font-size: 1rem;
  font-weight: bold;
}

.paginacion .flecha-icono {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: #cc5500; /* naranja oscuro */
  color: white;
  font-size: 2rem;
  border-radius: 8px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.paginacion .flecha-icono:hover {
  transform: scale(1.1);
  background-color: #e65c00; /* naranja más brillante */
}

.filtros-adopcion {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn-filtro {
  background-color: #5e1d54; /* violeta institucional */
  color: #fff;
  font-weight: bold;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-filtro:hover {
  background-color: #95c11f; /* verde institucional */
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .fondo-adopcion {
    grid-template-columns: 1fr;
    background-size: cover;
    background-position: top center;
    padding-top: 5rem; /* espacio extra para flechas */
  }

  .animal-card {
    max-width: 90vw;
    margin: 0 auto;
    aspect-ratio: auto;
  }

  .animal-nombre {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
  }

  .card-content p {
    font-size: 1rem;
  }

  .estado {
    font-size: 1.2rem;
    padding: 0.3rem 1rem;
  }

  .paginacion {
    top: 0.5rem;
    gap: 1rem;
  }

  .paginacion .flecha-icono {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }

  .paginacion .flecha-texto {
    font-size: 0.9rem;
  }
}
