  html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Titillium Web', sans-serif;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/*__________NEWS_________*/
#news {
  background: url('/res/img/backgrounds/bg2.png') no-repeat center center / cover;
  background-attachment: fixed;
  padding: 0;
  overflow-x: hidden;
  color: #fff;
  min-height: 500px;
  margin-top: -25px;
}

#news h2 {
  top: 15px;
  left: 50px;
  font-size: 2rem;
  font-family: 'Titillium Web', sans-serif;
  color: #122348;
  margin-right: 170px;
  margin-left: 50px;
  padding-top: 20px;
  text-align: left;
  animation: fadeIn 1s ease-in forwards 0.5s;
}

.news-media {
  position: relative;
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
  margin-left: 50px;
  grid-auto-rows: minmax(380px, auto);
  gap: 10px;
  animation: fadeIn 1s ease-in forwards 0.5s;
}

.news-list .news-item .news-media {
  height: 150px;
  width: 280px;
  background-color: white;
}

.news-item:hover {
  transform: translateY(-7px);
}

.news-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  line-height: 20px;
}

.news-content-overlay span {
  font-size: 0.8rem;
}

#news .news-content-overlay {
  position: absolute;
  top: 150px;
  display: flex;
  flex-direction: column;
  justify-content: left;
  text-align: justify;
  background: #122348;
  padding: 20px;
  width: 280px;
  height: 230px;
}

.news-content-overlay h3,
.news-content-overlay p,
.news-content-overlay span {
  margin: 5px 0;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  color: white;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  text-align: justify;
  padding: 50px;
  padding-top: 0;
  padding-bottom: 0;
}

#search-bar {
  width: 30%;
  padding: 5px;
  border: 3px solid #122348;
  border-radius: 20px;
  background: none;
  margin-right: 50px;
  font-family: 'Titillium Web', sans-serif;
  margin-top: 20px;
  animation: fadeIn 1s ease-in forwards 0.5s;
}

#search-bar::placeholder {
  color: #122348;
  opacity: 0.5;
}

.none {
  color: #122348;
}

#pagination-top {
  margin-top: 20px;
}

.pagination {
  text-align: center;
}

#pagination-bottom {
  margin-bottom: 20px;
}

.page-btn {
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 15px;
  background-color: #122348;
  color: white;
  margin-right: 4px;
  border: none;
}

.page-btn.active {
  background-color: #cda757;
  color: white;
  font-weight: bold;
  cursor: not-allowed;
}

@media screen and (min-width: 1650px) {
  .news-list {
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 350px);
    justify-content: center;
    margin: 0;
    gap: 30px;
  }

  .news-list .news-item .news-media {
    width: 350px;
  }

  #news .news-content-overlay {
    width: 350px;
  }
}

@media screen and (max-width: 1245px) {
  #news {
    padding: 0;
    min-height: 100vh;
  }

  #news h2 {
    top: 50%;
    left: 50%;
    font-size: 2rem;
    text-align: center;
    margin: 0;
  }

  #search-bar {
    width: 90%;
    max-width: 800px;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(2, 320px);
    justify-content: center;
    margin: 0;
  }

  .news-list .news-item .news-media {
    width: 320px;
  }

  #news .news-content-overlay {
    width: 320px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }

  #pagination-bottom {
    margin-top: 100px;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 768px) {
  #news {
    padding: 0;
    min-height: 100vh;
  }

  #news h2 {
    top: 50%;
    left: 50%;
    font-size: 2rem;
    text-align: center;
    margin: 0;
  }

  #search-bar {
    width: 90%;
    max-width: 800px;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(1, 350px);
    justify-content: center;
    margin: 0;
  }

  .news-list .news-item .news-media {
    width: 400px;
  }

  #news .news-content-overlay {
    width: 400px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }

  #pagination-bottom {
    margin-top: 100px;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 480px) {
  #news {
    padding: 0;
    min-height: 100vh;
    margin-top: -25px;
  }

  #news h2 {
    top: 50%;
    left: 50%;
    font-size: 2rem;
    text-align: center;
    margin: 0;
  }

  #search-bar {
    width: 90%;
    max-width: 800px;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(1, 300px);
    justify-content: center;
    margin: 0;
  }

  .news-list .news-item .news-media {
    width: 300px;
  }

  #news .news-content-overlay {
    width: 300px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }

  #pagination-bottom {
    margin-top: 100px;
    margin-bottom: 20px;
  }
}
