@import url("./index.css");

.news {
  display: flex;
  justify-content: center;
  height: 490px;
}

.news-container {
  display: flex;
  margin: 180px 0;
}

.news-info {
  display: flex;
  flex-direction: column;
  width: 446px;
  height: 263px;
}

.news-img {
  width: 540px;
  height: 286px;
  border: solid 4px var(--primary-color);
  border-radius: 32px;
  margin-right: 48px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.news-info-title {
  font-size: 30px;
  font-family: var(--secondary-font);
  color: var(--tertiary-color);
  font-weight: 700;
}

.news-info-date {
  font-size: 14px;
  color: var(--tertiary-btn-color);
  margin: 16px 0 24px 0;
}

.news-info-paragraph {
  font-size: 18px;
  color: var(--quinternary-color);
  text-align: left;
}

.link-news {
  display: flex;
  justify-content: left;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 14px;
  margin-top: 24px;
  cursor: pointer;
}

.heart-news {
  position: absolute;
  top: 506px;
  right: 0;
  background-size: cover;
  background: url('../images/heart-news.svg') no-repeat center;
  width: 500px;
  height: 400px;
  z-index: 3;
}

.latest-news {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.ellipse-latest-news {
  width: 100%;
  height: 1400px;
  position: absolute;
  z-index: -1;
  top: -50px;
}

.latest-news-title {
  transform: uppercase;
  font-size: 40px;
  font-family: var(--secondary-font);
  color: var(--tertiary-color);
  font-weight: bold;
  margin: 200px 0 58px 0;
}

.latest-articles {
  display: grid;
  justify-content: center;
  align-items: center;
  width: 80%;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 54px 24px;
}

.latest-article {
  width: 350px;
}

.article-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  height: 40px;
}

.article-date {
  font-size: 14px;
  color: var(--tertiary-btn-color);
  margin: 16px 0 24px 0;
}

.article-paragraph {
  font-size: 18px;
  color: var(--quinternary-color);
  text-align: left;
  height: 110px;
}

.article-link {
  color: var(--tertiary-color);
  display: flex;
  justify-content: right;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  margin-top: 24px;
  cursor: pointer;
}

@media (min-width: 720px) and (max-width: 1439px) {
  .news-container {
    flex-direction: column;
    margin: 0;
  }
  .news {
    height: 790px;
  }

  .news-img {
    margin: 170px 0 30px 0;
    height: 286px;
  }

  .news-info {
    width: 550px;
  }
  .heart-news {
    display: none;
  }

  .latest-articles {
    grid-template-columns: repeat(3, 1fr);
  }

  .latest-article {
    width: 324px;
  }

  .latest-news {
    background: var(--secondary-color);
    height: auto;
  }

  .ellipse-latest-news {
    display: none;
  }

  .latest-news-title {
    margin: 40px 0;
    font-size: 32px;
  }
}


@media (min-width: 360px) and (max-width: 719px) {
  .news-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 150px 0 0 0;
  }

  .news-img {
    width: 328px;
    height: 174px;
    margin: 0;
  }

  .news {
    height: 690px;
    padding: 0 20px;
  }
  
  .news-info {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 50px;
  }

  .news-info-title {
    font-size: 24px;
  }

  .heart-news img {
    position: absolute;
    top: 406px;
    left: 500px;
    width: 250px;
    z-index: 1;
  }

  .heart-news {
    display: none;
  }

  .latest-articles {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
  }

  .latest-article {
    width: 324px;
  }

  .latest-news {
    background: var(--secondary-color);
    height: auto;
  }

  .ellipse-latest-news {
    display: none;
  }

  .latest-news-title {
    margin: 40px 0;
    font-size: 32px;
  }
}

@media (min-width: 720px) and (max-width: 1024px) {
  .latest-articles {
    grid-template-columns: repeat(2, 1fr);
  }
}
