/*
 * Blog Visual Consistency Framework v1
 * Scope: single post pages only.
 */

.single-post {
    --vu-accent-color: #195090;
    --vu-heading-color: #0f172a;
    --vu-body-color: #1f2937;
    --vu-border-color: #dbe3f0;
    --vu-surface-color: #f8fafc;
    --vu-cta-surface: #eef5ff;
    --vu-space-xs: 0.75rem;
    --vu-space-sm: 1rem;
    --vu-space-md: 1.5rem;
    --vu-space-lg: 2rem;
    --vu-space-xl: 3rem;
    --vu-radius-sm: 10px;
    --vu-radius-md: 14px;
}

/* Spacing consistency */
.single-post .entry-content {
    color: var(--vu-body-color);
}

.single-post .entry-content > * {
    margin-block-start: 0;
    margin-block-end: var(--vu-space-md);
}

.single-post .entry-content > :last-child {
    margin-bottom: 0;
}

.single-post .entry-content p,
.single-post .entry-content ul,
.single-post .entry-content ol,
.single-post .entry-content blockquote,
.single-post .entry-content pre,
.single-post .entry-content figure,
.single-post .entry-content table {
    margin-bottom: var(--vu-space-md);
}

.single-post .entry-content li + li {
    margin-top: 0.45rem;
}

/* Title hierarchy */
.single-post .entry-title,
.single-post h1.entry-title {
    color: var(--vu-heading-color);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: var(--vu-space-lg);
}

.single-post .entry-content h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.2;
    margin-top: var(--vu-space-lg);
    margin-bottom: var(--vu-space-sm);
}

.single-post .entry-content h2 {
    color: #4B92DB;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
    line-height: 1.25;
    margin-top: var(--vu-space-lg);
    margin-bottom: var(--vu-space-sm);
}

.single-post .entry-content h3 {
    color: #4B92DB;
    font-size: clamp(1.2rem, 1.9vw, 1.45rem);
    line-height: 1.3;
    margin-top: var(--vu-space-md);
    margin-bottom: var(--vu-space-xs);
}

.single-post .entry-content h1 strong,
.single-post .entry-content h1 b,
.single-post .entry-content h2 strong,
.single-post .entry-content h2 b,
.single-post .entry-content h3 strong,
.single-post .entry-content h3 b {
    font-weight: inherit !important;
}

/* Featured image: keep 16:9 crop while preserving visible caption */
.single-post .vu-featured-media-frame,
.single-post .post-thumbnail,
.single-post .entry-media,
.single-post .wp-block-post-featured-image {
    position: relative;
    width: 100%;
    overflow: visible;
    margin-bottom: var(--vu-space-lg);
}

.single-post .vu-featured-media-image,
.single-post .post-thumbnail img,
.single-post .entry-media img,
.single-post .wp-block-post-featured-image img,
.single-post img.wp-post-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    object-position: center center;
    border-radius: var(--vu-radius-md);
}

.single-post .post-thumb-caption,
.single-post .entry-media .post-thumb-caption {
    display: block;
    margin-top: var(--vu-space-sm);
    line-height: 1.5;
}

/* CTA blocks */
.single-post .vu-cta-block,
.single-post .tri-cta-grid,
.single-post .blog-tri-cta,
.single-post .emo-rev-cta {
    margin-top: var(--vu-space-xl) !important;
    margin-bottom: var(--vu-space-xl) !important;
    padding: var(--vu-space-lg) !important;
    background: var(--vu-cta-surface) !important;
    border: 1px solid var(--vu-border-color) !important;
    border-radius: var(--vu-radius-md) !important;
}

.single-post .tri-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--vu-space-sm);
}

.single-post .tri-cta-grid .cta-card,
.single-post .blog-tri-cta__card {
    background: #ffffff;
    border: 1px solid var(--vu-border-color);
    border-radius: var(--vu-radius-sm);
    padding: var(--vu-space-md);
}

.single-post .tri-cta-grid .cta-card h3,
.single-post .blog-tri-cta__title {
    color: #4B92DB;
    font-size: 1.2rem;
}

.single-post .tri-cta-grid .cta-card p,
.single-post .blog-tri-cta__body {
    font-size: 1rem;
    line-height: 1.6;
}

.single-post .vu-cta-button,
.single-post .tri-cta-grid .cta-link,
.single-post .blog-tri-cta__button,
.single-post .emo-rev-cta .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 1rem 2rem !important;
    border-radius: 8px !important;
    border: 2px solid #5B92E5 !important;
    background: #ffffff !important;
    color: #5B92E5 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.single-post .vu-cta-button:hover,
.single-post .tri-cta-grid .cta-link:hover,
.single-post .blog-tri-cta__button:hover,
.single-post .emo-rev-cta .cta-button:hover {
    background: #ffffff !important;
    color: #4A7AC0 !important;
    border-color: #4A7AC0 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Internal links */
.single-post .entry-content a.vu-internal-link {
    color: var(--vu-accent-color) !important;
    text-decoration-line: underline !important;
    text-decoration-style: solid;
    text-decoration-thickness: 2px;
    text-decoration-color: currentColor;
    text-underline-offset: 0.12em;
    font-weight: 400 !important;
}

.single-post .entry-content a.vu-internal-link:hover {
    color: #103f76 !important;
}

.single-post .entry-content a.vu-internal-link strong,
.single-post .entry-content a.vu-internal-link b {
    font-weight: inherit !important;
}

/* Author bio */
.single-post .vu-author-bio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--vu-space-md);
    align-items: center;
    margin: var(--vu-space-xl) 0 var(--vu-space-lg);
    padding: var(--vu-space-md);
    border: 1px solid var(--vu-border-color);
    border-radius: var(--vu-radius-md);
    background: var(--vu-surface-color);
}

.single-post .vu-author-bio__avatar-wrap {
    line-height: 0;
}

.single-post .vu-author-bio__avatar {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 999px;
}

.single-post .vu-author-bio__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
}

.single-post .vu-author-bio__name {
    margin: 0 0 0.5rem;
    color: var(--vu-heading-color);
    font-size: 1.25rem;
    line-height: 1.25;
}

.single-post .vu-author-bio__text {
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.single-post .vu-author-bio__link {
    color: var(--vu-accent-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

@media (max-width: 968px) {
    .single-post .tri-cta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .single-post .vu-author-bio {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .single-post .vu-author-bio__avatar-wrap {
        justify-self: center;
    }
}
