.featured-posts {
  background: var(--wp--preset--color--plarium-grey-6);
  padding: 40px 20px 50px 20px;
}

@media screen and (min-width: 767px) {
  .featured-posts {
    padding: 40px 30px;
  }
}

@media screen and (min-width: 1024px) {
  .featured-posts {
    padding: 40px 30px 105px 30px;
  }
}

.featured-posts__inner {
  max-width: 1140px;
  margin: 0 auto;
}

.featured-posts__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.featured-posts__title {
  font-size: 1.375rem;
}

.featured-posts__cta {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--wp--preset--color--plarium-highlight);

  &:hover {
    color: var(--wp--preset--color--plarium-highlight);
  }
}

.featured-posts__post-list {
  position: relative;
}

@media screen and (min-width: 767px) {
  .featured-posts__post-list::after {
    content: "";
    position: absolute;
    top: 0px;
    right: 0px;
    display: block;
    width: 60px;
    height: 100%;
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(240, 240, 240, 1) 100%
    );
  }
}

@media screen and (min-width: 1024px) {
  .featured-posts__post-list::after {
    display: none;
  }
}

.featured-posts__post-list__scroll {
  position: relative;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

@media screen and (min-width: 767px) {
  .featured-posts__post-list__scroll {
    overflow-x: scroll;

    -ms-overflow-style: none;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }
}

@media screen and (min-width: 1024px) {
  .featured-posts__post-list__scroll {
    overflow-x: auto;
  }
}

.featured-posts__post-list__wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media screen and (min-width: 767px) {
  .featured-posts__post-list__wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

.featured-posts__post-list__item {
  min-width: auto;
}

@media screen and (min-width: 767px) {
  .featured-posts__post-list__item {
    min-width: 335px;
    scroll-snap-align: end;
  }
}

@media screen and (min-width: 1024px) {
  .featured-posts__post-list__item {
    min-width: auto;
  }
}

.is-dark-mode {
  .featured-posts {
    background-color: var(--wp--preset--color--plarium-dark-mode-background);

    .featured-posts__title {
      color: var(--wp--preset--color--plarium-white);
    }
  }
}

.content-post-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--wp--preset--color--plarium-white);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 10px -7px;
  border-radius: 4px;
  overflow: hidden;
  height: 100%;
}

.content-post-preview__thumbnail {
  height: 0;
  padding-bottom: 55.556%;
  position: relative;
  overflow: hidden;
}

.content-post-preview__thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.content-post-preview__main {
  padding: 20px;
}

.content-post-preview__title {
  font-size: 1.125rem;
  line-height: 1.111;
  font-weight: 600;
  color: var(--color--plarium-blog--preview-title);
}

.content-post-preview:hover .content-post-preview__thumbnail img {
  transform: scale(1.03);
}

body.is-dark-mode .content-post-preview {
  background-color: var(--wp--preset--color--plarium-dark-mode-games-content);

  .content-post-preview__title {
    color: var(--wp--preset--color--plarium-white);
  }
}
