@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap');

.hover-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 300px;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

.hover-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.hover-card-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.hover-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 100%;
  display: block;
  transition: transform 0.5s ease;
}

.hover-card:hover img {
  transform: scale(1.1);
}

/* Overlay con fondo blanco semi-transparente */
.hover-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 25vh;
  margin-bottom: -70px;
  background: rgba(255, 255, 255, 0.712);
  color: #042434;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  box-sizing: border-box;
  transition: all 0.5s ease;
}

/* Contenedor interno */
.hover-card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: all 0.5s ease;
}

/* Título con peso de fuente ligero */
.hover-card-title {
  font-size: 1.3rem;
  margin: 0;
  color: #042434;
  font-family: 'Roboto', sans-serif;
  font-weight: 300; /* Roboto Light */
  letter-spacing: 0.3px;
  line-height: 1.3;
  text-shadow: none;
}

/* Extracto y botón */
.hover-card-excerpt,
.hover-card-button {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s ease 0.1s;
}

.hover-card-excerpt {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  font-weight: 300; /* Roboto Light */
  line-height: 1.4;
  margin: 8px 0 0 0;
  color: #042434;
}

/* Botón refinado */
.hover-card-button {
  margin: 12px auto 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 300; /* Roboto Light */
  color: #042434;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #042434;
  padding: 6px 20px;
  border-radius: 20px;
  background: transparent;
  text-decoration: none;
  min-width: 110px;
}

.hover-card-button:hover {
  background: #042434;
  color: #ffffff;
  transform: scale(1.05);
  font-weight: 400; /* Un poco más grueso en hover */
}

.hover-card-button-icon {
  display: inline-block;
  line-height: 1;
  margin-left: 6px;
  font-size: 1rem;
}

/* Hover states */
.hover-card:hover .hover-card-overlay {
  margin-bottom: 0;
  height: 85%;
  padding: 20px;
}

.hover-card:hover .hover-card-excerpt,
.hover-card:hover .hover-card-button {
  opacity: 1;
  transform: translateY(0);
}

/* Animación de entrada */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hover-card:not(:hover) .hover-card-content {
  animation: fadeIn 1.5s ease forwards;
}

/* MEDIA QUERIES PARA TABLET Y MÓVIL */

/* Tableta (768px o menos) */
@media (max-width: 768px) {
  .hover-card {
    height: 250px;
  }
  
  .hover-card-image img {
    object-fit: cover;
    object-position: center 100%;
  }
  
  .hover-card-overlay {
    height: 50vh;
  }
  
  .hover-card:hover .hover-card-overlay {
    height: 85%;
    padding: 15px;
  }
  
  .hover-card-title {
    font-size: 1.1rem;
    line-height: 1.2;
    font-weight: 300;
  }
  
  .hover-card-excerpt {
    font-size: 0.8rem;
    margin: 6px 0 0 0;
    font-weight: 300;
  }
  
  .hover-card-button {
    font-size: 0.85rem;
    padding: 5px 16px;
    min-width: 100px;
    margin: 10px auto 0 auto;
    font-weight: 300;
  }
}

/* Móvil (480px o menos) */
@media (max-width: 480px) {
  .hover-card {
    height: 220px;
  }
  
  .hover-card-image img {
    object-fit: cover;
    object-position: center 100%;
  }
  
  .hover-card-overlay {
    height: 25vh;
    padding: 10px;
  }
  
  .hover-card:hover .hover-card-overlay {
    height: 95%;
    padding: 12px;
  }
  
  .hover-card-title {
    font-size: 1rem;
    font-weight: 300;
  }
  
  .hover-card-excerpt {
    font-size: 0.75rem;
    line-height: 1.3;
    font-weight: 300;
  }
  
  .hover-card-button {
    font-size: 0.8rem;
    padding: 4px 14px;
    min-width: 90px;
    font-weight: 300;
  }
  
  .hover-card-button-icon {
    font-size: 0.9rem;
    margin-left: 4px;
  }
}

/* Ajustes específicos para orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
  .hover-card {
    height: 200px;
  }
  
  .hover-card-image img {
    object-fit: cover;
    object-position: center 100%;
  }
  
  .hover-card-overlay {
    height: 30vh;
  }
  
  .hover-card:hover .hover-card-overlay {
    height: 90%;
  }
}

/* Media query adicional para pantallas muy grandes */
@media (min-width: 1200px) {
  .hover-card {
    height: 280px;
  }
  
  .hover-card-image img {
    object-fit: cover;
    object-position: center 100%;
  }
  
  .hover-card-title {
    font-size: 1.2rem;
    font-weight: 300;
  }
  
  .hover-card-excerpt {
    font-size: 0.85rem;
    font-weight: 300;
  }
}