/* =================================================================
   Single Post Styles (single-post.css)
   - This file should be enqueued only on single post pages for optimal performance.
   ================================================================= */

:root {
	--primary-color: #dc2626; /* Default red, can be overridden by theme options */
	--heading-font: 'Georgia', serif;
	--body-font: 'Helvetica', sans-serif;
	--gray-100: #f8fafc;
	--gray-200: #eef2f5;
	--gray-500: #6b7280;
	--gray-700: #374151;
	--shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
	--border-light: 1px solid #e5e7eb;
}

/* --- General Layout --- */
.post-container-wrapper {
	padding: 2rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
}
.layout-full-width .post-content-area {
	max-width: 800px; /* Even on full-width, content shouldn't be too wide */
	margin: 0 auto;
}
.post-article {
	background: white;
	border-radius: 0.5rem;
	box-shadow: var(--shadow-sm);
	padding: 1rem;
	margin-bottom: 2rem;
}

/* --- Accessibility Helper --- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* --- Breadcrumbs & Header --- */
.post-breadcrumbs {
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
	color: var(--gray-500);
}
.post-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}
.post-breadcrumbs a:hover {
	text-decoration: underline;
	color: var(--primary-color);
}
.post-header {
	margin-bottom: 2rem;
}
.post-category-badge {
	background-color: var(--primary-color);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: 0.75rem;
	font-weight: bold;
	display: inline-block;
	margin-bottom: 1rem;
	text-transform: uppercase;
	text-decoration: none;
	transition: opacity 0.2s;
}
.post-category-badge:hover {
	opacity: 0.85;
}
.post-title {
	font-size: clamp(1.85rem, 5vw, 2.75rem);
	font-weight: bold;
	line-height: 1.2;
	margin: 0 0 1rem;
	font-family: var(--heading-font);
}

/* --- Meta Info --- */
.post-meta {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 1.5rem 0;
	padding: 1.5rem 0;
	border-top: var(--border-light);
	border-bottom: var(--border-light);
}
.meta-author {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.meta-author .avatar {
	border-radius: 50%;
}
.meta-author a {
    text-decoration: none;
    color: var(--gray-700);
}
.meta-author a:hover {
    color: var(--primary-color);
}
.author-name {
	font-weight: 600;
}
.post-date {
	font-size: 0.875rem;
	color: var(--gray-500);
}
.meta-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	font-size: 0.875rem;
	color: var(--gray-500);
}
.meta-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

/* --- Featured Image --- */
.post-featured-image {
	margin-bottom: 2rem;
}
.post-featured-image img {
	width: 100%;
	height: auto;
	max-height: 500px;
	object-fit: cover;
	border-radius: 0.5rem;
}
.image-caption {
	font-size: 0.875rem;
	color: var(--gray-500);
	text-align: center;
	margin-top: 0.75rem;
	font-style: italic;
}

/* --- Article Content --- */
.article-content {
	line-height: 1.8;
	font-size: 1.125rem;
	font-family: var(--body-font);
	color: var(--gray-700);
}
.article-content p,
.article-content ul,
.article-content ol {
	margin-bottom: 1.5rem;
}
.article-content h2,
.article-content h3,
.article-content h4 {
	font-weight: bold;
	margin: 2.5rem 0 1.25rem;
	line-height: 1.3;
	font-family: var(--heading-font);
}
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 0.5rem;
	margin: 2rem auto;
	display: block;
}
.article-content blockquote {
	border-left: 4px solid var(--primary-color);
	padding: 1.5rem;
	margin: 2rem 0;
	font-style: italic;
	color: var(--gray-500);
	background: var(--gray-100);
	border-radius: 0 0.5rem 0.5rem 0;
}
.article-content blockquote p {
    margin-bottom: 0;
}
.page-links {
    margin-top: 2rem;
    font-weight: bold;
}

/* --- Article Footer --- */
.post-footer {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: var(--border-light);
}
.post-tags {
	margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tags-title {
    margin: 0;
}
.tag-list a {
	background: #f3f4f6;
	color: var(--gray-700);
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	text-decoration: none;
	font-size: 0.875rem;
	transition: background 0.2s, color 0.2s;
}
.tag-list a:hover {
	background: var(--primary-color);
    color: white;
}

/* --- Social Share --- */
.social-share {
	background: var(--gray-100);
	padding: 1.5rem;
	border-radius: 0.5rem;
	margin-bottom: 2rem;
}
.social-share h4 {
	margin-top: 0;
	margin-bottom: 1rem;
	font-weight: 600;
}
.social-share-links {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.social-share-links a,
.social-share-links button {
	color: white !important;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: opacity 0.2s ease-in-out;
	border: none;
	font-size: 0.9rem;
	cursor: pointer;
	line-height: 1;
}
.social-share-links a:hover,
.social-share-links button:hover {
	opacity: 0.85;
}
.share-link-twitter { background: #1da1f2; }
.share-link-facebook { background: #4267b2; }
.share-link-whatsapp { background: #25d366; }
.share-link-linkedin { background: #0077b5; }
.share-link-native { background: var(--gray-500); }

/* --- Author Bio --- */
.author-bio {
	background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
	padding: 2rem;
	border-radius: 0.75rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
    margin-top: 2rem;
}
.author-bio .avatar {
	border-radius: 50%;
	border: 3px solid white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.author-bio-content h4 {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0.5rem 0;
}
.author-bio-content p {
	color: #4b5563;
	line-height: 1.6;
	margin-bottom: 1rem;
}
.author-bio-content a {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 600;
}
.author-bio-content a:hover {
    text-decoration: underline;
}

/* --- Comments & Post Grids --- */
.comments-section,
.post-grids-section { /* Assuming .post-grids is wrapped in this */
	background: white;
	border-radius: 0.5rem;
	box-shadow: var(--shadow-sm);
	padding: 1.5rem;
    margin-top: 2rem;
}

/* --- Responsive Desktop Layout --- */
@media (min-width: 768px) {
	.post-article {
		padding: 2.5rem;
	}
    .post-meta {
        flex-direction: row;
        align-items: center;
    }
    .meta-stats {
        margin-left: auto;
    }
    .author-bio {
        flex-direction: row;
        text-align: left;
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
	.post-container-wrapper.layout-sidebar-right,
	.post-container-wrapper.layout-sidebar-left {
		display: grid;
		grid-template-columns: 1fr 320px; /* Content and Sidebar width */
		gap: 2.5rem;
		align-items: flex-start;
	}
	.post-container-wrapper.layout-sidebar-left {
		grid-template-columns: 320px 1fr; /* Sidebar and Content width */
	}
	.post-container-wrapper.layout-sidebar-left .post-content-area {
		order: 2;
	}
	.post-container-wrapper.layout-sidebar-left .post-sidebar {
		order: 1;
	}
}