/**
 * News page styles
 */
.np__header-section {
  margin-bottom: 2.5rem;
}

.np__home-link {
  text-decoration: none;
  color: inherit;
  font-size: 0.875rem;

  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.np__home-link > svg {
  width: 1.25rem;
  height: 1.25rem;

  padding: 0.125rem;
  background-color: #f5f5f5;

  border-radius: 50%;
}

.np__main-header {
  margin: 0;
}

.np__news-body {
  font-size: 1.25rem;
}

.np__news-body > p:first-of-type,
.np__intro {
  font-size: 1.5rem;
  margin-top: 0;
}

.np__date {
  font-size: 0.875rem;
  opacity: 0.4;
  margin-top: 1.5em;
  display: block;
}

.np__title {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 800;
  margin-block: 1rem;
}

.np__photo {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 1.5rem;
  margin-block: 1em;
  aspect-ratio: 3 / 2;
}

.np__gallery {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3.75rem;
}

.np__gallery-main {
  width: 60rem;
  height: 40rem;
  object-fit: cover;
  border-radius: 1.5rem;
}

.np__gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.np__gallery-thumbs > img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 1.5rem;
  background: #dfe2e4;

  cursor: pointer;
}

.np__gallery-content {
  position: relative;
  display: flex;
}

.np__gallery-btns {
  position: absolute;
  bottom: -1.5rem;
  left: 0;
  right: 0;

  display: flex;
  justify-content: center;
  gap: 1rem;
}

.np__gallery-btns > button {
  left: 0;
  right: 0;
}

.np__latest-section {
  margin-bottom: -2.5rem;
  padding-top: 3.75rem;
  padding-bottom: 7.5rem;
  background: #f8f8f8;
}

.np__latest-section .section__header {
  font-size: 1.75rem;
}

@media (max-width: 50em) {
  .np__header-section {
    padding-top: 2rem;
    padding-bottom: 1.25rem;
    margin-bottom: 0;
  }

  .np__news-body {
    font-size: 1rem;
  }

  .np__date {
    font-size: 0.75rem;
  }

  .np__title {
    font-size: 1.125rem;
    margin-top: 0.5em;
  }

  .np__news-body > p:first-of-type,
  .np__intro {
    font-size: inherit;
  }

  .np__gallery {
    margin-bottom: 2.5rem;
  }

  .np__photo {
    border-radius: 1rem;
    margin-block: 0;
  }

  .np__gallery-main {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    border-radius: 1rem;
  }

  .np__gallery-thumbs {
    display: none;
  }
}

@media (max-width: 50em) {
  .news .slider__btns {
    display: none;
  }

  .news__list {
    flex-direction: column;
    gap: 1.5rem;
  }

  a.news__container {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .news__container h3 {
    font-size: 1.125rem;
  }

  .news__text {
    font-size: 1rem;
  }

  .news__image {
    flex: none;
    max-width: 25rem;
    margin-bottom: 0;
  }

  .news__item:nth-child(n + 4) {
    display: none;
  }

  /**
   * data-page="2" => show 3 + 5 items
   * data-page="3" => show 3 + 10 items
   * data-page="4" => show 3 + 15 items
   * and so on
   */
  .news__list[data-page="2"] .news__item:nth-child(-n + 8),
  .news__list[data-page="3"] .news__item:nth-child(-n + 13),
  .news__list[data-page="4"] .news__item:nth-child(-n + 18),
  .news__list[data-page="5"] .news__item:nth-child(-n + 23),
  .news__list[data-page="6"] .news__item:nth-child(-n + 28),
  .news__list[data-page="7"] .news__item:nth-child(-n + 33) {
    display: block;
  }

  .news__btns {
    display: flex;
    justify-content: center;
    color: var(--brand-color);
  }

  .news__show-more-btn {
    margin-block: 1.5rem;
  }

  .news__show-more-btn[hidden] {
    display: none;
  }
}

@media (max-width: 37.5em) {
  a.news__container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .news__image {
    max-width: 25rem;
  }
}
