/* Blackpdf — Blog
   Matches homepage section conventions (DM Sans, coral accent #ff6154,
   42px section titles, neutral grays).
   Linked from /app/blog pages via /css/blog.css. */

.blog-hero {
    text-align: center;
    padding: 96px 40px 56px;
    max-width: 920px;
    margin: 0 auto;
}

.blog-hero .section-label {
    color: #ff6154;
}

.blog-hero h1 {
    font-size: 64px;
    font-weight: 800;
    margin: 18px 0 22px;
    line-height: 1.05;
    letter-spacing: -1.5px;
    color: #1a1a1a;
}

.blog-hero p {
    font-size: 20px;
    color: #555;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 620px;
    font-weight: 400;
}

/* Category chips */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 1080px;
    margin: 0 auto 56px;
    padding: 0 24px;
}

.blog-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-chip:hover {
    background: #e5e7eb;
    color: #1a1a1a;
}

.blog-chip.is-active {
    background: #1a1a1a;
    color: #fff;
}

/* ── Hero row: featured + side stack ─────────────────────── */
.blog-feature-row {
    max-width: 1180px;
    margin: 0 auto 32px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.blog-side-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    min-height: 0;
}

/* Featured card — text-dominant, with a small contained 16:9 thumb
   that sits to the right with padding. The thumb is a fixed-size
   block rather than a stretched edge-to-edge band; the card height
   is now driven by the text content. */
.blog-featured-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    align-items: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-featured-card:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.blog-featured-thumb {
    width: 160px;
    aspect-ratio: 16 / 9;
    margin: 24px 24px 24px 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff1ef 0%, #ffe1dc 50%, #ffd4cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-featured-thumb-letter {
    font-size: 48px;
    font-weight: 800;
    color: #ff6154;
    opacity: 0.22;
    letter-spacing: -2px;
    line-height: 1;
    user-select: none;
}

.blog-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blog-featured-body {
    padding: 30px 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #fff1ef;
    color: #ff6154;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    align-self: flex-start;
}

.blog-featured-card h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.4px;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.blog-featured-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #525866;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Side card — text-dominant, with a small contained 16:9 thumb that
   sits to the right with padding. Same pattern as the featured card,
   scaled down: 120px wide × 67.5px tall, contained image. */
.blog-side-card {
    display: grid;
    grid-template-columns: 1fr auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    align-items: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-side-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.blog-side-card-thumb {
    width: 120px;
    aspect-ratio: 16 / 9;
    margin: 16px 16px 16px 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff1ef 0%, #ffe1dc 50%, #ffd4cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-side-card-thumb-letter {
    font-size: 32px;
    font-weight: 800;
    color: #ff6154;
    opacity: 0.22;
    line-height: 1;
    user-select: none;
}

.blog-side-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blog-side-card-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.blog-side-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: #1a1a1a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.blog-meta-sep {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
}

/* Grid for non-featured posts */
.blog-grid-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 120px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

/* Grid card — text-dominant. Tag + small inline thumb sit in a header
   row at the top; the title and description get the remaining space. */
.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 22px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.blog-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.blog-card-thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-card-thumb-letter {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    opacity: 0.45;
    line-height: 1;
    user-select: none;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    align-self: flex-start;
}

.blog-card-body h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.blog-card-body p {
    font-size: 14px;
    line-height: 1.55;
    color: #6b7280;
    margin: 0 0 18px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-empty {
    text-align: center;
    padding: 64px 24px 120px;
    color: #6b7280;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 960px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
    .blog-feature-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .blog-side-stack {
        grid-template-rows: auto;
        grid-template-columns: 1fr 1fr;
    }
    .blog-featured-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .blog-featured-thumb {
        display: none;
    }
    .blog-featured-body {
        padding: 26px 28px 30px;
    }
    .blog-featured-card h2 {
        font-size: 22px;
    }
    .blog-hero h1 {
        font-size: 44px;
        letter-spacing: -1px;
    }
    .blog-hero p {
        font-size: 17px;
    }
    .blog-hero {
        padding: 64px 24px 40px;
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-side-stack {
        grid-template-columns: 1fr;
    }
    .blog-side-card-thumb {
        width: 96px;
        margin: 12px 12px 12px 0;
    }
    .blog-side-card-thumb-letter {
        font-size: 26px;
    }
    .blog-side-card-body {
        padding: 16px 18px;
    }
    .blog-side-card-body h3 {
        font-size: 16px;
    }
    .blog-hero h1 {
        font-size: 34px;
    }
    .blog-featured-body {
        padding: 22px 24px 26px;
    }
    .blog-featured-card h2 {
        font-size: 22px;
    }
}
