/* ============================================================
   BLOG — Shared Styles (listing + post)
   ============================================================ */

/* ── Page shell ─────────────────────────────────────────────── */
.blog-page {
    min-height: 100vh;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
}

/* ── Blog Navbar ─────────────────────────────────────────────── */
.blog-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 5%;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.blog-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.blog-nav-logo-circle {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.blog-nav-logo-circle img {
    border-radius: 5px;
}

.blog-nav-wordmark {
    font-weight: 700;
    font-size: 18px;
    color: var(--midnight);
    letter-spacing: -0.3px;
}

.blog-nav-wordmark span {
    color: var(--primary);
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.blog-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-nav-links a:hover,
.blog-nav-links a.active {
    color: var(--midnight);
}

.blog-nav-cta {
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border-radius: 8px;
    padding: 9px 20px;
    text-decoration: none;
    transition: background 0.2s;
}

.blog-nav-cta:hover {
    background: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════════════════
   BLOG LISTING PAGE
   ═══════════════════════════════════════════════════════════════ */

.blog-hero {
    padding: 140px 5% 72px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.blog-hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}

.blog-hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(36px, 5vw, 60px);
    color: var(--midnight);
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.blog-hero p {
    font-size: 18px;
    color: var(--muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Post Grid ──────────────────────────────────────────────── */
.blog-grid-section {
    padding: 0 5% 100px;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

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

    .blog-hero {
        padding: 120px 5% 48px;
    }

    .blog-nav-links {
        display: none;
    }
}

/* ── Post Card ──────────────────────────────────────────────── */
.post-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(43, 142, 240, 0.1);
}

.post-card-cover {
    height: 180px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Cover gradients cycle by card index */
.post-card:nth-child(3n+1) .post-card-cover {
    background: linear-gradient(135deg, #1a3a5c 0%, #2B8EF0 100%);
}

.post-card:nth-child(3n+2) .post-card-cover {
    background: linear-gradient(135deg, #064e3b 0%, #10B981 100%);
}

.post-card:nth-child(3n) .post-card-cover {
    background: linear-gradient(135deg, #3b1d7a 0%, #8B5CF6 100%);
}

.post-card-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
}

.post-card-category {
    position: relative;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.post-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    color: var(--midnight);
    line-height: 1.3;
    margin-bottom: 10px;
    flex: 0;
}

.post-card-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.post-card-author {
    font-weight: 600;
    color: var(--slate);
}

.post-card-info {
    display: flex;
    gap: 12px;
}

.post-card-read-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
}

.post-card:hover .post-card-read-link {
    gap: 9px;
}

/* ── Empty State ────────────────────────────────────────────── */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}

.blog-empty svg {
    opacity: 0.3;
    margin-bottom: 20px;
}

.blog-empty h3 {
    font-family: 'DM Serif Display', serif;
    color: var(--midnight);
    margin-bottom: 8px;
}

/* ── Loading skeleton ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.skeleton-cover {
    height: 180px;
}

.skeleton-body {
    padding: 24px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-line.w-80 {
    width: 80%;
}

.skeleton-line.w-60 {
    width: 60%;
}

.skeleton-line.w-40 {
    width: 40%;
}

.skeleton-title {
    height: 22px;
    margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE POST PAGE
   ═══════════════════════════════════════════════════════════════ */

.post-header {
    padding: 120px 5% 60px;
    max-width: 740px;
    margin: 0 auto;
}

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.post-back:hover {
    color: var(--primary);
}

.post-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.post-category-pill {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-subtle);
    padding: 5px 12px;
    border-radius: 20px;
}

.post-read-time {
    font-size: 13px;
    color: var(--muted);
}

.post-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(30px, 4vw, 50px);
    color: var(--midnight);
    line-height: 1.12;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 18px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 32px;
}

.post-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.post-byline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.post-byline-name {
    font-weight: 600;
    color: var(--midnight);
    font-size: 15px;
}

.post-byline-date {
    font-size: 13px;
    color: var(--muted);
}

/* ── Cover Banner ───────────────────────────────────────────── */
.post-cover-banner {
    height: 340px;
    max-width: 900px;
    margin: 0 auto 0;
    border-radius: 20px;
    overflow: hidden;
}

.post-cover-banner .cover-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a3a5c 0%, #2b8ef0 60%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cover-blur-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
}

.cover-blur-circle.c1 {
    width: 280px;
    height: 280px;
    background: #fff;
    top: -60px;
    right: -40px;
}

.cover-blur-circle.c2 {
    width: 200px;
    height: 200px;
    background: #10B981;
    bottom: -40px;
    left: 60px;
}

/* ── Post Content ───────────────────────────────────────────── */
.post-content {
    max-width: 740px;
    margin: 60px auto 100px;
    padding: 0 5%;
    font-size: 17px;
    line-height: 1.8;
    color: var(--slate);
}

.post-content h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    color: var(--midnight);
    margin: 48px 0 16px;
    letter-spacing: -0.3px;
}

.post-content h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--midnight);
    margin: 36px 0 12px;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content ul,
.post-content ol {
    margin: 0 0 24px 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content strong {
    font-weight: 600;
    color: var(--midnight);
}

.post-content em {
    font-style: italic;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.post-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 4px 0 4px 20px;
    margin: 0 0 24px;
    color: var(--muted);
    font-style: italic;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.post-content code {
    background: var(--primary-subtle);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.post-content pre {
    background: var(--midnight);
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Post loading/error ─────────────────────────────────────── */
.post-loading,
.post-error {
    max-width: 740px;
    margin: 120px auto;
    padding: 0 5%;
    text-align: center;
    color: var(--muted);
}

.post-error h2 {
    font-family: 'DM Serif Display', serif;
    color: var(--midnight);
    margin-bottom: 12px;
}

/* ── Shared Blog Footer (old minimal — kept for reference) ──── */
.blog-footer {
    background: var(--midnight);
    padding: 40px 5%;
    text-align: center;
}

.blog-footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

.blog-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s;
}

.blog-footer a:hover {
    color: white;
}

/* ── Full site footer (blog pages) ──────────────────────────── */
.blog-footer-full {
    background: var(--midnight);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.blog-footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 5% 40px;
    display: grid;
    grid-template-columns: 1.6fr 2fr;
    gap: 48px;
}

@media (max-width: 768px) {
    .blog-footer-top {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.blog-footer-brand p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 12px;
    line-height: 1.6;
    max-width: 280px;
}

.blog-footer-cols {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.blog-footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 100px;
}

.blog-footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.blog-footer-col a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-footer-col a:hover {
    color: white;
}

.blog-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}