/* =============================================================================
   single-related.css
   Extracted from inline style="" attributes previously in single.php's
   related-stories grid. Values are byte-identical to the originals so rendering
   is unchanged — the only difference is that style-src no longer needs
   'unsafe-inline' for these nodes.

   Append to style.css (or enqueue separately with filemtime() versioning).
   ============================================================================= */

/* was: <div class="image-container" style="position:relative"> */
.related-story-card .related-image-container {
    position: relative;
}

/* was: inline <img ... style="width:100%;height:100%;object-fit:cover"> on the
   YouTube-thumbnail fallback */
.related-story-card .related-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* was: inline <span style="position:absolute;bottom:8px;left:8px;background:#E91D1B;
   color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:3px;
   pointer-events:none"> */
.related-story-card .related-video-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #e91d1b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    pointer-events: none;
}

/* =============================================================================
   "You might also like" (inline related) — richer, tag-matched cards.
   Namespaced .cfm-yml-* so it never collides with existing .inline-related-*
   rules in style.css. Loaded on single posts via /css/single-related.css.
   ============================================================================= */
.cfm-yml { margin: 28px 0; }

.cfm-yml-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.cfm-yml-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

/* Scoped under .post-content and forced, because style.css applies
   `.post-content img { height:auto }` which otherwise lets each image keep
   its natural ratio -> unequal heights. These win on specificity + !important. */
.post-content .cfm-yml-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    background: #f0f0f0;
    overflow: hidden;
}
.post-content .cfm-yml-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    object-position: top;
}

.cfm-yml-body { padding: 10px 12px 14px; }

.cfm-yml-kicker {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #e91d1b;
    text-decoration: none;
}
.cfm-yml-kicker:hover { text-decoration: underline; }

.cfm-yml-headline {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
}
.cfm-yml-headline a { color: #1a1a1a; text-decoration: none; }
.cfm-yml-headline a:hover { color: #e91d1b; }

@media (max-width: 767px) {
    .cfm-yml-list { grid-template-columns: 1fr; gap: 12px; }
    .cfm-yml-card { flex-direction: row; min-height: 92px; }
    .post-content .cfm-yml-thumb { flex: 0 0 120px; aspect-ratio: auto; }
    .cfm-yml-body {
        flex: 1 1 auto;
        padding: 8px 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.cfm-author-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 20px 24px;
	margin: 32px 0;
	border: 1px solid var(--cfm-border, #e2e2e2);
	border-radius: 10px;
	background: var(--cfm-surface, #fafafa);
}

.cfm-author-avatar {
	flex: 0 0 80px;   /* locks the column so a wide src can never stretch it */
	width: 80px;
	height: 80px;
}


.cfm-author-avatar img {
	border-radius: 50%;
	object-fit: cover;
    object-position: top;
	display: block;
}

.cfm-author-name a{
    color: #495057;
}

.cfm-author-name { margin: 0 0 6px; font-size: 18px; line-height: 1.2; }
.cfm-author-desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--cfm-text-muted, #555); }
.cfm-author-more { font-weight: 600; font-size: 14px; }
@media (max-width: 480px) {
	.cfm-author-box { flex-direction: column; align-items: center; text-align: center; }
}