/*  LIBROS */
.libro-link {
  display: contents;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.libro-link:hover {
  transform: translateY(-3px);
}

.libros-grid {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
  gap: 20px;
  margin-right: -10px;
}

.libro {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: white;
  display: flex;
  width: calc(33.33% - 20px);

  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.libro:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.libro img {
  width: 25%;
  height: auto;
  max-width: 250px;

  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.libro-info {
  width: 75%;
  padding: 20px;
  padding: 25px 0;
  padding: 20px;
}

.libro-titulo {
  margin-bottom: 12px;
  color: #2c3e50;
  font-weight: 600;
  font-size: 1.1rem;
}

.libro-autor {
  margin-bottom: 15px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.libro-descripcion {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  color: #34495e;
  line-height: 1.5;
}

/* Selector */
.selector {
  width: 100%;
  height: 80px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 25px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.selector > button {
  all: unset;
  height: 100%;
  width: 200px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: solid 1px #e3e1e1;
  border-right: solid 1px #e3e1e1;
  cursor: pointer;
  font-weight: 500;
  color: #2c3e50;
}

.selector > button:hover {
  background-color: #f8f9fa;
  color: #284272;
}

#recomendados-button {
  border: none;
}

/* BASE DE DATOS ESTADISTICAS */
.basededatos-estadisticas {
  width: 100%;
  background-color: white;
  display: flex;
  margin: 60px 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 20px 0;
}

.basededatos-estadisticas div {
  width: 50%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.basededatos-estadisticas div p {
  font-size: 20px;
  color: #2c3e50;
  margin: 5px 0;
}

.basededatos-estadisticas div p:first-child {
  font-size: 2.5rem;
  font-weight: 700;
  color: #284272;
}

/* BOTON BUSCAR MÁS*/
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
}

.pagination-container > button {
  all: unset;
  padding: 12px 25px;
  border-radius: 8px;
  background-color: #284272;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-container > button:hover {
  background-color: #345490;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ESTILOS RESPONSIVE */
@media (max-width: 1200px) {
  .libro {
    width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .basededatos-estadisticas {
    flex-direction: column;
  }
  .basededatos-estadisticas div {
    width: 100%;
    height: auto;
    padding: 20px 0;
  }

  .libro {
    width: calc(100% - 10px);
  }

  .libro img {
    width: 35%;
    border-radius: 8px 8px 0 0;
    max-height: 100%;
  }

  .libro-info {
    width: 100%;
    padding: 20px;
    margin-right: 0;
  }

  .libro-descripcion {
    font-size: 14px;
  }

  .libro-titulo {
    font-size: 18px;
  }

  .selector > button {
    width: 50%;
    height: 60px;
    font-size: 12px;
  }
}

@media (min-width: 701px) and (max-width: 1500px) {
  .libro img {
    width: 35%;
  }

  .libro-descripcion {
    font-size: 14px;
  }

  .libro-autor {
    font-size: 14px;
  }

  .libro-titulo {
    font-size: 16px;
  }
}

@media (min-width: 769px) and (max-width: 1280px) {
  .libro img {
    width: 25%;
  }

  .libro {
    width: calc(50% - 10px);
  }

  .libro-descripcion {
    font-size: 16px;
  }

  .libro-autor {
    font-size: 16px;
  }

  .libro-titulo {
    font-size: 18px;
  }
}

@media (min-width: 1280px) {
  .libro img {
    width: 40%;
  }
}

@media (min-width: 1600px) {
  .libro img {
    width: 30%;
  }
}
