/* ==========================================================================
   Single Post Styles
   ========================================================================== */

.single-article { max-width: 100%; }

/* Entry header */
.entry-header { margin-bottom: 1.5rem; }
.post-categories { margin-bottom: 0.75rem; display: flex; gap: 0.5rem; }
.post-title { margin-bottom: 1rem; }

/* Post meta */
.post-meta { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.75rem; padding: 1rem; background: #f9fafb; border-radius: var(--stf-radius); }
.post-meta-author { display: flex; align-items: center; gap: 0.75rem; }
.post-meta-author img { border-radius: 50%; width: 40px; height: 40px; }
.author-name { font-weight: 600; color: var(--stf-body-text); display: block; }
.post-date-info { font-size: 0.8rem; color: var(--stf-muted); }
.updated-date { font-style: italic; }
.post-meta-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--stf-muted); align-items: center; }

/* Featured image */
.post-featured-image { margin: 1.5rem 0; }
.post-featured-image img { width: 100%; border-radius: var(--stf-radius); }
.post-featured-image figcaption { font-size: 0.8rem; color: var(--stf-muted); padding: 0.5rem 0; font-style: italic; }
.image-credit { margin-left: 0.5rem; }

/* Entry content */
.entry-content { font-size: clamp(1rem, 0.9rem + 0.5vw, 1.125rem); }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content h2 { margin: 2rem 0 0.75rem; padding-top: 0.5rem; }
.entry-content h3 { margin: 1.5rem 0 0.5rem; }
.entry-content ul, .entry-content ol { margin: 1rem 0; padding-left: 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
    border-left: 4px solid var(--stf-primary); margin: 1.5rem 0; padding: 1rem 1.5rem;
    background: #f9fafb; border-radius: 0 var(--stf-radius) var(--stf-radius) 0;
    font-style: italic;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.entry-content th, .entry-content td { padding: 0.75rem; border: 1px solid var(--stf-border); text-align: left; }
.entry-content th { background: #f3f4f6; font-weight: 600; }
.entry-content pre { background: #1f2937; color: #e5e7eb; padding: 1.25rem; border-radius: var(--stf-radius); overflow-x: auto; margin: 1.5rem 0; font-size: 0.875rem; }
.entry-content code { background: #f3f4f6; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content img { border-radius: var(--stf-radius); margin: 1rem 0; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }

/* Key Takeaways */
.key-takeaways {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--stf-radius);
    padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.key-takeaways h2 { font-size: 1.125rem; margin: 0 0 0.75rem; color: var(--stf-primary); }
.key-takeaways ul { margin: 0; }
.key-takeaways li { margin-bottom: 0.4rem; }

/* Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2rem 0; }
.post-tag { background: #f3f4f6; color: var(--stf-muted); padding: 0.3rem 0.75rem; border-radius: 99px; font-size: 0.8rem; }
.post-tag:hover { background: var(--stf-primary); color: #fff; }

/* Author box */
.author-box {
    display: flex; gap: 1.25rem; padding: 1.5rem; margin: 2rem 0;
    border: 1px solid var(--stf-border); border-radius: var(--stf-radius); background: #f9fafb;
}
.author-box-avatar img { border-radius: 50%; width: 80px; height: 80px; }
.author-box-name { font-size: 1.1rem; margin-bottom: 0.3rem; }
.author-box-name a { color: var(--stf-body-text); }
.author-box-bio { font-size: 0.875rem; color: var(--stf-muted); margin-bottom: 0.5rem; }
.author-more { font-size: 0.85rem; font-weight: 600; }
@media (max-width: 480px) {
    .author-box { flex-direction: column; text-align: center; align-items: center; }
}

/* Share buttons */
.share-buttons { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0; }
.share-label { font-weight: 600; font-size: 0.85rem; }
.share-btn {
    display: inline-flex; align-items: center; padding: 0.4rem 0.75rem;
    border-radius: 99px; font-size: 0.8rem; font-weight: 600;
    border: 1px solid var(--stf-border); color: var(--stf-body-text);
    cursor: pointer; background: none; min-height: 36px;
}
.share-btn:hover { background: var(--stf-primary); color: #fff; border-color: var(--stf-primary); }

/* Related posts */
.related-posts-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--stf-border); }
.related-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }

/* Article divider */
.article-divider {
    display: flex; align-items: center; gap: 1rem; margin: 3rem 0;
    color: var(--stf-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
}
.article-divider hr { flex: 1; border: none; border-top: 1px solid var(--stf-border); }

/* Load more */
#load-more-articles { display: block; margin: 2rem auto; }

/* ---------- Compact Read More ---------- */
.related-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--stf-border); }
.related-section-title { font-size: 1.125rem; margin-bottom: 1rem; }
.related-compact-list { display: flex; flex-direction: column; gap: 0; }
.related-compact-card {
    display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0;
    border-bottom: 1px solid var(--stf-border); text-decoration: none;
    transition: background 0.15s; color: var(--stf-body-text);
}
.related-compact-card:hover { background: #f9fafb; margin: 0 -0.75rem; padding: 0.75rem; border-radius: var(--stf-radius); }
.related-compact-thumb { flex-shrink: 0; width: 80px; height: 56px; border-radius: 6px; overflow: hidden; }
.related-compact-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-placeholder { width: 100%; height: 100%; background: #e5e7eb; }
.related-compact-info { flex: 1; min-width: 0; }
.related-compact-cat { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--stf-primary); }
.related-compact-title { font-size: 0.9rem; font-weight: 600; margin: 0.15rem 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-compact-meta { font-size: 0.7rem; color: var(--stf-muted); }
.related-compact-arrow { font-size: 1.1rem; color: var(--stf-muted); flex-shrink: 0; transition: transform 0.2s; }
.related-compact-card:hover .related-compact-arrow { transform: translateX(3px); color: var(--stf-primary); }
@media (max-width: 480px) {
    .related-compact-thumb { width: 64px; height: 48px; }
}

/* ---------- Enhanced Author Box ---------- */
.author-box-enhanced {
    margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--stf-border);
    border-radius: var(--stf-radius); background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}
.author-box-header { display: flex; gap: 1rem; align-items: flex-start; }
.author-box-avatar-wrap { position: relative; flex-shrink: 0; }
.author-box-avatar-wrap img { border-radius: 50%; width: 80px; height: 80px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.author-verified-badge { position: absolute; bottom: 0; right: -2px; background: #fff; border-radius: 50%; display: flex; }
.author-verified-lg { bottom: 2px; right: 0; }
.author-box-identity { flex: 1; }
.author-box-name { font-size: 1.125rem; margin: 0 0 0.15rem; }
.author-box-name a { color: var(--stf-body-text); }
.author-box-name a:hover { color: var(--stf-primary); }
.author-box-role { font-size: 0.8rem; color: var(--stf-primary); font-weight: 600; display: block; margin-bottom: 0.35rem; }
.author-box-stats { font-size: 0.75rem; color: var(--stf-muted); display: flex; gap: 0.4rem; flex-wrap: wrap; }
.author-box-stats a { color: var(--stf-primary); font-weight: 500; }
.author-box-bio { font-size: 0.875rem; color: #4b5563; margin: 0.75rem 0 0; line-height: 1.6; }
.author-box-expertise { margin-top: 0.75rem; display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.expertise-label { font-size: 0.75rem; font-weight: 600; color: var(--stf-muted); }
.expertise-tag {
    font-size: 0.7rem; padding: 0.2rem 0.5rem; background: #dbeafe; color: #1e40af;
    border-radius: 99px; font-weight: 500;
}
.author-box-cta { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--stf-border); }
.author-box-more { font-size: 0.85rem; font-weight: 600; color: var(--stf-primary); }
@media (max-width: 480px) {
    .author-box-header { flex-direction: column; align-items: center; text-align: center; }
    .author-box-stats { justify-content: center; }
    .author-box-expertise { justify-content: center; }
}

/* Author avatar fallback */
.author-box-avatar { border-radius: 50%; width: 80px; height: 80px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); object-fit: cover; }
.author-box-avatar-fallback {
    width: 80px; height: 80px; border-radius: 50%; background: var(--stf-primary);
    color: #fff; font-size: 2rem; font-weight: 700; display: flex; align-items: center;
    justify-content: center; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.author-box-bio { font-size: 0.875rem; color: #4b5563; margin: 0.75rem 0 0; line-height: 1.6; }
.author-box-bio a { color: var(--stf-primary); text-decoration: underline; }
.author-box-bio strong { font-weight: 600; color: var(--stf-body-text); }
