/* Estilos optimizados */

/* Animaciones */
@keyframes thumbAnimation {
  0% { transform: translateY(0); opacity: 0; }
  50% { transform: translateY(-15px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}

@keyframes waveAnimation {
  0% { transform: scale(0.5) translateY(10px); opacity: 0; }
  50% { transform: scale(1.2) translateY(-10px); opacity: 1; }
  100% { transform: scale(1) translateY(-20px); opacity: 0; }
}

/* Iconos de "Me gusta" y "No me gusta" */
.thumb-up-icon, .thumb-down-icon {
  font-size: 30px;
  position: relative;
  animation: thumbAnimation 1s ease-out;
}

.thumb-up-icon { color: #ffc107; }
.thumb-down-icon { color: #e63946; }

/* Elementos emergentes */
.stars, .waves {
  font-size: 14px;
  color: white;
  background-color: black;
  border: 2px solid #ffc451;
  padding: 10px 20px;
  position: absolute;
  top: -20px;
  left: 80%;
  transform: translateX(-50%);
  animation: waveAnimation 1s ease-out;
  opacity: 1;
  border-radius: 10px;
  text-align: center;
}

/* Contenedores de "Me gusta" y "No me gusta" */
.thumb-up-container, .thumb-down-container {
  position: absolute;
  top: 390px;
  display: none;
  white-space: nowrap;
}

.thumb-up-container { left: 20%; transform: translateX(-20%); }
.thumb-down-container { right: 80%; transform: translateX(20%); }

/* Contenedor principal */
#cafeterias-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Tarjetas */
.card {
  background-color: #6f4f37 !important;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 280px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 450px;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.card-body {
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
}

.card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  color: white;
  background-color: black;
  border: 2px solid #6f4f37;
  padding: 10px;
  max-width: 80%;
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
  border-radius: 8px;
}

.card-text {
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.card-body a {
  font-weight: bold;
  text-align: center;
}

.card-body a:hover {
  text-decoration: underline;
}

/* Media queries para tarjetas */
@media (max-width: 767px) { .card { width: 90%; } }
@media (min-width: 768px) { .card { width: 48%; } }
@media (min-width: 1200px) { .card { width: 23%; } }

/* Estrellas de valoración */
.valoracion i { color: gray; }
.valoracion .fas { color: #ffd700; }

/* Botones */
.tooltip-button {
  display: inline-block;
  margin-right: 5px;
  padding: 5px 10px;
  font-size: 18px;
  text-transform: capitalize;
}

.tooltip-button:hover {
  opacity: 0.8;
  cursor: pointer;
}

@media (max-width: 768px) {
  .tooltip-button {
    font-size: 10px;
    padding: 4px 8px;
  }
}
