/* =========================================================
   PÁGINA DE NOVEDADES - DS&A
   ========================================================= */

/* HERO */

.hero-novedades {
  width: 100%;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background:
    linear-gradient(rgba(30, 33, 38, 0.6), rgba(30, 33, 38, 0.6)),
    url("/img/novedades.JPG") no-repeat center center / cover;
}

.hero-novedades h2 {
  color: var(--color-white);
  font-family: "Brutal type", sans-serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

/* =========================================================
   SECCIÓN PRINCIPAL
   ========================================================= */

.novedades-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 100px max(5%, calc((100% - 1200px) / 2));
  box-sizing: border-box;
  background-color: #d9d9d377;
}

.section-title {
  margin: 0 0 65px;
  color: var(--color-dark);
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
}

/* =========================================================
   GRILLA
   ========================================================= */

.novedades-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* =========================================================
   TARJETAS
   ========================================================= */

.novedad-item {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: stretch;

  min-width: 0;
  height: 420px;
  padding: 32px;

  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-top-left-radius: 60px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 60px;
  border-bottom-left-radius: 10px;

  box-shadow:
    0 10px 30px rgba(65, 69, 77, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background-color 0.35s ease;
}

.novedad-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.94);

  box-shadow:
    0 16px 38px rgba(65, 69, 77, 0.11),
    inset 0 1px 0 #ffffff;
}

/* =========================================================
   CATEGORÍA Y FECHA
   ========================================================= */

.novedad-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;

  width: 100%;
  margin-bottom: 25px;
}

.novedad-item .novedad-category {
  margin: 0;

  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: left;
}

.novedad-item .novedad-date {
  margin: 0;

  color: var(--color-dark);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.7;
  text-align: right;
  white-space: nowrap;
}

/* =========================================================
   TÍTULO
   ========================================================= */

.novedad-item .novedad-title {
  margin: auto 0 18px;

  color: var(--color-dark);
  font-family: var(--font-family-primary);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;

  overflow-wrap: anywhere;
}

/* =========================================================
   RESUMEN
   ========================================================= */

.novedad-item .novedad-summary {
  margin: 0 0 auto;

  color: var(--color-dark);
  font-family: var(--font-family-primary);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  text-align: justify;

  overflow-wrap: anywhere;

  /* Limitar el resumen a 4 líneas */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

/* =========================================================
   BOTÓN
   ========================================================= */

.novedad-item .btn {
  padding: 12px 28px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--color-accent);
  border: 1.5px solid var(--color-white);
  border-radius: 16px 0 16px 0;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 12px rgba(249, 240, 217, 0.3);

  display: inline-block;
  align-self: center;
  margin-top: auto;
}

.novedad-item .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(174, 125, 0, 0.0) 0%,
        rgba(252, 231, 176, 0.45) 50%,
        rgba(173, 164, 141, 0.9) 100%
    );
    transform: translateX(-100%);
    transition: transform 0.45s ease-out;
    z-index: -1;
}

.novedad-item .btn:hover {
   background-color: #BCBAAC;
    color: var(--color-white);
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px rgba(65, 69, 77, 0.2);
    border-radius: 0 20px 0 20px;
}

.novedad-item .btn:hover::after {
    transform: translateX(0);
}

/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 900px) {
  .novedades-section {
    padding: 75px 30px;
  }

  .section-title {
    margin-bottom: 50px;
    font-size: 2.2rem;
  }

  .novedades-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .novedad-item {
  padding: 28px;
  height: 400px;
  }

  .novedad-item .novedad-title {
    font-size: 1.3rem;
  }
}

/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 600px) {
  .hero-novedades {
    height: 55vh;

    background-image:
      linear-gradient(rgba(30, 33, 38, 0.7), rgba(30, 33, 38, 0.7)),
      url("../img/novedades.JPG");
  }

  .hero-novedades h2 {
    padding: 0 20px;
    font-size: 2.2rem;
  }

  .novedades-section {
    padding: 55px 20px;
  }

  .section-title {
    margin-bottom: 38px;
    font-size: 1.8rem;
    letter-spacing: 1.5px;
    text-align: justify;
  }

  .novedades-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
  }

  .novedad-item {
    min-height: auto;
    padding: 28px 25px;

    border-top-left-radius: 45px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 45px;
    border-bottom-left-radius: 10px;
  }

  .novedad-meta {
    margin-bottom: 22px;
    gap: 8px 12px;
  }

  .novedad-item .novedad-category {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
  }

  .novedad-item .novedad-date {
    font-size: 0.75rem;
  }

  .novedad-item .novedad-title {
    margin: auto 0 15px;
    font-size: 1.3rem;
    line-height: 1.4;
    text-align: center;
  }

  .novedad-item .novedad-summary {
    margin: 0 0 auto;
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: justify;
  }

  .novedad-item .btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }
}

/* =========================================================
   REDUCIR MOVIMIENTO SI EL USUARIO LO PREFIERE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .novedad-item,
  .novedad-item .btn {
    transition: none;
  }

  .novedad-item:hover,
  .novedad-item .btn:hover {
    transform: none;
  }
}
