/* ==========================================================================
   SmartWOD Blog — loaded on top of style.css on /blog and /post pages only
   ========================================================================== */

/* ---------- Blog hero (index + category pages) ---------- */

.blog-hero {
    background: var(--ink);
    color: var(--text-inverse);
    padding: 9rem 0 3.5rem;
}

.blog-hero .section__lead {
    color: var(--muted-inverse);
}

.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.blog-cats a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--text-inverse);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.blog-cats a:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.blog-cats a[aria-current='page'] {
    background: var(--brand);
    border-color: var(--brand);
}

/* ---------- Post cards (index, categories, related) ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 980px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: #fff;
    border: 1px solid rgba(17, 16, 18, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.post-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.post-card figure {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--paper-dim);
}

.post-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.4rem 1.5rem;
}

.post-card__meta {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.post-card__meta time {
    color: var(--muted);
}

.post-card__title {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.45rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.post-card__excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Article ---------- */

.post-header {
    padding: 9rem 0 0;
}

.post-meta {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.post-meta a {
    color: var(--brand);
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

.post-title {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: clamp(2.4rem, 6vw, 4rem);
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-top: 0.6rem;
    max-width: 24ch;
}

.post-lang-switch {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.post-lang-switch a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.post-lang-switch a:hover {
    text-decoration: underline;
}

.post-cover {
    margin-top: 2.25rem;
}

.post-cover img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-body {
    padding: 2.75rem 0 1rem;
}

.post-body > * + * {
    margin-top: 1.1rem;
}

.post-body h2 {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-top: 2.5rem;
}

.post-body h3,
.post-body h4 {
    font-family: var(--font-display);
    font-weight: normal;
    font-size: 1.45rem;
    line-height: 1.12;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-top: 2rem;
}

.post-body a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-body a:hover {
    color: var(--brand-strong);
}

.post-body ul,
.post-body ol {
    padding-left: 1.4rem;
    display: grid;
    gap: 0.45rem;
}

.post-body ul {
    list-style: disc;
}

.post-body ol {
    list-style: decimal;
}

.post-body blockquote {
    border-left: 4px solid var(--brand);
    padding: 0.35rem 0 0.35rem 1.25rem;
    color: var(--muted);
    font-size: 1.15rem;
}

.post-body figure {
    margin: 2rem 0;
}

.post-body figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.post-body figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.post-body hr {
    border: 0;
    border-top: 1px solid rgba(17, 16, 18, 0.12);
    margin: 2.5rem 0;
}

.post-footer {
    padding: 2rem 0 3.5rem;
}

.post-footer a {
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.post-footer a:hover {
    text-decoration: underline;
}

/* ---------- CTA button row ---------- */

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.75rem;
}

/* ---------- Related posts ---------- */

.related .section__title {
    margin-bottom: 2rem;
}

/* ---------- Load-more fallback ---------- */

.blog-empty {
    color: var(--muted);
    padding: 2rem 0;
}
