/* Homepage Blog Grid — minimal styling
   3 columns desktop, 2 columns tablet, 1 column phone.
   Adjust colors/fonts to match your theme. */

.hbg-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

.hbg-heading {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

/* The grid of post cards: 3 per row on desktop */
.hbg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.hbg-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ececec;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.hbg-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.hbg-thumb-link {
    display: block;
    line-height: 0;
}

.hbg-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.hbg-thumb-placeholder {
    background: #f2f2f2;
}

.hbg-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hbg-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 6px;
}

.hbg-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.hbg-card-title a:hover {
    text-decoration: underline;
}

.hbg-card-meta {
    font-size: 0.78rem;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hbg-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 14px;
    flex-grow: 1;
}

.hbg-read-more {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    align-self: flex-start;
}

.hbg-read-more:hover {
    text-decoration: underline;
}

/* Pagination */
.hbg-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hbg-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.hbg-pagination .page-numbers.current {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.hbg-pagination .page-numbers:hover:not(.current) {
    border-color: #999;
}

/* Sidebar (Google AdSense widget area) */
.hbg-sidebar {
    position: sticky;
    top: 24px;
}

.hbg-widget {
    margin-bottom: 24px;
}

.hbg-widget-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 8px;
}

/* Tablet: 2 columns, sidebar still on the right if there's room,
   otherwise stacks below at the phone breakpoint */
@media (max-width: 900px) {
    .hbg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phone: 1 column, sidebar stacks below content */
@media (max-width: 600px) {
    .hbg-wrap {
        grid-template-columns: 1fr;
    }
    .hbg-grid {
        grid-template-columns: 1fr;
    }
    .hbg-sidebar {
        position: static;
    }
}
