html, body { overflow-x: hidden; }

/* ========== BLOG PAGE - Post List ========== */
.blog .site-main,
.archive .site-main {
  max-width: 1400px; margin: 0 auto; padding: 40px 20px;
}

/* Hide Hello World post */
.blog .post-3 { display: none !important; }

/* ===== BLOG GRID: 4-col desktop ===== */
.blog .ast-row,
.archive .ast-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Fix: Astra clearfix pseudo-elements become grid items — hide them */
.blog .ast-row::before, .blog .ast-row::after,
.archive .ast-row::before, .archive .ast-row::after {
  display: none !important;
}

.blog .ast-row > article,
.archive .ast-row > article {
  width: 100% !important; max-width: 100% !important;
  padding-left: 0 !important; padding-right: 0 !important;
  flex: none !important; float: none !important;
  box-sizing: border-box;
}

/* Tablet 2-col: 600px to 1199px */
@media (min-width: 600px) and (max-width: 1199px) {
  .blog .site-main, .archive .site-main { padding: 20px !important; }
  .blog .ast-row, .archive .ast-row { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .blog article, .archive article {
    border-radius: 12px !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important;
    border-bottom: none !important;
  }
}

/* Mobile 1-col edge-to-edge: under 600px */
@media (max-width: 599px) {
  .blog .site-main, .archive .site-main { padding: 0 0 20px !important; }
  .blog .ast-row, .archive .ast-row { grid-template-columns: 1fr; gap: 16px; }
  .blog article, .archive article {
    border-radius: 0 !important;
    box-shadow: none !important;
    border-bottom: 1px solid #eee;
  }
}

/* ===== CARD: flex column, equal height ===== */
.blog article, .archive article {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%; display: flex; flex-direction: column;
}
.blog .ast-article-inner, .archive .ast-article-inner {
  display: flex; flex-direction: column; flex: 1; height: 100%;
}
.blog .post-content.ast-col-md-12, .archive .post-content.ast-col-md-12 {
  display: flex; flex-direction: column; flex: 1; padding: 0; width: 100% !important;
}

/* Fixed image height: 220px */
.blog .ast-blog-featured-section, .archive .ast-blog-featured-section {
  flex-shrink: 0; height: 220px; overflow: hidden;
}
.blog .post-thumbnail, .archive .post-thumbnail {
  height: 220px; overflow: hidden; display: block;
}
.blog article .post-thumbnail img, .archive article .post-thumbnail img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Title: 2 lines */
.blog .entry-title.ast-blog-single-element, .archive .entry-title.ast-blog-single-element {
  padding: 14px 16px 6px; margin: 0;
  font-size: 0.98rem; font-weight: 700; line-height: 1.45;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  flex-shrink: 0;
}

/* Meta */
.blog .entry-header.ast-blog-meta-container, .archive .entry-header.ast-blog-meta-container {
  padding: 8px 16px; font-size: 0.75rem; color: #999;
  height: 44px; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center;
}

/* Excerpt: 3 lines */
.blog .ast-excerpt-container, .archive .ast-excerpt-container {
  padding: 0 16px; font-size: 0.86rem; color: #555; line-height: 1.6;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; flex-shrink: 0;
}
.blog .ast-excerpt-container p, .archive .ast-excerpt-container p { margin: 0; }

/* Read More: pinned to bottom */
.blog .ast-read-more-container, .archive .ast-read-more-container {
  margin-top: auto; padding: 12px 16px 16px;
}
.blog .read-more-link, .archive .read-more-link,
.blog .more-link, .archive .more-link {
  display: inline-block; padding: 7px 16px; background: #e8640c;
  color: #fff !important; border-radius: 6px; font-size: 0.82rem;
  font-weight: 600; text-decoration: none !important;
}

/* Single post */
.single .entry-content { max-width: 820px; margin: 0 auto; padding: 0 20px; }
.single .entry-content h2 { font-size: 1.35rem; margin-top: 2rem; }
.single .post-thumb-img-content.post-thumb {
  max-width: 820px; margin: 0 auto 32px !important;
}
.single .post-thumb-img-content.post-thumb img.wp-post-image {
  width: 100%; height: auto; display: block; border-radius: 12px;
}
.single h1.entry-title { text-align: center; }
.single .entry-meta { text-align: center; justify-content: center; }

.ast-archive-description, .page-title { padding: 20px 0; }