/*
 * Blog index - page-specific stylesheet
 * ALL rules scoped to .bl - zero impact on other pages
 * Fonts: site fonts only
 */

/* ═══════════════════════════════════════════
   CUSTOM PROPERTIES
═══════════════════════════════════════════ */
.bl {
    --bl-green: #1B3A2D;
    --bl-terra: #C8714A;
    --bl-cream: #FAF7F0;
    --bl-text:  #2E2A24;
    --bl-muted: #6B6560;

    background: var(--bl-cream);
    color: var(--bl-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.bl *, .bl *::before, .bl *::after { box-sizing: border-box; }
.bl img  { display: block; max-width: 100%; }
.bl a    { color: inherit; text-decoration: none; }
.bl p    { margin: 0 0 0.75rem; }
.bl p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════ */
.bl-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ═══════════════════════════════════════════
   1. HERO - full-width
═══════════════════════════════════════════ */
.bl-hero {
    background: var(--bl-green);
    padding: 80px 24px;
    text-align: center;
}

.bl-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.bl-hero-h1 {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 600;
    color: var(--bl-cream);
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin: 0 0 20px;
}

.bl-hero-p {
    color: rgba(250, 247, 240, 0.75);
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0;
}

/* ═══════════════════════════════════════════
   2. POSTS GRID
═══════════════════════════════════════════ */
.bl-posts {
    background: var(--bl-cream);
    padding: 60px 0;
}

.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* ─── Card ─── */
.bl-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

/* 16:9 image wrapper using padding trick */
.bl-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}

.bl-card-img-wrap::before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.bl-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bl-card-placeholder {
    position: absolute;
    inset: 0;
    background: rgba(27, 58, 45, 0.15);
}

/* ─── Card body ─── */
.bl-card-body {
    background: #fff;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

.bl-card-date {
    display: block;
    font-size: 12px;
    color: var(--bl-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bl-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
}

.bl-card-title a {
    color: var(--bl-green);
    transition: color 0.25s ease;
}

.bl-card-title a:hover {
    color: var(--bl-terra);
}

.bl-card-excerpt {
    font-size: 14px;
    color: var(--bl-muted);
    line-height: 1.6;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-card-read-more {
    display: inline-block;
    color: var(--bl-terra);
    font-size: 13px;
    transition: opacity 0.25s ease;
}

.bl-card-read-more:hover {
    opacity: 0.75;
}

/* No posts */
.bl-no-posts {
    text-align: center;
    color: var(--bl-muted);
    font-size: 1rem;
    padding: 60px 0;
    margin: 0;
}

/* ═══════════════════════════════════════════
   3. PAGINATION
═══════════════════════════════════════════ */
.bl-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.bl-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--bl-green);
    color: var(--bl-green);
    font-size: 0.875rem;
    transition: background 0.25s ease, color 0.25s ease;
    text-decoration: none;
}

.bl-pagination .page-numbers:hover {
    background: var(--bl-green);
    color: #fff;
}

.bl-pagination .page-numbers.current {
    background: var(--bl-green);
    color: #fff;
}

.bl-pagination .page-numbers.dots {
    border: none;
    width: auto;
    padding: 0 4px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   RESPONSIVE - 1024px
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .bl-container { padding: 0 32px; }
    .bl-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE - 768px
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .bl-container { padding: 0 20px; }
    .bl-posts { padding: 48px 0; }
    .bl-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ═══════════════════════════════════════════
   RESPONSIVE - 480px (covers 360px+)
═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .bl-container { padding: 0 16px; }
    .bl-hero { padding: 60px 16px; }
    .bl-posts { padding: 40px 0; }
}
