body {
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.news {
  background-color: #1274A1;
  padding: 60px 0;
}

.news .container {
  width: 95%;
  margin: 0 auto;
}

.news .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(1fr));
  gap: 25px;
}

.news article {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
}

.news article header {
  min-height: 60px; /* Ajusta este valor según el diseño */
  max-height: 60px;
  display: flex;
  align-items: center; /* Centra verticalmente el h2 */
  margin-bottom: 25px;
}

.news article .body {
  display: flex;
  flex-direction: column;
  height: calc(100% - 85px); /* Resta la altura del header */
}

.news article header h2 {
   font-family: "Exo", sans-serif;
  font-size: 24px;
  line-height: 30px;
  margin: 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2; /* Máximo de 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  
  color:black;
  font-weight: bold;
}

.news article img {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
}

.news article .body p {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 24px;
  margin: 20px 0;
  text-wrap: balance;
}

.news article .data {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news .grid > article:nth-child(4n + 2) .body > a,
.news .grid > article:nth-child(4n + 3) .body > a {
  width: 100%;
  aspect-ratio: 16/9;
  display: inline-block;
  background-size: cover;
  background-position: center center;
}

.news article .btn-link {
  font-family: "DM Sans", sans-serif;
  text-transform: uppercase;
  font-weight: bold;
  align-self: flex-start;
  margin-left: auto;
  margin-top: auto;
  text-decoration: none;
  color: white;
  background-color: #57cc99;
  box-shadow: 5px 5px 15px #cbcbcb;
  padding: 4px 33px;
  border-radius: 10px;
  display: inline-block;
}

@media (min-width: 768px) {
  .news .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Media queries for desktop */
@media (min-width: 1024px) {
  .news .grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-rows: auto;
  }

  /* Para filas impares: elementos 1 y 2, 5 y 6, 9 y 10, etc. */
  .news .grid > article:nth-child(4n + 1) {
    grid-column: 1 / 2; /* primera columna */
  }
  .news .grid > article:nth-child(4n + 2) {
    grid-column: 2 / 4; /* segunda columna */
  }

  /* Para filas pares: elementos 3 y 4, 7 y 8, 11 y 12, etc. */
  .news .grid > article:nth-child(4n + 3) {
    grid-column: 1 / 3; /* primera columna */
  }
  .news .grid > article:nth-child(4n + 4) {
    grid-column: 3 / 4; /* segunda columna */
  }

  .news .grid > article:nth-child(4n + 2) .body,
  .news .grid > article:nth-child(4n + 3) .body {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 25px;
  }

  .news .grid > article:nth-child(4n + 2) .body > a,
  .news .grid > article:nth-child(4n + 3) .body > a {
    flex: 3;
    aspect-ratio: inherit;
  }

  .news .grid > article:nth-child(4n + 2) .data,
  .news .grid > article:nth-child(4n + 3) .data {
    display: flex;
    flex-direction: column;
    justify-content: end;
    flex: 1;
  }
}


.hero {
  padding:  25px 0 108.5px 0;
}

.news {
  padding:  25px 0 108.5px 0;
}
