/* Blog post layout — supplements calculator-body.css and ui-v2.css */

.blog-page {
    background: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

.blog-container {
    box-sizing: border-box;
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    width: 100%;
}

/* Breadcrumb */
.blog-breadcrumb {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.blog-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}
.blog-breadcrumb a:hover { color: #1a3d6e; }

/* Post header */
.post-header {
    margin-bottom: 36px;
}
.post-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a3d6e;
    background: #e8f0f8;
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 16px;
}
.post-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: 0;
    margin: 0 0 16px;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}
.post-meta-date { font-weight: 500; }
.post-meta-read {
    display: flex;
    align-items: center;
    gap: 5px;
}
.post-meta-read::before {
    content: "·";
    font-size: 18px;
    line-height: 1;
    color: #cbd5e1;
}

/* Hero image */
.post-hero {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 36px;
    background: linear-gradient(135deg, #0f2240 0%, #1a3d6e 100%);
    aspect-ratio: 16/7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.post-hero-inner {
    text-align: center;
    padding: 32px;
    position: relative;
    z-index: 1;
}
.post-hero-icon {
    font-size: 56px;
    margin-bottom: 12px;
    display: block;
}
.post-hero-label {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Body text */
.post-body {
    font-size: 17px;
    line-height: 1.75;
    color: #334155;
}
.post-body p { margin: 0 0 1.4em; }
.post-body h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0;
    margin: 2.2em 0 0.7em;
    padding-top: 0.4em;
    border-top: 2px solid #e2e8f0;
}
.post-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 1.6em 0 0.5em;
}
.post-body ul, .post-body ol {
    padding-left: 1.4em;
    margin: 0 0 1.4em;
}
.post-body li { margin-bottom: 0.5em; }
.post-body a {
    color: #1a3d6e;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-body a:hover { color: #3366aa; }
.post-body strong { color: #1e293b; }

/* Data tables */
.post-table-wrapper {
    overflow-x: auto;
    margin: 1.75em 0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.post-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}
.post-table thead {
    background: #1a3d6e;
    color: #fff;
}
.post-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}
.post-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}
.post-table tbody tr:last-child { border-bottom: none; }
.post-table tbody tr:nth-child(even) { background: #f8fafc; }
.post-table tbody tr:hover { background: #f0f7ff; }
.post-table td {
    padding: 11px 16px;
    vertical-align: top;
    color: #334155;
    line-height: 1.5;
}
.post-table td strong { color: #1a3d6e; }

/* Pull quote */
.post-pullquote {
    border-left: 4px solid #00d4aa;
    background: #f0fdf9;
    padding: 20px 24px;
    margin: 2em 0;
    border-radius: 0 12px 12px 0;
    font-size: 1.05rem;
    font-style: italic;
    color: #0f4c3a;
    line-height: 1.6;
}

/* Callout box linking to calculator */
.calc-callout {
    background: linear-gradient(135deg, #0f2240 0%, #1a3d6e 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin: 2.4em 0;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 20px rgba(15,34,64,0.18);
}
.calc-callout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15,34,64,0.24);
    text-decoration: none;
}
.calc-callout-icon {
    width: 52px;
    height: 52px;
    background: rgba(0,212,170,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.calc-callout-text { flex: 1; }
.calc-callout-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00d4aa;
    display: block;
    margin-bottom: 4px;
}
.calc-callout-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    display: block;
    margin-bottom: 4px;
}
.calc-callout-desc {
    font-size: 13px;
    color: rgba(248,250,252,0.65);
    display: block;
}
.calc-callout-arrow {
    color: rgba(248,250,252,0.5);
    font-size: 20px;
    flex-shrink: 0;
}

/* Key numbers / stat boxes */
.post-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 2em 0;
}
.post-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
}
.post-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a3d6e;
    letter-spacing: 0;
    display: block;
    line-height: 1;
    margin-bottom: 6px;
}
.post-stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Author / footer */
.post-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}
.post-footer-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0f2240, #1a3d6e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.post-footer-text { font-size: 13px; color: #64748b; line-height: 1.5; }
.post-footer-text strong { color: #1e293b; display: block; }

/* Related posts */
.related-posts {
    margin-top: 56px;
}
.related-posts h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: 0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.related-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.related-card:hover {
    box-shadow: 0 4px 16px rgba(15,34,64,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}
.related-card-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a3d6e;
    display: block;
    margin-bottom: 8px;
}
.related-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    display: block;
    margin-bottom: 6px;
}
.related-card-date { font-size: 12px; color: #94a3b8; }

/* Blog index styles */
.blog-index-hero {
    background: linear-gradient(135deg, #0f2240 0%, #1a3d6e 100%);
    padding: 56px 24px 48px;
    text-align: center;
    margin-bottom: 48px;
}
.blog-index-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0;
    margin: 0 0 12px;
}
.blog-index-hero p {
    font-size: 1.05rem;
    color: rgba(248,250,252,0.7);
    max-width: 520px;
    margin: 0 auto;
}

.blog-index-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.post-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    box-shadow: 0 8px 28px rgba(15,34,64,0.12);
    transform: translateY(-3px);
    text-decoration: none;
}
.post-card-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.post-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}
.post-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 0;
}
.post-card-excerpt {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    display: block;
}
.post-card-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    gap: 10px;
}

@media (max-width: 640px) {
    .blog-container {
        max-width: 100vw;
        padding: 20px 16px 60px;
    }

    .blog-breadcrumb,
    .post-header,
    .post-hero,
    .post-hero--svg,
    .post-body,
    .post-body p,
    .post-body h1,
    .post-body h2,
    .post-body h3 {
        max-width: 100%;
    }

    .post-hero--svg img,
    .post-hero--svg svg {
        max-width: 100%;
    }

    .post-body { font-size: 16px; }
    .calc-callout { flex-direction: column; text-align: center; }
    .calc-callout-arrow { display: none; }
    .post-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================
   v2 blog visuals — SVG hero artwork, polished cards
   Added 2026-05-15. Coexists with legacy gradient
   heroes so existing posts continue to render.
   ========================================== */

/* SVG hero — replaces the gradient + emoji pattern */
.post-hero--svg {
    background: none;
    aspect-ratio: 2 / 1;
    margin-bottom: 32px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    position: relative;
}
.post-hero--svg img,
.post-hero--svg svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.post-hero--svg .post-hero-caption {
    position: absolute;
    left: 24px;
    bottom: 20px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
}

/* Polished post card — SVG-aware thumbnail */
.post-card-thumb--svg {
    height: 180px;
    padding: 0;
    background: none;
    position: relative;
    overflow: hidden;
}
.post-card-thumb--svg img,
.post-card-thumb--svg svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.post-card:hover .post-card-thumb--svg img,
.post-card:hover .post-card-thumb--svg svg {
    transform: scale(1.04);
}
.post-card-thumb--svg .post-card-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

/* Index grid breathes more */
.blog-posts-grid,
.post-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
@media (max-width: 640px) {
    .blog-posts-grid,
    .post-card-grid {
        gap: 18px;
        grid-template-columns: 1fr;
    }
}

/* Calculator callout — used inline in articles */
.calc-callout {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    background: linear-gradient(135deg, #f1f4f9 0%, #e6eef8 100%);
    border: 1px solid #d8e0ea;
    border-left: 4px solid #1e4d8c;
    border-radius: 14px;
    margin: 28px 0;
    text-decoration: none;
    color: #0f172a;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.calc-callout:hover {
    box-shadow: 0 10px 28px rgba(15, 34, 64, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.calc-callout-icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e4d8c, #335587);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 16px rgba(30, 77, 140, 0.32);
}
.calc-callout-body,
.calc-callout-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.calc-callout-text strong {
    font-size: 1.05rem;
    color: #0f172a;
    line-height: 1.35;
}
.calc-callout-text span {
    font-size: 13.5px;
    color: #475569;
}
.calc-callout-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a3d6e;
    margin-bottom: 4px;
}
.calc-callout-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 4px;
}
.calc-callout-desc {
    display: block;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
}
.calc-callout-arrow {
    flex-shrink: 0;
    color: #1a3d6e;
    font-size: 22px;
}

/* Author / byline strip */
.post-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 24px 0 32px;
    font-size: 13.5px;
    color: #64748b;
}
.post-byline-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e4d8c, #335587);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* Tighter prose for new posts */
.post-body--v2 { font-size: 17px; line-height: 1.78; }
.post-body--v2 p { margin: 0 0 1.5em; }
.post-body--v2 h2 {
    border-top: none;
    padding-top: 0;
    margin: 2em 0 0.5em;
    font-size: 1.55rem;
}
.post-body--v2 h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, #1e4d8c, #00d4aa);
    border-radius: 2px;
    margin-bottom: 14px;
}
.post-body--v2 blockquote {
    border-left: 4px solid #00d4aa;
    background: #f8fafc;
    padding: 18px 22px;
    margin: 28px 0;
    border-radius: 0 12px 12px 0;
    color: #334155;
    font-style: italic;
}
.post-body--v2 blockquote p { margin: 0; }
.post-body--v2 .pull-quote {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    padding: 28px 0;
    margin: 32px 0;
    border-top: 2px solid #1e4d8c;
    border-bottom: 2px solid #1e4d8c;
    text-align: center;
    letter-spacing: 0;
}

/* Reading-progress aid: faint dropcap on first paragraph (opt-in) */
.post-body--v2 > .lede::first-letter {
    float: left;
    font-size: 3.4rem;
    line-height: 0.9;
    font-weight: 800;
    margin: 6px 10px 0 0;
    color: #1e4d8c;
    font-family: Georgia, 'Times New Roman', serif;
}


/* ==========================================
   Pinterest Save Button — hover overlay
   Appears on .post-card-thumb--svg (blog index cards)
   and .post-hero--svg (blog post hero images).
   ========================================== */

/* Shared wrapper needs relative positioning (already set on --svg variants) */
.post-card-thumb--svg,
.post-hero--svg { position: relative; }

/* The save button */
.pin-save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e60023;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 11px 6px 8px;
    border-radius: 999px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
    line-height: 1;
}
.pin-save-btn svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    flex-shrink: 0;
}

/* Show on parent hover */
.post-card-thumb--svg:hover .pin-save-btn,
.post-hero--svg:hover .pin-save-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* On mobile: always visible (no hover) */
@media (hover: none) {
    .pin-save-btn {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}
