/* --- Contenedor general --- */
.contenedor {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* --- Estilos generales --- */
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background-color: #f5f5f5;
}

/* --- Header con Flexbox para Bootstrap --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.logo {
  height: 50px;
  cursor: pointer;
}

header a img {
  display: block;
}

/* --- Botón "Inicio de sesión" estilo personalizado --- */
.admin-visible-btn {
  all: unset; /* Resetea estilos de Bootstrap y navegador */
  display: inline-block;
  padding: 8px 14px;
  background-color: #ffffff;
  border: 2px solid #f3dbcf; /* borde rosa claro */
  border-radius: 8px;
  color: #fc5745; /* texto coral */
  font-family: 'Lato', sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.admin-visible-btn:hover {
  background-color: #fc5745; /* fondo coral */
  color: #ffffff; /* texto blanco */
  border-color: #fc5745; /* borde coral */
}

/* --- Elimina borde y sombra cuando está activo/desplegado --- */
.admin-visible-btn:active,
.admin-visible-btn.show,
.admin-visible-btn.active {
  border-color: transparent !important; /* o #f3dbcf si quieres rosa claro */
  background-color: #ffffff; /* mantiene fondo blanco */
  color: #fc5745; /* mantiene texto coral */
  box-shadow: none !important; /* quita cualquier sombra activa */
}

/* --- Dropdown de Bootstrap (Cierra Sesión) --- */
.dropdown-menu {
  border: 2px solid #f3dbcf; /* borde rosa claro */
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Fredoka', sans-serif;
  padding: 0;
}

.dropdown-item {
  color: #fc5745;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

.dropdown-item:hover {
  background-color: #fceae2; /* rosa muy claro */
  color: #fc5745;
  border-radius: 8px;
}

/* --- Botón "Agregar animal" --- */
.btn-add {
  text-decoration: none;
  margin-block: 32px 20px;
  background: #fc5745;
  border: none;
  color: #ffffff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .25s;
}

.btn-add:hover {
  opacity: .85;
}

/* --- Grid de tarjetas --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 28px;
}

.card {
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  padding-bottom: 10px;
}

.card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin: 16px auto 0 auto;

}

.card h3 {
  font-size: 1.05rem;
  margin-top: 8px;
}

.card .meta {
  font-size: .9rem;
  margin-bottom: 10px;
}

/* --- Botones dentro de la tarjeta --- */
.card .btn {
  font-family: 'Lato';
  display: block;
  width: 50%; /* controla el ancho: cambia a 100% si quieres ocupar toda la tarjeta */
  max-width: 200px; /* límite máximo de ancho */
  margin: 8px auto 0 auto; /* separación arriba y centrado horizontal */
  padding: 6px 0;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  background-color: #fc5745;
  color: white;
}

/* Espacio entre Editar y Eliminar */
.card .btn + .btn {
  margin-top: 6px; /* separación entre botones */
  margin-bottom: 10px;
}

.btn.edit {
  background: #fc5745;
  color: #ffffff;
}

.btn.delete {
  background: #fceae2;
  color: #fc5745;
}

.btn:hover {
  opacity: .85;
}

/* --- Footer --- */
.footer {
  background-color: #fef4f1;
  text-align: center;
  padding: 30px 20px;
  font-family: 'Fredoka', sans-serif;
}

.footer-logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  padding-bottom: 4px; /* Pega el texto más */
}

.footer-subtitulo {
  color: #fc5745;
  font-weight: bold;
  margin: 0;
}

.footer-direccion {
  color: #000000;
  font-family: 'Lato';
  font-size: 1rem;
  margin: 4px 0 10px 0;
  line-height: 1.3;
}

.footer-redes {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

.footer-redes a {
  color: #fc5745;
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.footer-redes a:hover {
  transform: scale(1.2);
  color: #d43e34;
}


.socials {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 26px;
}

.socials a {
  font-size: 1.45rem;
  color: #fc5745;
  transition: transform .25s;
}

.socials a:hover {
  transform: scale(1.2);
}

/* --- Media Queries --- */
@media(max-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card img {
    width: 100%;
    height: auto;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-visible-btn {
    width: 100%;
    text-align: left;
  }
}

/* --- Modal personalizado de alerta --- */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  font-family: 'Fredoka', sans-serif;
}

.modal-content {
  background-color: #fceae2; /* rosado claro */
  padding: 25px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 80%;
  animation: fadeIn 0.3s ease;
}

.modal-content p {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
}

.modal-content button {
  padding: 10px 24px;
  background-color: #fc5745;
  color: white;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-content button:hover {
  background-color: #e04635;
}

/* Animación opcional para suavidad */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}