﻿:root {
    /* Shared tokens (combined) */
    --brand: #179cc5;
    --muted: #6c757d;
    --page-bg: #f6f8fb;
    --card-bg: #ffffff;
    --accent: #eef7fb;
    --radius: 12px;
    --max-width-list: 980px;
    --max-width-post: 1100px;
    --gap: 20px;
    --shadow-light: 0 6px 18px rgba(20,40,80,0.06);
    --shadow-strong: 0 12px 28px rgba(18,37,58,0.08);
    --meta-size: 0.95rem;
}

/* -------- Blog index (list) -------- */
.blog-page {
    padding: 28px 16px;
    display: flex;
    justify-content: center;
}

.blog-container {
    width: 100%;
    max-width: var(--max-width-list);
}

.page-header {
    text-align: left;
    margin: 6px 0 18px;
}

    .page-header h1 {
        margin: 4px 0 8px;
        font-weight: 700;
        color: #1f2d3d;
        letter-spacing: -0.4px;
        font-size: 1.8rem;
    }

.navy-line {
    height: 4px;
    width: 56px;
    background: linear-gradient(90deg, var(--brand), #0f7fb0);
    border-radius: 6px;
    margin: 8px 0 18px;
}

.blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 760px) {
    .blog-list {
        grid-template-columns: 1fr;
    }
}

/* -------- Shared post-card base + index/post overrides -------- */
.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

/* index cards: smaller padding, lighter shadow, hover */
.blog-list .post-card {
    padding: 18px;
    box-shadow: var(--shadow-light);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .blog-list .post-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 36px rgba(20,40,80,0.08);
    }

/* post page card: larger padding, stronger shadow */
.post-hero .post-card {
    padding: 22px;
    box-shadow: var(--shadow-strong);
}

/* -------- Headers / titles / meta (combined with context-specific overrides) -------- */
.post-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

/* post view header stacks vertically */
.post-hero .post-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-title {
    margin: 0;
    font-size: 1.25rem; /* default for list items */
    line-height: 1.2;
    color: #0f2b3a;
}

/* post view title is larger and styled */
.post-hero .post-title {
    font-size: 1.9rem;
    line-height: 1.05;
    color: #10202b;
    letter-spacing: -0.2px;
    font-weight: 700;
}

/* Ensure H2/H3 inside post body visually align with the H1 title:
   - same color, similar letter-spacing and weight
   - remove unexpected left offsets and normalize margins so left edges line up
   - use box-sizing so widths respect container padding */
.post-body h2,
.post-body h3,
.post-preview h2,
.post-preview h3,
.full-body h2,
.full-body.expanded h2,
.full-body h3,
.full-body.expanded h3 {
    margin: 0 0 0.6rem 0; /* align top spacing consistently */
    color: #10202b; /* match post-title color */
    letter-spacing: -0.2px; /* match H1 letter spacing */
    font-weight: 700;
    line-height: 1.12;
    padding-left: 0;
    margin-left: 0;
    box-sizing: border-box;
}

/* Slightly scale sizes so H2 sits visually under the H1 without appearing oversized */
.post-body h2,
.post-preview h2,
.full-body h2,
.full-body.expanded h2,
.full-body h3,
.full-body.expanded h3 {
    font-size: 1.35rem;
}

.post-body h3,
.post-preview h3 {
    font-size: 1.05rem;
    font-weight: 600;
}
.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover,
.post-title a:focus {
    color: var(--brand);
    text-decoration: underline;
    outline: none;
}

/* post view title is larger */
.post-hero .post-title {
    font-size: 1.9rem;
    line-height: 1.05;
    color: #10202b;
    letter-spacing: -0.2px;
    font-weight: 700;
}

/* meta */
.post-meta {
    color: var(--muted);
    font-size: .92rem;
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-hero .post-meta {
    font-size: var(--meta-size);
}

/* -------- Content / preview / full body -------- */
.post-content {
    color: #2b3b46;
    font-size: 1.25rem;
    line-height: 1.6;
    color: #2b3b46;
}

section p {
    font-size: 1.2rem;
    color: #2b3b46;
}

.post-preview {
    color: #35484f;
}

.full-body {
    display: none;
}

    .full-body.expanded {
        display: block;
        margin-top: 8px;
    }

.post-card .post-content ul {
    font-size: 1.2rem;
}

/* -------- Post page body layout / aside / image -------- */
.post-body-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 8px;
}

.post-body {
    color: #21303a;
    font-size: 1.2rem;
    line-height: 1.7;
}

.post-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(10,26,40,0.06);
    border: 1px solid rgba(20,40,80,0.04);
    background: var(--accent);
}

.post-aside {
    display: none;
}

/* make aside visible on wide screens and use post-specific max-width */
@media (min-width: 900px) {
    .post-container {
        max-width: var(--max-width-post);
    }

    .post-body-layout {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }

    .post-aside {
        display: block;
    }
}

/* -------- Buttons / actions -------- */
.post-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(23,156,197,0.16);
    color: var(--brand);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .92rem;
}

    .btn-ghost:focus {
        box-shadow: 0 0 0 4px rgba(23,156,197,0.08);
        outline: none;
    }

.btn-primary-ghost {
    background: transparent;
    border: 1px solid rgba(23,156,197,0.12);
    color: var(--brand);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

    .btn-primary-ghost:focus {
        outline: none;
        box-shadow: 0 0 0 6px rgba(23,156,197,0.06);
    }

/* -------- Utilities / typography / tables -------- */
.muted {
    color: var(--muted);
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, rgba(20,40,80,0.02), rgba(20,40,80,0.04));
    margin-top: 6px;
}

/* post-body specific small tweaks */
.post-body p {
    margin: 0 0 1rem 0;
}

.post-body h2, .post-body h3 {
    margin: 1.2rem 0 0.6rem;
    color: #0f2b3a;
}

.post-body blockquote {
    border-left: 4px solid rgba(23,156,197,0.12);
    padding: 8px 16px;
    margin: 12px 0;
    background: #fbfdff;
    color: #13303a;
    border-radius: 6px;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

    .post-body table th, .post-body table td {
        border: 1px solid rgba(10,26,40,0.06);
        padding: 8px 10px;
        text-align: left;
    }

/* Professional back-link styles */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--brand);
    background: linear-gradient(90deg, rgba(23,156,197,0.03), transparent);
    border: 1px solid rgba(23,156,197,0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 18px rgba(23,156,197,0.03);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

    /* icon spacing + color */
    .back-link svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: currentColor;
        transition: transform .14s ease, opacity .14s ease;
    }

    /* Hover / active */
    .back-link:hover {
        transform: translateX(-3px);
        background: linear-gradient(90deg, rgba(23,156,197,0.06), transparent);
        box-shadow: 0 12px 28px rgba(23,156,197,0.06);
        text-decoration: none;
    }

    .back-link:active {
        transform: translateX(-1px) scale(.995);
    }

    /* Focus for keyboard users (accessible) */
    .back-link:focus,
    .back-link:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(23,156,197,0.12);
        border-color: rgba(23,156,197,0.18);
    }

    /* Small variant for inline use in aside panels */
    .back-link.small {
        padding: 6px 8px;
        font-size: .875rem;
        border-radius: 8px;
    }

/* CTA visibility:
   - Hidden by default so preview windows and in-list expanded previews do not show it
   - Visible and styled when rendered inside the full post view (.post-hero) */
.post-full-cta {
    display: none;
}

/* Show & style CTA in full post view */
.post-hero .post-full-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(23,156,197,0.03), transparent);
    border: 1px solid rgba(23,156,197,0.06);
    max-width: 820px;
}

    /* CTA button styling */
    .post-hero .post-full-cta .cta-button {
        display: inline-block;
        padding: 10px 14px;
        border-radius: 8px;
        background-color:#1A365D;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        box-shadow: 0 8px 20px rgba(23,156,197,0.12);
    }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .post-hero .post-full-cta,
    .post-hero .post-full-cta .cta-button {
        transition: none !important;
    }
}