/* Home page layout tweaks on top of the pradeepdive.com layout:
   - Latest News is a 3-across grid of six picture-first stories.
   - The sidebar (sign-up + categories) stretches to the grid's height, so neither
     column leaves an empty gap inside the page.
   - Explore by Category tiles fill the whole row. */

/* Both columns end at the same line. */
.latest-news-row { align-items: stretch; }
.latest-news-col { min-height: 100%; }
.home-sidebar { position: static; height: 100%; }

/* Latest News grid: equal-height picture cards, two rows of three. */
.latest-grid { grid-auto-rows: 1fr; flex: 1; }
.article-card.tile .article-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.article-card.tile .article-title { font-size: 1.02rem; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.article-card.tile .article-excerpt { font-size: .86rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.article-card.tile .article-meta { margin-top: auto; font-size: .78rem; }

/* Compact sign-up box: email and button side by side. */
.subscribe-card { gap: 10px; padding: 20px; }
.subscribe-card h3 { font-size: 1.22rem; }
.subscribe-card p { font-size: .86rem; margin: 0; }
.subscribe-card form { flex-direction: row; gap: 8px; }
.subscribe-card input { flex: 1; min-width: 0; }
.subscribe-card button { white-space: nowrap; padding: .7rem 1rem; }
.subscribe-icon { width: 36px; height: 36px; }

/* Categories fill the rest of the column, rows spread evenly. */
.categories-card { flex: 1; display: flex; flex-direction: column; padding-bottom: 12px; }
.categories-card .category-list { flex: 1; justify-content: space-around; }

/* Explore by Category: as many equal tiles as there are topics, edge to edge. */
.category-tile-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Narrow screens: one column, sidebar back to its natural height. */
@media (max-width: 1100px) {
  .home-sidebar { height: auto; }
  .categories-card .category-list { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .subscribe-card form { flex-direction: column; }
}
