/**
 * Newsroom Styles for EverSmith Theme
 *
 * Shared styles for the news/blog section.
 * Used by: home.php (blog home page) and category.php (category archives)
 *
 * Layout includes: Hero, filter buttons, horizontal card rows, and CTA section.
 * Matches the news-blog.html design from the HTML reference.
 *
 * @package EverSmith
 * @version 1.0.0
 */

/* ============================================================
   News Hero Section
   ============================================================ */

.news-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 152px 80px;
	overflow: hidden;
}

.news-hero-bg {
	position: absolute;
	inset: 0;
	background-color: #193e6e;
}

.news-hero-bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-hero-overlay {
	position: absolute;
	inset: 0;
	background: rgba(25, 62, 110, 0.8);
}

.news-hero-content {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.news-hero-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: center;
	text-align: center;
	width: 100%;
	padding: 0 168px;
}

.news-hero-title {
	font-weight: 700;
	font-size: 56px;
	line-height: 1;
	color: #fff;
	margin: 0;
}

.news-hero-subtitle {
	font-weight: 400;
	font-size: 18px;
	line-height: 1.5;
	color: #fff;
	margin: 0;
}

/* ============================================================
   News Intro Section
   ============================================================ */

.news-intro {
	padding: 100px 105px 28px;
	max-width: 1440px;
	margin: 0 auto;
	background: #fff;
}

.news-intro-text {
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	color: var(--smith-grey, #404a50);
	max-width: 1230px;
}

.news-intro-text p {
	margin: 0 0 1em;
}

.news-intro-text p:last-child {
	margin-bottom: 0;
}

/* ============================================================
   News Filters Section
   ============================================================ */

.news-filters {
	padding: 0 104px 32px;
	max-width: 1440px;
	margin: 0 auto;
	background: #fff;
}

.news-filters-row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.news-filter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 4px;
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.news-filter-btn.active {
	background-color: var(--orange, #e57440);
	color: #fafafa;
}

.news-filter-btn:not(.active) {
	background-color: rgba(229, 116, 64, 0.1);
	color: #61696e;
}

.news-filter-btn:not(.active):hover {
	background-color: rgba(229, 116, 64, 0.2);
}

/* ============================================================
   News Cards Section
   ============================================================ */

.news-cards-section {
	padding: 72px 80px;
	max-width: 1440px;
	margin: 0 auto;
	background: #fff;
}

/* flex-start: single post stays left-aligned; center looked odd with one card */
.news-cards-row {
	display: flex;
	gap: 64px;
	justify-content: flex-start;
	flex-wrap: wrap;
}

/* Add spacing between multiple rows on desktop */
.news-cards-row + .news-cards-row {
	margin-top: 64px;
}

/* ============================================================
   News Card Component
   ============================================================ */

.news-card {
	display: flex;
	gap: 32px;
	flex: 1;
	max-width: 608px;
	align-items: center;
}

.news-card-image {
	width: 288px;
	height: 288px;
	flex-shrink: 0;
	
	overflow: hidden;
	display: block;
	background: #f1f5f9;
}

.news-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.news-card-image:hover img {
	transform: scale(1.05);
}

.news-card-image--placeholder {
	background: #e2e8f0;
}

.news-card-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.news-card-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.news-card-info {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.news-card-tag {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	background-color: var(--color-neutral-lightest, #eee);
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--smith-grey, #404a50);
	width: fit-content;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.news-card-tag:hover {
	background-color: var(--smith-grey, #404a50);
	color: #fff;
}

.news-card-categories {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.news-card-category {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background-color: rgba(229, 116, 64, 0.1);
	border-radius: 4px;
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--smith-grey, #404a50);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.news-card-category:hover {
	background-color: var(--orange, #e57440);
	color: #fff;
}

.news-card-more-categories {
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	color: var(--smith-grey, #404a50);
}

.news-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.news-card-title {
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.5;
	color: var(--smith-grey, #404a50);
	margin: 0;
}

.news-card-excerpt {
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.5;
	color: var(--smith-grey, #404a50);
	margin: 0;
}

/* ============================================================
   Category Pagination
   ============================================================ */

.category-pagination-wrapper {
	padding: 48px 80px 72px;
	max-width: 1440px;
	margin: 0 auto;
	background: #fff;
}

.category-pagination-wrapper .nav-links,
.category-pagination-wrapper .pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/*
 * Only style direct children of .nav-links (page pills). Inner spans — e.g. .page-nav-arrow inside
 * the Previous link — must not match, or they get the same background/min-size and look nested.
 */
.category-pagination-wrapper .nav-links > a,
.category-pagination-wrapper .nav-links > span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 16px;
	border-radius: 8px;
	font-weight: 500;
	font-size: 14px;
	text-decoration: none;
	transition: all 0.2s ease;
	background-color: rgba(229, 116, 64, 0.1);
	color: #61696e;
}

.category-pagination-wrapper .nav-links > a:hover {
	background-color: rgba(229, 116, 64, 0.2);
}

.category-pagination-wrapper .nav-links > span.current {
	background-color: var(--orange, #e57440);
	color: #fff;
}

/*
 * Previous link: "Next →" uses Inter’s U+2192 slice (inter-u2192-wght.woff2 in eversmith-inter-font.css).
 * The ← character (U+2190) is not in that subset, so it fell back to system UI and looked heavier/different.
 * Reuse the same → glyph and flip it so the left arrow matches the right arrow’s weight and shape.
 */
.category-pagination-wrapper .nav-links > a.page-numbers.prev .page-nav-arrow,
.category-pagination-wrapper .nav-links > a.page-numbers.next .page-nav-arrow {
	display: inline-block;
}

.category-pagination-wrapper .nav-links > a.page-numbers.prev .page-nav-arrow--prev {
	transform: scaleX(-1);
}

/* Same arrow–label spacing on Previous and Next (markup uses two spans + flex gap; no loose spaces). */
.category-pagination-wrapper .nav-links > a.page-numbers.prev,
.category-pagination-wrapper .nav-links > a.page-numbers.next {
	gap: 0.35em;
}

/* ============================================================
   Empty State
   ============================================================ */

.category-empty {
	text-align: center;
	padding: 80px 40px;
}

.category-empty p {
	font-size: 18px;
	color: #64748b;
	margin: 0 0 24px;
}

/* ============================================================
   News CTA Section
   ============================================================ */

.news-cta {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 180px;
	overflow: hidden;
	background-color: #193e6e;
}

.news-cta-bg {
	position: absolute;
	inset: 0;
}

.news-cta-bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-cta-overlay {
	position: absolute;
	inset: 0;
	background: rgba(25, 62, 110, 0.8);
}

.news-cta-content {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
	align-items: center;
	width: 100%;
}

.news-cta-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-items: center;
	text-align: center;
	width: 100%;
	padding: 0 168px;
}

.news-cta-title {
	font-weight: 700;
	font-size: 40px;
	line-height: 1;
	color: #fff;
	margin: 0;
}

.news-cta-subtitle {
	font-weight: 400;
	font-size: 18px;
	line-height: 1.5;
	color: #fff;
	margin: 0;
}

/* ============================================================
   Responsive Styles
   ============================================================ */

@media (max-width: 1200px) {
	.news-hero {
		padding: 120px 60px;
	}

	.news-hero-inner {
		padding: 0 80px;
	}

	.news-filters {
		padding: 0 60px 32px;
	}

	.news-cards-section {
		padding: 60px;
	}

	.news-cards-row {
		gap: 48px;
	}

	.category-pagination-wrapper {
		padding: 48px 60px 60px;
	}

	.news-cta {
		padding: 120px 60px;
	}

	.news-cta-inner {
		padding: 0 60px;
	}
}

@media (max-width: 1024px) {
	.news-hero {
		padding: 100px 40px;
	}

	.news-hero-inner {
		padding: 0 40px;
	}

	.news-hero-title {
		font-size: 42px;
	}

	.news-filters {
		padding: 0 40px 24px;
	}

	.news-cards-section {
		padding: 48px 40px;
	}

	.news-cards-row {
		flex-direction: column;
		gap: 48px;
	}

	/* Add spacing between multiple rows on tablet/mobile */
	.news-cards-row + .news-cards-row {
		margin-top: 48px;
	}

	.news-card {
		max-width: 100%;
		flex-direction: row;
	}

	.category-pagination-wrapper {
		padding: 48px 40px;
	}

	.news-cta {
		padding: 100px 40px;
	}

	.news-cta-inner {
		padding: 0 40px;
	}

	.news-cta-title {
		font-size: 32px;
	}
}

@media (max-width: 768px) {
	.news-hero {
		padding: 80px 24px;
	}

	.news-hero-inner {
		padding: 0 20px;
	}

	.news-hero-title {
		font-size: 32px;
	}

	.news-hero-subtitle {
		font-size: 16px;
	}

	.news-intro {
		padding: 60px 24px 20px;
	}

	.news-intro-text {
		font-size: 15px;
	}

	.news-filters {
		padding: 0 24px 24px;
	}

	.news-filters-row {
		gap: 12px;
	}

	.news-filter-btn {
		font-size: 14px;
		padding: 6px 12px;
	}

	.news-cards-section {
		padding: 48px 24px;
	}

	/* Ensure consistent spacing between rows on mobile */
	.news-cards-row + .news-cards-row {
		margin-top: 48px;
	}

	.news-card {
		flex-direction: column;
		gap: 24px;
	}

	.news-card-image {
		width: 100%;
		height: auto;
		aspect-ratio: 1 / 1;
	}

	.category-pagination-wrapper {
		padding: 32px 24px;
	}

	.news-cta {
		padding: 80px 24px;
	}

	.news-cta-inner {
		padding: 0 20px;
	}

	.news-cta-title {
		font-size: 28px;
	}

	.news-cta-subtitle {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.news-hero-title {
		font-size: 28px;
	}

	.news-intro-text {
		font-size: 14px;
	}

	.news-card-title {
		font-size: 16px;
	}

	.news-card-excerpt {
		font-size: 14px;
	}
}
