/* =========================================
   POSTS / BLOG CARDS
   Location: wp-content/themes/jnscorp-theme/css/posts.css
========================================= */

.posts-section{
  padding: 100px 40px;
}


.site-main--posts {
  padding: 48px 20px 72px;
}


.posts-archive {
  width: 100%;
}

.posts-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Dynamic columns */
.posts-archive__grid--three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.posts-archive__grid--two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.posts-archive__grid--two-cols .post-card__image-link {
  max-height: 280px;
}

.posts-archive__grid--two-cols .post-card__image {
  height: 250px;
  aspect-ratio: 16 / 9;
}

.posts-archive__grid--one-col {
  grid-template-columns: minmax(0, 600px);
  justify-content: center;
}

.post-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  flex: 1 0 0;
  gap: 20px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.post-card:hover,
.post-card:focus-within {
  border-color: #a0ae76;
  background: #fff;
  box-shadow: 0 4px 16px 0 rgba(21, 27, 11, 0.05);
  transform: translateY(-3px);
}

.post-card__image-link {
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  max-height: 200px;
}

.post-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 392 / 210;
  object-fit: cover;
  height: 200px;
}

.post-card__image--placeholder {
  background: linear-gradient(
    135deg,
    rgba(160, 174, 118, 0.18),
    rgba(255, 255, 255, 0.72)
  );
}

.post-card__meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-card__date {
  color: #67695c;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.post-card__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(86, 108, 49, 0.07);
  color: #566c31;
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.post-card__title {
  margin: 0;
  color: #1f270f;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 22px;
  font-style: normal;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: 0;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover,
.post-card__title a:focus,
.post-card__category:hover,
.post-card__category:focus {
  color: inherit;
}

.post-card__excerpt {
  overflow: hidden;
  color: #67695c;
  text-overflow: ellipsis;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  align-self: stretch;
}

.post-card__read {
  margin-top: auto;
  color: #1f270f;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.post-card__read:hover {
  color: #566c31;
}

.posts-archive .pagination {
  margin-top: 32px;
}

@media (max-width: 1100px) {
  .content-area--posts {
    grid-template-columns: minmax(0, 1fr);
  }

  .posts-archive__grid,
  .posts-archive__grid--three-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {

  .content-area--posts {
    width: calc(100% - 24px);
  }

  .posts-archive__grid,
  .posts-archive__grid--two-cols,
  .posts-archive__grid--three-cols,
  .posts-archive__grid--one-col,
  .posts-section .posts-archive__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .post-card {
    padding: 20px;
    gap: 16px;
  }

  .post-card__image,
  .posts-archive__grid--two-cols .post-card__image,
  .posts-section .post-card__image {
    aspect-ratio: 16 / 9;
    height: 200px;
  }

  .posts-section{
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .content-area--posts {
    width: calc(100% - 16px);
  }

  .post-card {
    padding: 18px;
    border-radius: 18px;
  }

  .post-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-card__title {
    font-size: 20px;
    line-height: 26px;
  }

  .post-card__excerpt {
    font-size: 14px;
    line-height: 22px;
  }

  .post-card__read {
    font-size: 15px;
  }
}
