/*
 * Journal feature styles
 * Conditionally enqueued by inc/journal.php on:
 *   - is_singular('journal')
 *   - is_post_type_archive('journal')
 *   - is_front_page()
 */

/* === Brand tokens used here (inherit from theme) ===
 * --nisos-primary: #ff6a00
 * --nisos-accent: #1b4dff
 * --nisos-text: #0a1020
 * --nisos-bg: #ffffff
 * --nisos-sand: #fff8f1
 * Manrope font family already loaded site-wide.
 */

/* === Listing archive header === */
.journal-archive-header {
	max-width: 1200px;
	margin: 0 auto;
	padding: 4rem 1.5rem 2rem;
	text-align: center;
}

.journal-archive-header h1 {
	font-family: 'Manrope', system-ui, sans-serif;
	font-weight: 700;
	font-size: clamp(2rem, 4vw, 3rem);
	color: #0a1020;
	margin: 0 0 0.5rem;
}

.journal-archive-header__tagline {
	color: #666;
	font-size: 1.125rem;
	margin: 0;
}

/* === Card grid === */
.journal-grid {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.5rem 5rem;
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
	.journal-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.journal-grid {
		grid-template-columns: 1fr;
		padding: 2rem 1rem 3rem;
	}
}

/* === Card === */
.journal-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.journal-card:hover,
.journal-card:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(10, 16, 32, 0.08);
}

.journal-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.journal-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #fff8f1;
}

.journal-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.journal-card__body {
	padding: 1.25rem;
}

.journal-card__title {
	font-family: 'Manrope', system-ui, sans-serif;
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.3;
	margin: 0 0 0.5rem;
	color: #0a1020;
}

.journal-card__meta {
	display: flex;
	gap: 0.75rem;
	font-size: 0.875rem;
	color: #666;
	margin: 0 0 0.75rem;
}

.journal-card__excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #333;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	line-clamp: 3;
	overflow: hidden;
}

/* === Pagination === */
.journal-pagination {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem 4rem;
	text-align: center;
}

.journal-pagination .nav-links {
	display: inline-flex;
	gap: 0.5rem;
}

.journal-pagination a,
.journal-pagination .current {
	display: inline-block;
	padding: 0.5rem 0.875rem;
	border-radius: 6px;
	color: #0a1020;
	text-decoration: none;
}

.journal-pagination .current {
	background: #ff6a00;
	color: #fff;
}

/* === Single article === */
.journal-article {
	max-width: 800px;
	margin: 0 auto;
	padding: 4rem 1.5rem;
}

.journal-article__header {
	text-align: center;
	margin-bottom: 2rem;
}

.journal-article__header h1 {
	font-family: 'Manrope', system-ui, sans-serif;
	font-weight: 700;
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.2;
	color: #0a1020;
	margin: 0 0 1rem;
}

.journal-article__meta {
	display: flex;
	justify-content: center;
	gap: 1rem;
	font-size: 0.9375rem;
	color: #666;
}

.journal-article__hero {
	margin: 0 0 3rem;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.journal-article__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.journal-article__body {
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #0a1020;
}

.journal-article__body h2,
.journal-article__body h3 {
	font-weight: 700;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	line-height: 1.3;
}

.journal-article__body h2 {
	font-size: 1.625rem;
}

.journal-article__body h3 {
	font-size: 1.25rem;
}

.journal-article__body p {
	margin: 0 0 1.25rem;
}

.journal-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 1.5rem 0;
}

.journal-article__body a {
	color: #1b4dff;
	text-decoration: underline;
}

/* === CTA block === */
.journal-cta {
	max-width: 800px;
	margin: 4rem auto;
	padding: 3rem 2rem;
	background: #fff8f1;
	border-radius: 12px;
	text-align: center;
}

.journal-cta__heading {
	font-family: 'Manrope', system-ui, sans-serif;
	font-weight: 700;
	font-size: 1.5rem;
	color: #0a1020;
	margin: 0 0 0.75rem;
}

.journal-cta__body {
	color: #333;
	margin: 0 0 1.5rem;
}

.journal-cta__button {
	display: inline-block;
	padding: 0.875rem 2rem;
	background: #ff6a00;
	color: #fff;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s ease;
}

.journal-cta__button:hover,
.journal-cta__button:focus {
	background: #e55f00;
}

/* === Homepage section === */
.homepage-journal {
	padding: 5rem 1.5rem;
	background: #fff;
}

.homepage-journal__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.homepage-journal__heading {
	font-family: 'Manrope', system-ui, sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
	text-align: center;
	margin: 0 0 3rem;
	color: #0a1020;
}

.homepage-journal__cta {
	text-align: center;
	margin-top: 2.5rem;
}

.homepage-journal__view-all {
	display: inline-block;
	padding: 0.75rem 2rem;
	border: 2px solid #ff6a00;
	color: #ff6a00;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s ease, color 0.2s ease;
}

.homepage-journal__view-all:hover,
.homepage-journal__view-all:focus {
	background: #ff6a00;
	color: #fff;
}

/* === Breadcrumbs (Yoast-rendered) === */
.journal-breadcrumbs {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1.5rem 0;
	font-size: 0.875rem;
	color: #666;
}

.journal-breadcrumbs a {
	color: #1b4dff;
	text-decoration: none;
}

.journal-breadcrumbs a:hover,
.journal-breadcrumbs a:focus {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.journal-breadcrumbs {
		padding: 1rem 1rem 0;
	}
}

/* === Search form === */
.journal-search-form {
	max-width: 600px;
	margin: 0 auto 2rem;
	display: flex;
	gap: 0.5rem;
	padding: 0 1.5rem;
}

.journal-search-form__input {
	flex: 1;
	padding: 0.625rem 0.875rem;
	font-family: inherit;
	font-size: 1rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: #0a1020;
}

.journal-search-form__input:focus {
	outline: 2px solid #ff6a00;
	outline-offset: 1px;
	border-color: #ff6a00;
}

.journal-search-form__submit {
	padding: 0.625rem 1.25rem;
	background: #ff6a00;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.journal-search-form__submit:hover,
.journal-search-form__submit:focus {
	background: #e55f00;
}

/* === Search state heading === */
.journal-search-state__query {
	color: #ff6a00;
	font-weight: 700;
}

.journal-search-state__clear {
	color: #1b4dff;
	text-decoration: none;
	font-size: 0.9375rem;
}

.journal-search-state__clear:hover,
.journal-search-state__clear:focus {
	text-decoration: underline;
}

/* === Empty state (refined for both no-articles and no-search-match) === */
.journal-grid--empty {
	padding: 4rem 1.5rem 5rem;
	text-align: center;
	color: #666;
}
