/**
 * Blog index + category archive layout (card grid).
 * Used on /news/ and category pages like /guides/, /trends/, etc.
 */

.blog #primary .row.medium-padding30 {
  padding-top: 2rem !important;
  padding-bottom: 3rem !important;
}

.blog .content-main-sidebar {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog .post-standard {
  background: #ffffff !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog .post-standard:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.blog .post-thumb-wrap {
  margin: 0;
  overflow: hidden;
}

.blog .post-thumb {
  overflow: hidden;
}

.blog .post-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.blog .post-standard:hover .post-thumb img {
  transform: scale(1.02);
}

.blog .post__content {
  padding: 20px 22px 22px;
}

.blog .post-card-meta {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #64748b;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog .post-card-meta__category {
  font-weight: 600;
  text-transform: capitalize;
  color: #1dbb99;
}

.blog .post-card-meta__sep {
  color: #cbd5e1;
  user-select: none;
}

.blog .post__content-info .post__title {
  font-size: 1.1em;
  line-height: 1.35;
  margin: 0 0 10px;
}

.blog .post__content-info .post__title a {
  color: #0f172a;
  text-decoration: none;
}

.blog .post__content-info .post__title a:hover {
  color: #1dbb99;
}

/* Card view: title, meta, and short excerpt only */
.blog .post__content-info > * {
  display: none !important;
}

.blog .post__content-info > .post-card-meta {
  display: flex !important;
}

.blog .post__content-info > h2.post__title {
  display: block !important;
}

.blog .post__content-info > p:first-of-type {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 !important;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
}

.blog #primary .row {
  display: flex !important;
  flex-wrap: wrap;
}

.blog #primary .col-lg-8 {
  flex: 1 1 100% !important;
  max-width: 100% !important;
}

.blog #primary .col-lg-4 {
  display: none !important;
}

.blog .blog-page-header {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.blog .blog-page-title {
  font-size: 1.75rem;
  line-height: 1.25;
  margin: 0 0 6px;
  color: #0f172a;
  font-weight: 700;
}

.blog .blog-page-subtitle {
  font-size: 0.9375rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.blog main > .row,
.blog main > .screen-reader-text {
  grid-column: 1 / -1;
}

.blog main > .row {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

/* Featured article on page 1 of main blog */
.blog:not(.paged) .content-main-sidebar > article:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 0;
  background: #fff !important;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog:not(.paged) .content-main-sidebar > article:first-child:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.blog:not(.paged) .content-main-sidebar > article:first-child .post-thumb-wrap {
  order: 0;
}

.blog:not(.paged) .content-main-sidebar > article:first-child .post-thumb img {
  height: 280px;
}

.blog:not(.paged) .content-main-sidebar > article:first-child .post__content {
  order: 1;
  padding: 28px 32px;
}

.blog:not(.paged) .content-main-sidebar > article:first-child .post__content-info .post__title {
  font-size: 1.35em;
}

.blog:not(.paged) .content-main-sidebar > article:first-child .post__content-info > p:first-of-type {
  -webkit-line-clamp: 3;
}

@media (max-width: 992px) {
  .blog .content-main-sidebar {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog:not(.paged) .content-main-sidebar > article:first-child {
    grid-template-columns: 1fr;
  }

  .blog:not(.paged) .content-main-sidebar > article:first-child .post-thumb img {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .blog .content-main-sidebar {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blog .blog-page-title {
    font-size: 1.5rem;
  }
}
