/* Blog (/portal/blog) — extends the shared design tokens from style.css
   (--bg, --surface, --surface-highlight, --border, --text-main, --text-muted,
   --accent, --font). Only blog-specific layout/typography lives here. */

.blog-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 140px 24px 80px;
}

.blog-hero {
    text-align: center;
    margin-bottom: 56px;
}

.blog-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.blog-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto;
}

/* ── Category filter pills ── */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 32px 0 48px;
}

.blog-filter-pill {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple), background 0.2s var(--ease-apple);
}

.blog-filter-pill:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.blog-filter-pill.active {
    background: var(--accent);
    color: #050507;
    border-color: var(--accent);
}

/* ── Post grid / cards ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.25s var(--ease-apple), border-color 0.25s var(--ease-apple);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
}

.blog-card-image {
    aspect-ratio: 16 / 9;
    background: var(--surface-highlight) center/cover no-repeat;
}

/* ── Default artwork for posts without a header image: a CSS-only blocky
   "grass block" motif (no game assets used — just a pixel-grid pattern +
   a dirt-toned gradient) so cards/heroes never look bare. ── */
.blog-placeholder-art {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #4a7c2f;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.16) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 18px 18px, 18px 18px, 18px 18px, 18px 18px;
    background-position: 0 0, 0 0, 9px 9px, 9px 9px;
    overflow: hidden;
}

.blog-placeholder-art::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    background: linear-gradient(to bottom, rgba(80, 51, 27, 0) 0%, rgba(80, 51, 27, 0.85) 45%, #50331b 100%);
}

.blog-placeholder-art::before {
    content: 'Tick.';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.blog-card-image.placeholder {
    padding: 0;
}

.blog-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.blog-card-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    flex: 1;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.blog-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
}

/* ── Pagination (Laravel's default Bootstrap-ish markup) ── */
.blog-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.blog-pagination nav > .flex,
.blog-pagination .pagination {
    display: flex;
    gap: 6px;
    list-style: none;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.blog-pagination a:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Single article ── */
.blog-article-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.blog-article-category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 16px;
}

.blog-article-header h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 18px;
}

.blog-article-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-article-image {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 21 / 9;
    margin: 0 auto 48px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.blog-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
}

.blog-article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 44px 0 18px;
}

.blog-article-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 36px 0 14px;
}

.blog-article-body p {
    margin-bottom: 20px;
    color: rgba(245, 245, 247, 0.88);
}

.blog-article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 20px 1.4rem;
    color: rgba(245, 245, 247, 0.88);
}

.blog-article-body li {
    margin-bottom: 8px;
}

.blog-article-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 12px 0 28px;
    border: 1px solid var(--border);
}

.blog-article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 20px;
    margin: 24px 0;
    color: var(--text-muted);
    font-style: italic;
}

.blog-article-body code {
    background: var(--surface-highlight);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'JetBrains Mono', monospace;
}

.blog-article-body pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    overflow-x: auto;
    margin: 0 0 28px;
}

.blog-article-body pre code {
    background: none;
    padding: 0;
}

.blog-article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.blog-related {
    max-width: 1000px;
    margin: 80px auto 0;
}

.blog-related h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

@media (max-width: 640px) {
    .blog-main {
        padding-top: 110px;
    }
}
