/*
 * BLOG - Alternative Theme
 * Custom styles for Enaris Health integration
 * Version 2: Fixes layout, font sizes, and spacing issues.
 */

/* --- GLOBAL RESETS for BLOG overrides --- */
html {
	position: static;
	min-height: auto;
}

body {
	padding-top: 0 !important;
	/* Removes the blank space above the header */
	margin-bottom: 0 !important;
	/* Removes the gap for the old footer, fixing layout */
	background-color: var(--floral-white);
	/* Ensures correct background color below footer */
}

/* Fix header font size to match main site */
.header .nav-link {
	font-size: 1.2rem;
}

@media (min-width: 769px) and (max-width: 920px) {
	.header .nav-link {
		font-size: 1rem;
	}
}

@media (max-width: 768px) {
	.header .nav-link {
		font-size: 1.2rem;
		/* Matches main mobile nav style */
	}
}

/* Fix footer layout and font size */
footer.footer {
	position: static;
	height: auto;
	line-height: normal;
	font-size: inherit;
	/* Inherit font size from body, fixing small text */
}

/* --- Blog Index Page (home.php) --- */

.hero {
	padding-bottom: 40px;
	/* Reduce space below hero */
}

.category-filter-section {
	padding: 0 2rem 40px;
	background: var(--floral-white);
}

.category-filters {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.category-button {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 25px;
	text-decoration: none;
	font-family: 'Recoleta', Georgia, serif;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.3s ease;
	border: 2px solid var(--rose-quartz);
	background-color: white;
	color: var(--rose-quartz);
}

.category-button:hover,
.category-button.active {
	background-color: var(--rose-quartz);
	color: white;
}

.blog-posts-section {
	background-color: var(--floral-white);
	/* Match main site sections */
	padding-top: 0;
	/* Remove space above posts */
}

.blog-post-card .blog-post-meta {
	margin-top: auto;
	padding-top: 1rem;
	font-size: 0.9rem;
	color: var(--text-light);
}

/* Ensure cover image on index page cards is aligned to the top */
.blog-post-card img {
	object-position: top;
}

/* Paginator */
.paginator {
	padding: 40px 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.pagination {
	list-style: none;
	display: flex;
	gap: 1rem;
	padding: 0;
	margin: 0;
}

.page-item .page-link {
	display: block;
	padding: 10px 18px;
	color: var(--hunter-green);
	background-color: white;
	border: 1px solid var(--border-light);
	border-radius: 25px;
	text-decoration: none;
	font-family: 'Recoleta', Georgia, serif;
	transition: all 0.3s ease;
}

.page-item.disabled .page-link {
	color: #aaa;
	pointer-events: none;
	background-color: var(--bg-cool-gray);
}

.page-item:not(.disabled) .page-link:hover {
	background-color: var(--rose-quartz);
	color: white;
	border-color: var(--rose-quartz);
}


/* --- Single Post Page (page.php) --- */

/* Reuse styles from privacy page for content */
.privacy-policy-section {
	background: white;
	/* Match other content pages */
}

.privacy-policy-section .title {
	font-size: clamp(2rem, 4vw, 3rem);
	font-family: 'Recoleta', Georgia, serif;
	color: var(--hunter-green);
	margin-bottom: 1rem;
}

.post-meta {
	margin-bottom: 2rem;
	color: var(--text-light);
	font-size: 0.95rem;
}

.post-cover-image {
	width: 100%;
	height: auto;
	max-height: 450px;
	object-fit: cover;
	object-position: top;
	/* Aligns image to the top on single posts */
	border-radius: 16px;
	margin-bottom: 2rem;
}

/* Content styling inside a post */
.page-content {
	line-height: 1.7;
	color: var(--text-light);
}

.page-content a {
	color: var(--rose-quartz);
	text-decoration: underline;
}

.page-content h2 {
	font-family: 'Recoleta', Georgia, serif;
	font-size: 1.8rem;
	color: var(--hunter-green);
	margin: 2.5rem 0 1rem 0;
	font-weight: 500;
}

.page-content h3 {
	font-family: 'Recoleta', Georgia, serif;
	font-size: 1.3rem;
	color: var(--text-dark);
	margin: 2rem 0 1rem 0;
	font-weight: 500;
}

.page-content blockquote {
	border-left: 4px solid var(--rose-quartz);
	padding-left: 1.5rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: var(--text-dark);
}

.page-content pre {
	background: var(--bg-cool-gray);
	padding: 1rem;
	border-radius: 8px;
	overflow-x: auto;
}

/* --- Author Bio Box --- */
.author-box {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	background-color: var(--bg-cool-gray);
	padding: 2rem;
	border-radius: 16px;
	margin-top: 3rem;
	border: 1px solid var(--border-light);
	position: relative;
}

.author-box::before {
	content: 'ABOUT THE AUTHOR';
	position: absolute;
	top: .1rem;
	right: .4rem;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-light);
	opacity: 0.3;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	pointer-events: none;
}

.author-box-image {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
}

.author-box-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.author-box-content {
	flex-grow: 1;
}

.author-box-name {
	font-family: 'Recoleta', Georgia, serif;
	font-size: 1.5rem;
	color: var(--hunter-green);
	font-weight: 500;
	margin: 0 0 0.5rem 0;
}

/* More specific selector to override general paragraph margins */
.author-box .author-box-bio {
	font-size: 0.95rem;
	color: var(--text-light);
	line-height: 1.7;
	margin-bottom: 0;
}

@media (max-width: 576px) {
	.author-box {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.author-box-image {
		width: 100px;
		height: 100px;
	}
}