/* =========================================
   SBH Blog Grid  –  Senior Benefits Hub
   ========================================= */

/* ---------- Reset theme defaults ---------- */
.sbh-blog-wrap .page-content,
.sbh-blog-wrap .site-main { max-width: none; padding: 0; margin: 0; }

/* ---------- Hero ---------- */
.sbh-blog-hero {
    background: linear-gradient(135deg, #1B2A4A 0%, #2563eb 100%);
    padding: 56px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.sbh-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255,215,0,.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(37,99,235,.25) 0%, transparent 50%);
    pointer-events: none;
}
.sbh-blog-hero h1 {
    color: #fff;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 10px;
    position: relative;
}
.sbh-blog-hero p {
    color: rgba(255,255,255,.85);
    font-size: clamp(.95rem, 2vw, 1.15rem);
    margin: 0;
    position: relative;
    font-weight: 400;
}

/* ---------- Category Filter Bar ---------- */
.sbh-cat-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.sbh-cat-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 12px 0;
}
.sbh-cat-bar-inner::-webkit-scrollbar { display: none; }
.sbh-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid #e5e7eb;
    color: #4b5563;
    background: #fff;
    transition: all .2s ease;
    cursor: pointer;
}
.sbh-cat-pill:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.sbh-cat-pill.active {
    background: #1B2A4A;
    color: #fff;
    border-color: #1B2A4A;
}
.sbh-cat-pill .pill-count {
    font-size: .75rem;
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    border-radius: 9999px;
    font-weight: 500;
}
.sbh-cat-pill.active .pill-count {
    background: rgba(255,255,255,.2);
}

/* ---------- Grid Container ---------- */
.sbh-grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}
.sbh-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}
.sbh-results-text {
    font-size: .875rem;
    color: #6b7280;
}
.sbh-results-text strong {
    color: #1f2937;
}

/* ---------- Card Grid ---------- */
.sbh-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ---------- Card ---------- */
.sbh-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}
.sbh-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);
}

/* Card image */
.sbh-card-img {
    position: relative;
    width: 100%;
    padding-top: 56.25%;         /* 16:9 */
    overflow: hidden;
    background: #e5e7eb;
}
.sbh-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.sbh-card:hover .sbh-card-img img { transform: scale(1.05); }

/* Gradient placeholder */
.sbh-card-img .sbh-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* Category badge (below image, compact pill) */
.sbh-card-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    margin-bottom: 10px;
    width: auto;
}

/* Card body */
.sbh-card-body {
    padding: 18px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sbh-card-body h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sbh-card-body h3 a {
    color: inherit;
    text-decoration: none;
}
.sbh-card-body h3 a:hover { color: #2563eb; }
.sbh-card-excerpt {
    font-size: .875rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sbh-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sbh-card-readmore {
    font-size: .8rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s ease;
}
.sbh-card-readmore:hover { gap: 8px; }
.sbh-card-date {
    font-size: .75rem;
    color: #9ca3af;
}

/* ---------- Pagination ---------- */
.sbh-pagination {
    margin-top: 48px;
}
.sbh-pagination ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}
.sbh-pagination li { margin: 0; }
.sbh-pagination a.page-numbers,
.sbh-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}
.sbh-pagination a.page-numbers {
    color: #4b5563;
    background: #fff;
    border: 1.5px solid #e5e7eb;
}
.sbh-pagination a.page-numbers:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}
.sbh-pagination span.page-numbers.current {
    background: #1B2A4A;
    color: #fff;
    border: 1.5px solid #1B2A4A;
}
.sbh-pagination span.page-numbers.dots {
    color: #9ca3af;
    border: none;
    background: none;
    min-width: 30px;
}
.sbh-pagination a.prev,
.sbh-pagination a.next {
    font-weight: 700;
    padding: 0 16px;
}

/* ---------- Empty State ---------- */
.sbh-empty {
    text-align: center;
    padding: 80px 24px;
}
.sbh-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.sbh-empty h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin: 0 0 8px;
}
.sbh-empty p { color: #6b7280; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .sbh-card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
    .sbh-card-grid { grid-template-columns: 1fr; gap: 18px; }
    .sbh-blog-hero { padding: 40px 20px 36px; }
    .sbh-grid-wrap { padding: 20px 16px 40px; }
    .sbh-cat-bar { padding: 0 16px; }
    .sbh-card-body { padding: 16px 18px 20px; }
}
