.fadeInNews {
  transition: 0.9s;
  opacity: 0;
  will-change: opacity;
}

.delay {
  transition-delay: 0.9s;
}

.fadeInNews.animated {
  opacity: 1;
}

.fadeInUpNews {
  transform: translate3d(0, 40px, 0);
  transition: 0.9s;
  opacity: 0;
  will-change: transform, opacity;
}

.fadeInUpNews.animated {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% top;
}

.news {
  padding: 40px 37.5px 10px;
  position: relative;
}

.news::before {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 375 / 87;
  background-image: url(../images/common/bubbles-1.webp);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;

  z-index: -1;
}

.news::after {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  bottom: 0;
  width: 100%;
  aspect-ratio: 375 / 87;
  background-image: url(../images/common/bubbles-2.webp);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center top;
  z-index: -1;
}

.menu-container {
  width: 70.4vw;
  max-width: 264px;
  min-width: 256px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid #d26363;
  background-color: white;
  margin: 0 auto;
}

.menu-item {
  height: 60px;
  line-height: 60px;
  text-align: center;
  cursor: pointer;
  /* transition: all 0.2s; */
  font-size: 20px;
  width: 100%;
  border-radius: 30px;
  background-color: transparent;
}
.menu-item:hover {
  background-color: #f5f5f5;
}

/* Active state */
.menu-item.active {
  background-color: #d26363;
  color: white;
  border-radius: 30px;
}

.news-container {
  margin: 40px auto 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, min(300px, 80vw));
  gap: 40px;
  justify-content: center;
}

.news-item {
  width: 80vw;
  max-width: 300px;
}

.news-item__image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 40px;
  background-color: #4e4e4e;
  object-fit: cover;
}

.news-item__title {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #000;
  margin-top: 10px;
}

.news-item__text {
  font-size: 16px;
  line-height: 24px;
  margin-top: 8px;
}

.news-item__category-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.news-item__category {
  padding: 3px 12px;
  font-size: 14px;
  line-height: 20px;
  border: 1px solid #000;
  width: fit-content;
  border-radius: 14px;
  background-color: #fff;

  display: inline-block;
}

.pagination {
  display: flex;
  align-items: center;
  padding-bottom: 59px;
  width: fit-content;
  max-width: 260px;
  margin: 0 auto;
  gap: 30px;
  justify-content: center;
  position: relative;
}

@media (max-width: 360px) {
  .pagination {
    gap: 20px;
  }
}

.pagination-arrow {
  cursor: pointer;
  user-select: none;
  width: 15px;
  min-width: 15px;
  height: 15px;
  background-image: url(../images/news/arrow-icon.png);
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  background-color: transparent;
  left: -40px;
}

.pagination-arrow--next {
  transform: scaleX(-1);
  left: auto;
  right: -40px;
}

.pagination-numbers {
  display: flex;
  gap: 30px;
  flex-grow: 1;
}

.pagination-number {
  font-size: 20px;
  color: #888;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
}

.active {
  color: #000;
  font-weight: bold;
}

.no-posts {
  text-align: center;
}

@media (min-width: 768px) {
  .page-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .menu-container {
    width: 100%;
    max-width: 1128px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #d26363;
    background-color: transparent;
    margin: 0 auto;
    position: relative;
    box-sizing: content-box;
  }

  .menu-container::before {
    content: "";
    display: block;
    width: 100%;
    height: 60px;
    border-radius: 30px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    background-color: #fff;
    z-index: -1;
  }

  .menu-container::after {
    content: "";
    display: block;
    width: 25%;
    height: 60px;
    border-radius: 30px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    background-color: #d26363;
    z-index: -1;
    transition: left 0.3s ease;
  }

  .menu-container:has(.menu-item:first-child.active)::after {
    left: 0px;
  }

  .menu-container:has(.menu-item:nth-child(2).active)::after {
    left: 25%;
  }

  .menu-container:has(.menu-item:nth-child(3).active)::after {
    left: 50%;
  }

  .menu-container:has(.menu-item:last-child.active)::after {
    left: 75%;
  }

  .menu-item {
    transition: color 0.3s ease;
  }

  .menu-item.active {
    background-color: transparent;
    color: white;
    border-radius: 30px;
  }

  .news {
    padding: 0px 37.5px 10px;
    position: relative;
  }

  .fadeInUp--menu {
    padding-top: 120px;
  }

  .news-container {
    margin: 64px auto;
    max-width: 1128px;
    display: grid;
    grid-template-columns: repeat(auto-fit, 360px);
    gap: 24px;
    row-gap: 60px;
    justify-content: center;
  }

  .news-item {
    width: 360px;
    max-width: 360px;
  }

  /* .news-item:first-child {
    padding-top: 64px;
  } */

  .pagination {
    padding-bottom: 133px;
  }
}
