/* 
============================== Blog SECTION 1 ==============================
*/
.cards__blog {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card__blog {
  height: 20rem;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  color: var(--white-color);
  box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2);
}

/* Overlay oscuro sobre la imagen */
.card__blog::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
  transition: background 0.3s ease-out;
}

.card__blog:hover::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.card__blog img {
  position: absolute;
  object-fit: cover;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.9;
  transition: opacity 0.2s ease-out;
}

.card__blog h2 {
  position: absolute;
  inset: auto 10px 30px 10px;
  margin: 0 !important;
  transition: inset 0.3s 0.3s ease-out;
  font-weight: normal;
  text-transform: uppercase;
  z-index: 3;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 1.125rem;
}

.card__blog p,
.card__blog a {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 3;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.card__blog p {
  inset: auto 10px 60px 10px;
  font-size: 0.875rem;
  line-height: 1.4;

  /* Line clamp para limitar a 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: justify;
}

.card__blog a {
  inset: auto 10px 20px 10px;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--white-color);
}

.card__blog:hover h2 {
  inset: auto 10px 170px 10px;
  transition: inset 0.3s ease-out;
}

.card__blog:hover p,
.card__blog:hover a {
  opacity: 1;
  transition: opacity 0.5s 0.1s ease-in;
}

.card__blog:hover img {
  transition: opacity 0.3s ease-in;
  opacity: 1;
}

.card__blog__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  color: var(--white-color);
}

.card__blog__link {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  max-width: max-content;
  gap: 0.5rem;
  display: inline-block !important;
  border: 1px solid var(--white-color);
  border-radius: 8px;
  padding: 0.5rem;
  transition: background-color 0.2s ease, border 0.2s ease;
}

.card__blog__link:hover {
  background-color: var(--primary-color-500);
  color: var(--white-color);
  text-decoration: none;
  border: 1px solid var(--primary-color-500);
}

/* 
============================== Blog SECTION 2 ==============================
*/
.product__cards__section {
  background-color: var(--primary-color-50);
}

.cards__product__blog__grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card__product__blog__2 {
  position: relative;
  display: block;
  background-color: var(--white-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card__product__blog__2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* Imagen del producto */
.card__product__blog__2__image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card__product__blog__2:hover .card__product__blog__2__image {
  transform: scale(1.05);
}

/* Contenido de la tarjeta */
.card__product__blog__2__content {
  padding: 0.875rem;
  border-top: 1px solid var(--gray-color-100);
  background-color: var(--white-color);
}

/* Título */
.card__product__blog__2__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-color-900);
  margin: 0;
  line-height: 1.4;
}

/* Descripción */
.card__product__blog__2__description {
  font-size: 0.875rem;
  color: var(--gray-color-500);
  line-height: 1.6;
  margin: 0.125rem 0 0 0;

  /* Line clamp para limitar a 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botones de acción */
.card__product__blog__2__btn {
  margin-top: 1rem;
  width: 100%;
  background-color: var(--primary-color-500);
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-decoration: none;

}

.card__product__blog__2__btn svg {
  width: 1.7rem;
  height: 1.7rem;
}

.card__product__blog__2__btn:hover {
  transform: scale(1.05);
  text-decoration: none;
  color: var(--white-color);
}

/* 
      ============================================= SM =============================================
*/
@media (min-width: 640px) {
  .card__blog:hover h2 {
    inset: auto 20px 150px 20px;
    transition: inset 0.3s ease-out;
  }

  .card__blog p {
    inset: auto 20px 60px 20px;
  }

  .card__blog a {
    inset: auto 20px 20px 20px;
  }
}

/* 
      ============================================= MD =============================================
*/
@media (min-width: 768px) {
  .cards__blog {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards__product__blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card__product__image {
    height: 18rem;
  }

  .cards__product__blog__grid {
    gap: 1.5rem;
  }

  /* Título */
  .card__product__blog__2__title {
    font-size: 1.125rem;
  }

  /* Descripción */
  .card__product__blog__2__description {
    font-size: 1rem;
  }
}

/* 
      ============================================= LG =============================================
*/
@media (min-width: 1024px) {
  .cards__blog {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards__product__blog__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card__product__image {
    height: 16rem;
  }

  .card__product__blog__2__title {
    font-size: 1.25rem;
  }

  .card__product__blog__2__description {
    font-size: 0.9375rem;
  }
}
