/* =============================================================================
   Novedades: tarjetas con imagen grande (index.php, sección #novedades)
   Colores de marca: azul petróleo #013C55 y verde menta #00F1A9
   ============================================================================= */

/* Fondo gris degradado en lugar de las dos fotos laterales.
   Para volver a las fotos: borrar este bloque y descomentar el de abajo. */
#novedades {
  background: linear-gradient(180deg, #f5f7f8 0%, #dfe5e8 100%);
}

#novedades .side-images:before,
#novedades .side-images:after {
  content: none;
}

/* Fotos de fondo a los costados de la sección (reemplazan image-left/right de la plantilla)
#novedades .side-images:before {
  background-image: url(../images/traumatologia1.jpg);
}

#novedades .side-images:after {
  background-image: url(../images/traumatologia2.jpg);
}
*/

/* Carrusel más ancho que el contenedor (hasta 1320px), centrado, con 3 tarjetas */
.novedades-slider {
  width: min(1320px, calc(100vw - 40px));
  margin: 60px 0 87px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Tarjetas de la misma altura dentro del carrusel */
.novedades-slider .owl-stage {
  display: flex;
}

.novedades-slider .owl-item {
  display: flex;
}

.novedad-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  margin: 15px 15px 30px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 2px 6px rgba(1, 60, 85, 0.06), 0 12px 32px rgba(1, 60, 85, 0.10);
  transition: transform .35s ease, box-shadow .35s ease;
}

.novedad-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 10px rgba(1, 60, 85, 0.08), 0 22px 48px rgba(1, 60, 85, 0.16);
}

/* ---- Imagen ---- */
.novedad-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8f1f4;
  cursor: pointer;
}

.novedad-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

.novedad-card:hover .novedad-card__media img {
  transform: scale(1.06);
}

/* Degradé inferior para que la etiqueta se lea sobre cualquier foto */
.novedad-card__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(1, 60, 85, 0.45), rgba(1, 60, 85, 0));
  pointer-events: none;
}

/* Noticia sin imagen: fondo con los colores de la marca */
.novedad-card__media--vacia {
  background: linear-gradient(135deg, #013C55 0%, #025a78 55%, #00b98a 100%);
}

.novedad-card__categoria {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #013C55;
  font-family: "Lato", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.novedad-card__categoria::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #00F1A9;
  vertical-align: 1px;
}

/* ---- Texto ---- */
.novedad-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 20px 16px;
}

.novedad-card__titulo {
  margin: 0 0 8px;
  color: #013C55;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novedad-card__copete {
  margin: 0 0 14px;
  color: #5b6b73;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novedad-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #edf1f3;
}

.novedad-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.novedad-card__tags li {
  max-width: 150px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f6f8;
  color: #4b6470;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.novedad-card__btn,
.novedad-card__btn:focus {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  background: #013C55;
  color: #fff;
  font-family: "Lato", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}

.novedad-card__btn span {
  transition: transform .25s ease;
}

.novedad-card__btn:hover {
  background: #00F1A9;
  color: #013C55;
  text-decoration: none;
}

.novedad-card__btn:hover span {
  transform: translateX(4px);
}

/* ---- Celular ---- */
@media (max-width: 767px) {
  .novedades-slider {
    margin-top: 40px;
  }

  .novedad-card {
    margin: 10px 6px 24px;
    border-radius: 14px;
  }

  .novedad-card__body {
    padding: 20px 18px 18px;
  }

  .novedad-card__titulo {
    font-size: 17px;
  }

  .novedad-card__tags {
    display: none;
  }
}
