.cabecera {
  position: relative;
  background-image: url('../images/Novedades/Fondo_Novedades.jpg');
  background-size: cover;
  background-position: center;
  height: 380px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 100px;
  padding-left: 150px;
  color: white;
}
body{
  overflow-x: hidden;
}
.cabecera .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 25, 74, 0.8), rgba(0, 25, 74, 0.2), rgba(0, 25, 74, 0));
  z-index: 1;
}

.cabecera .contenido {
  position: relative;
  z-index: 2;
}

.cabecera h1 {
  font-size: 48px;
  font-family: "Oswald", sans-serif;
  color: #ffffff;
  font-weight: bold;

}

.tarjetas {
  margin-top: 90px;
  margin-left: 145px;
  margin-right: 130px;
  margin-bottom: 110px;

}

.card-custom {
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  width: 380px;
  height: 185px;
  border-radius: none;
  border: none;
  transition: box-shadow 0.3s ease;
}

.card-custom img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.card-custom::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.6) 30%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0) 100%);

  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.card-custom:hover::after {
  opacity: 1;
}

.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease;
  text-align: center;
  font-family: "Oswald", sans-serif;
}

.card-custom:hover .overlay-text {
  opacity: 1;
}

.titulo_card {
  font-weight: 600;
  text-align: center;
  margin-top: 15px;
  font-size: 1.6rem;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  color: #000;
  text-decoration: none;
  text-align: center;
}


/*para pantallas pequeñas*/
@media (max-width: 768px) {
  .cabecera {
    height: 150px;
    padding-left: 60px;
    padding-bottom: 60px;
    background-position: center;
  }

  .cabecera h1 {
    font-size: 36px;
  }

  .tarjetas {
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 60px;
    margin-bottom: 60px;
    justify-content: center !important;
  }

  .card-custom {
    width: 100%;
    height: auto;
    margin-bottom: 50px;
  }

  .card-custom img {
    height: auto;
  }

  .titulo_card {
    font-size: 1.2rem;
  }
}

/*para pantallas medianas*/
@media (min-width: 768px) and (max-width: 992px) {

  .cabecera {
    height: 250px;
    padding-left: 60px;
    padding-bottom: 60px;
    background-position: center;
  }

  .cabecera h1 {
    font-size: 36px;
  }

  .tarjetas .row>div {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 15px;
  }

  .card-custom {
    width: 100%;
    max-width: 400px;
    height: auto;
  }

  .card-custom img {
    width: 100%;
    height: auto;
  }

  .tarjetas {
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
  }

  .tarjetas .row>div:last-child {
    margin-left: 0;
    margin-right: auto;
  }
}

