/*--------------------------------------------------------------
>>> TABLE OF CONTENTS: POSTGRID Styling
1. Post articles card elements
----------------------------------------------------------------*/

.newsroom-grid {
  display: grid;
  row-gap: 1.5rem;
  -moz-column-gap: 1.5rem;
  column-gap: 1.5rem;
  grid-template-rows: auto;
  grid-template-columns: repeat(auto-fill, minmax(364px, 1fr));
  justify-items: stretch;
  align-items: start;
  overflow: hidden;
}
section .newsroom-grid.reduced {
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
}
.desktop .newsroom-grid.reduced {
  max-height: 640px;
}

/* Seller Stories news grid*/
.newsroom-grid.seller-story-grid article.first-post {
  grid-column: span 2;
  min-height: unset;
}
section .newsroom-grid.seller-story-grid.reduced {
  content-visibility: auto;
  contain-intrinsic-size: auto auto;
}
.desktop .newsroom-grid.seller-story-grid.reduced {
  max-height: unset;
  align-items: stretch;
}

.newsroom-grid.seller-story-grid h2.entry-title,
.newsroom-grid.seller-story-grid h3.entry-title {
  min-height: unset;
  max-height: unset;
  -webkit-line-clamp: 1;
  word-break: break-all;
}

.newsroom-grid.seller-story-grid h2.entry-title a,
.newsroom-grid.seller-story-grid h3.entry-title a {
  min-height: unset;
  max-height: unset;
}

article:not(.single-post) {
  border: var(--border);
  border-radius: 12px;
}

article.first-post {
  grid-column: 1 / -1;
  overflow: hidden;
  min-height: 295px;
  max-height: 295px;
  align-items: stretch;
}

.newsroom-grid article.first-post {
  grid-column: 1 / -1;
  overflow: hidden;
  min-height: 295px;
  max-height: 295px;
}

/* 1b. Post articles card elements */
/* Container content general */
.post-thumbnail {
  /* height: 200px;
  max-height: 200px;
  min-height: 200px; */
  aspect-ratio: 780 / 280;
  overflow: hidden;
  display: block;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
}

.post-thumbnail img {
  border-radius: 12px 12px 0 0;
  -o-object-fit: cover;
  object-fit: cover;
  height: 100%;
  width: 100%;
  transition: transform 295ms var(--bezier-nobounce);
}

.mobile .post-thumbnail {
  height: 160px;
  max-height: 160px;
  min-height: 160px;
  aspect-ratio: unset;
}

@media (hover: hover) and (pointer: fine) {
  .post-thumbnail:hover img {
    transform: scale(1.15);
  }
}

article:not(.single-post) .entry-content {
  padding: 0 2rem;
  padding-bottom: 1.5rem;
}

/* Categories */
.post-categories {
  list-style: none;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
}
.post-categories > li {
  font-size: 14px;
  border-radius: 3px;
  margin-right: 0.75em;
  background: var(--very-light-grey-clr);
  display: inline-flex;
  margin-bottom: 1rem;
}
.post-categories > li > a {
  padding: 3px 8px;
}

/* Title */
h2.entry-title,
h3.entry-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 130%;
  min-height: 3.25rem;
  max-height: 3.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

h2.entry-title a,
h3.entry-title a {
  min-height: 3.5rem;
  max-height: 3.5rem;
}

/* Excerpt */
.newsroom-grid .entry-excerpt,
article.seller-story-store .entry-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* First / Featured Post */
article.first-post .post-thumbnail {
  height: 100%;
  border-radius: 12px 0 0 12px;
  max-height: unset;
  min-height: unset;
  aspect-ratio: unset;
}

article.first-post .post-thumbnail img {
  border-radius: 12px 0 0 12px;
}

article.first-post h2.entry-title,
article.first-post h3.entry-title {
  min-height: 1.75rem;
  max-height: 1.75rem;
  -webkit-line-clamp: 1;
  margin-bottom: 0.5rem;
}

article.first-post.seller-story-store h2.entry-title,
article.first-post.seller-story-store h3.entry-title {
  margin-top: 0;
}

article.first-post .entry-content {
  padding: 2rem 0;
  align-self: center;
}
article.first-post .entry-content-wrapper {
  padding: 0 2rem;
}

/* Read article */
.article-read-more {
  width: 160px;
  padding-right: 3px;
  padding-left: 15px;
}
.article-read-more > .white-icon {
  width: 32px;
  height: 32px;
  background-color: var(--very-light-grey-clr);
}

@media screen and (max-width: 37.5rem) {
  .newsroom-grid {
    row-gap: 1rem;
  }

  section .newsroom-grid.reduced {
    grid-template-rows: repeat(3, 1fr);
    max-height: unset;

    contain-intrinsic-size: auto 875px;
  }
  section .newsroom-grid article:nth-child(n + 4),
  section .newsroom-grid article:nth-child(n + 5) {
    display: none;
  }
  section.section-newsroom .section-title {
    justify-content: space-between;
  }

  article:not(.single-post),
  h2.entry-title,
  h3.entry-title {
    min-height: unset !important;
    max-height: unset !important;
  }
  article:not(.single-post) .entry-content {
    padding: 0 1rem;
    padding-bottom: 1rem;
  }
}

@media screen and (min-width: 37.5rem) and (max-width: 62rem) {
  section .newsroom-grid {
    row-gap: 0rem;
    -moz-column-gap: 1.5rem;
    column-gap: 1.5rem;
  }

  body.mobile section .newsroom-grid {
    row-gap: 1.5rem;
  }

  section.newsroom-grid {
    row-gap: 1.5rem;
    column-gap: 1.5rem;
  }

  article:not(.single-post) .entry-content-wrapper > p {
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media screen and (min-width: 37.5rem) {
  body.mobile .newsroom-grid > .post:nth-child(n + 5) {
    display: none;
  }
}
