/* ==========================================================================
   QUOTC — Blog page
   Uses tokens and components from main.css
   ========================================================================== */


/* Posts grid: 4 columns from 1200, 2 from 768, 1 below
   ========================================================================== */

.blog {
  padding-top: 56px;
}

.posts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px 24px;
}

.post-card__link {
  display: block;
}

.post-card__media {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: var(--q-surface-soft);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease-out;
}

.post-card__title,
.post-card__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.post-card__title {
  margin-top: 20px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color var(--q-ease);
}

.post-card__text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 24px;
  color: var(--q-muted);
}

@media (hover: hover) {
  .post-card__link:hover .post-card__media img {
    transform: scale(1.04);
  }

  .post-card__link:hover .post-card__title {
    color: var(--q-action);
  }
}

.blog .pagination {
  margin-top: 64px;
}

@media (max-width: 1199px) {
  .posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .blog {
    padding-top: 40px;
  }

  .posts {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .post-card__title {
    margin-top: 16px;
    font-size: 18px;
    line-height: 26px;
  }

  .blog .pagination {
    margin-top: 48px;
  }
}
