/* Styling for articles and articles in single.php */

.articles {
  background-color: var(--gray-10);
  padding-bottom: 10px;
}

.articles .nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.articles .nav h2 {
  margin: 0;
}

.articles .nav .buttons button {
  background-color: var(--gray-25);
  padding: 4px 12px;
  border-radius: 16px;
  margin-bottom: 0;
  font-size: 14px;
}

.articles .nav .buttons button:active {
  background-color: var(--foreground);
  color: var(--background);
}

.articles .nav .buttons button:focus {
  text-decoration: underline;
}
.articles .nav .buttons button:hover {
  text-decoration: underline;
}

.articles .nav .buttons .prev::before {
  content: url(../images/icon-button-left_black.svg);
  margin-right: 11px;
}

.articles .nav .buttons .next::after {
  content: url(../images/icon-button-right_black.svg);
  margin-left: 11px;
}

.articles .nav .buttons .prev:active::before {
  content: url(../images/icon-button-left_white.svg);
  margin-right: 11px;
}

.articles .nav .buttons .next:active::after {
  content: url(../images/icon-button-right_white.svg);
  margin-left: 11px;
}

.articles .articles-list.row {
  margin: 0;
  padding: 0;
  padding-top: 15px;
  overflow-x: scroll;
  display: flex;
  flex-direction: row;
  scroll-behavior: smooth;
}

/* width */
.articles .articles-list.row::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

/* Track */
.articles .articles-list.row::-webkit-scrollbar-track {
  background: var(--gray-10);
}

/* Handle */
.articles .articles-list.row::-webkit-scrollbar-thumb {
  background: var(--foreground);
}

.articles .articles-list.grid {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.articles .articles-list li {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-bottom: 32px;

  background-position: center;
  background-size: cover;
}

.articles .articles-list .post a {
  text-decoration: none;
  display: block;
  position: relative;
  background-color: var(--background);
  height: 100%;
}

.articles .articles__button {
  position: relative;
  display: flex;
  justify-self: flex-end;
  grid-column-start: 11;
  width: auto;
  margin-top: 16px;
  margin-right: 32px;
  padding: 8px 16px;
  padding-right: 48px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--background);
  background-color: var(--foreground);
  border-bottom: 1px solid transparent !important;
}
.articles .articles__button:hover {
  color: var(--foreground) !important;
  background-color: transparent !important;
  border-bottom: 1px solid var(--foreground) !important;
}
.articles .articles__button:after {
  position: absolute;
  content: "";
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background-image: url(../images/arrow_forward.svg);
  background-size: 28px;
  background-repeat: no-repeat;
}
.articles .articles__button:hover:after {
  filter: invert(1);
}
@media (min-width: 600px) {
  .articles .articles__button {
    margin-top: -40px;
    margin-right: 40px;
    padding: 12px 24px;
    padding-right: 60px;
  }
  .articles .articles__button:after {
    right: 20px;
  }
}

@media (min-width: 600px) and (prefers-reduced-motion: no-preference) {
  .articles .articles-list .post a {
    transition: transform 0.3s;
  }

  .articles .articles-list .post:hover a {
    transform: translate(-15px, -15px);
    transition: transform 0.3s;
  }
}

.articles .articles-list .post .post-text {
  padding: 16px;
}
.articles .articles-list .post .post-text h2 {
  margin: 4px 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.articles .articles-list .post .post-text p {
  margin: 4px 0;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.articles .articles-list .post .post-text .date {
  color: var(--disabled);
}

.articles .articles-list li .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* S */
@media (max-width: 479px) {
  /* 4 columns */
  .articles .nav {
    grid-column: 1 / 5;
  }
  .articles .nav .buttons {
    display: none;
  }

  .articles-list {
    grid-column: 1 / 5;
  }

  .articles .articles-list.row li {
    min-width: 300px;
    width: 300px;
    min-height: 400px;
    margin-right: 20px;
  }
  .articles .articles-list.row .post .image {
    width: 300px;
    height: 200px;
  }
  .articles .articles-list.row li h3 {
    position: relative;
    display: block;
    padding: 1.5rem;
    padding-bottom: 200px;
    font-weight: 400;
    font-size: 62px;
    line-height: 62px;
  }
  .articles .articles-list.row li h3::after {
    position: absolute;
    content: "";
    right: 1rem;
    bottom: 1rem;
    width: 5rem;
    height: 5rem;
    background-image: url(../images/arrow_forward.svg);
    background-size: 5rem;
    background-repeat: no-repeat;
    filter: invert(1);
  }

  /* ps */
  .articles .articles-list .post .post-text .body {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
  }
}

/* Above M */
@media (min-width: 600px) {
  .articles .spacing {
    padding: 60px 0;
  }
  .articles .nav {
    padding: 0 40px;
  }
  .articles .articles-list li {
    margin-left: 40px;
  }
}

@media (min-width: 600px) and (prefers-reduced-motion: no-preference) {
  .articles .articles-list li .image img {
    filter: grayscale(1);
    transition: filter 0.3s;
  }
  .articles .articles-list li:hover .image img {
    filter: grayscale(0);
    transition: filter 0.3s;
  }
}

/* M */
@media (min-width: 480px) and (max-width: 960px) {
  /* 8 columns */
  .articles .nav {
    grid-column: 1 / 9;
  }
  .articles-list {
    grid-column: 1 / 9;
  }

  .articles .articles-list.row li {
    width: 348px;
    min-width: 348px;
    min-height: 400px;
  }
  .articles .articles-list.row .post .image {
    width: 348px;
    height: 200px;
  }
  .articles .articles-list.row li h3 {
    position: relative;
    display: block;
    padding: 1.5rem;
    padding-bottom: 200px;
    font-weight: 400;
    font-size: 80px;
    line-height: 80px;
  }
  .articles .articles-list.row li h3::after {
    position: absolute;
    content: "";
    right: 1rem;
    bottom: 1rem;
    width: 6rem;
    height: 6rem;
    background-image: url(../images/arrow_forward.svg);
    background-size: 6rem;
    background-repeat: no-repeat;
    filter: invert(1);
  }

  /* ps */
  .articles .articles-list .post .post-text .body {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
  }
}

/* L - XL */
@media (min-width: 960px) {
  /* 12 columns */
  .articles .nav {
    grid-column: 1 / 13;
  }
  .articles-list {
    grid-column: 1 / 13;
  }

  .articles .articles-list.row li {
    min-width: 348px;
    width: 348px;
    min-height: 400px;
  }
  .articles .articles-list.row .post .image {
    width: 348px;
    height: 200px;
  }
  .articles .articles-list.row li h3 {
    position: relative;
    display: block;
    padding: 1.5rem;
    padding-bottom: 200px;
    font-weight: 400;
    font-size: 62px;
    line-height: 62px;
  }
  .articles .articles-list.row li h3::after {
    position: absolute;
    content: "";
    right: 1rem;
    bottom: 1rem;
    width: 5rem;
    height: 5rem;
    background-image: url(../images/arrow_forward.svg);
    background-size: 5rem;
    background-repeat: no-repeat;
    filter: invert(1);
  }

  /* ps */
  .articles .articles-list .post .post-text .body {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
  }
}
