/*
 * JRSS homepage redesign
 * Scope: index page only. All selectors begin with .pkp_page_index or .pj_home.
 */

/* Managed homepage hero --------------------------------------------------- */
.pkp_page_index .pj_home > .pj_home_hero {
	position: relative !important;
	display: flex !important;
	align-items: center;
	width: 100% !important;
	min-height: clamp(360px, 48vh, 540px);
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 0 !important;
	border-radius: 0;
	background: #073b2d;
	box-shadow: none !important;
}

.pkp_page_index .pj_home_hero_media,
.pkp_page_index .pj_home_hero_scrim {
	position: absolute;
	inset: 0;
}

.pkp_page_index .pj_home_hero_media img,
.pkp_page_index .pj_home_hero_media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.pkp_page_index .pj_home_hero_scrim {
	z-index: 1;
	background: linear-gradient(90deg, rgba(3, 41, 31, 0.28), rgba(3, 41, 31, 0.82));
}

[dir="ltr"] .pkp_page_index .pj_home_hero_scrim {
	background: linear-gradient(270deg, rgba(3, 41, 31, 0.28), rgba(3, 41, 31, 0.82));
}

.pkp_page_index .pj_home_hero_overlay_light .pj_home_hero_scrim {
	opacity: 0.68;
}

.pkp_page_index .pj_home_hero_overlay_medium .pj_home_hero_scrim {
	opacity: 0.86;
}

.pkp_page_index .pj_home_hero_overlay_strong .pj_home_hero_scrim {
	opacity: 1;
}

.pkp_page_index .pj_home_hero_content {
	position: relative;
	z-index: 2;
	width: min(100%, 780px);
	margin-inline-start: 0;
	margin-inline-end: auto;
	padding: 64px;
	color: #fff;
	text-align: start;
}

.pkp_page_index .pj_home_hero_text_center .pj_home_hero_content {
	margin-inline: auto;
	text-align: center;
}

.pkp_page_index .pj_home_hero_content h1 {
	max-width: 760px;
	margin: 0 0 20px !important;
	padding: 0 !important;
	border: 0 !important;
	color: #fff !important;
	font-size: 2.75rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.pkp_page_index .pj_home_hero_content h1::before,
.pkp_page_index .pj_home_hero_content h1::after {
	display: none !important;
	content: none !important;
}

.pkp_page_index .pj_home_hero_content p {
	max-width: 720px;
	margin: 0 0 30px !important;
	color: rgba(255, 255, 255, 0.96) !important;
	font-size: 1.18rem;
	font-weight: 500;
	line-height: 1.9;
}

.pkp_page_index .pj_home_hero_text_center .pj_home_hero_content p {
	margin-inline: auto !important;
}

.pkp_page_index .pj_home_hero_action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 10px 24px;
	border: 2px solid #fff;
	border-radius: 6px;
	background: #fff;
	color: #075f46 !important;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none !important;
	transition: background-color 160ms ease, color 160ms ease;
}

.pkp_page_index .pj_home_hero_action:hover,
.pkp_page_index .pj_home_hero_action:focus-visible {
	background: transparent;
	color: #fff !important;
}

.pkp_page_index .pj_home_hero_action:focus-visible {
	outline: 3px solid #f5a800;
	outline-offset: 4px;
}

@media (max-width: 720px) {
	.pkp_page_index .pj_home > .pj_home_hero {
		min-height: 440px;
		margin-bottom: 48px !important;
		border-radius: 0;
	}

	.pkp_page_index .pj_home_hero_content {
		width: 100%;
		padding: 40px 24px;
	}

	.pkp_page_index .pj_home_hero_content h1 {
		font-size: 2rem !important;
		line-height: 1.4 !important;
	}

	.pkp_page_index .pj_home_hero_content p {
		font-size: 1rem;
		line-height: 1.85;
	}
}

.pkp_page_index {
	--home-green-900: #092a1e;
	--home-green-800: #0d3b2a;
	--home-green-700: #14573a;
	--home-green-600: #166a45;
	--home-green-500: #1b8354;
	--home-green-100: #dff3e8;
	--home-green-50: #eff8f3;
	--home-gold-500: #d6a329;
	--home-ink: #161c24;
	--home-muted: #56606f;
	--home-border: #d8e1dc;
	--home-border-soft: #e8eeeb;
	--home-surface: #ffffff;
	--home-surface-soft: #f6f9f7;
	--home-radius: 8px;
	--home-shadow: 0 18px 48px rgba(9, 42, 30, 0.09);
}

/* The homepage is a wide editorial canvas. The sidebar remains available on
   every other OJS page. */
.pkp_page_index .pkp_structure_content,
.pkp_page_index .pkp_structure_content.has_sidebar {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 0 88px !important;
}

.pkp_page_index .pkp_structure_sidebar {
	display: none !important;
}

.pkp_page_index .pkp_structure_main,
.pkp_page_index .pkp_structure_content.has_sidebar .pkp_structure_main {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.pj_home,
.pj_home::before,
.pj_home::after,
.pj_home > section,
.pj_home > section::before,
.pj_home > section::after {
	box-sizing: border-box !important;
}

.pj_home,
.pj_home::before,
.pj_home::after {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	content: none !important;
}

.pj_home > section {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Defeat the legacy current_issue card with an index-specific selector. */
.pkp_page_index .pj_home .pj_home_issue,
.pkp_page_index .pj_home .pj_home_issue:hover,
.pkp_page_index .pj_home .pj_home_issue:focus-within {
	padding: 0 clamp(24px, 5vw, 96px) !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible !important;
}

.pj_home > section + section {
	margin-top: 88px !important;
}

.pkp_page_index .pj_home .cmp_announcements,
.pkp_page_index .pj_home .pj_home_about {
	padding-inline: clamp(24px, 5vw, 96px) !important;
}

/* Section title */
.pj_home .pj_home_section_header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin: 0 0 32px !important;
	padding: 0 0 24px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--home-border) !important;
}

.pj_home .pj_home_section_heading {
	min-width: 0;
}

.pj_home .pj_home_eyebrow {
	display: block;
	margin: 0 0 10px;
	color: var(--home-green-600);
	font-size: 0.94rem;
	font-weight: 700;
	line-height: 1.5;
}

.pj_home .pj_home_section_header h2,
.pj_home .pj_home_about h2 {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--home-green-900) !important;
	font-size: clamp(1.7rem, 2.6vw, 2.45rem) !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
}

.pj_home .pj_home_section_header h2::after,
.pj_home .pj_home_about h2::after {
	display: none !important;
	content: none !important;
}

.pj_home .pj_home_header_action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	padding: 9px 18px;
	border: 1px solid var(--home-green-500);
	border-radius: 6px;
	color: var(--home-green-700) !important;
	background: var(--home-surface);
	font-size: 0.94rem;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.pj_home .pj_home_header_action:hover,
.pj_home .pj_home_header_action:focus-visible {
	border-color: var(--home-green-700);
	color: #fff !important;
	background: var(--home-green-700);
}

.pj_home_action_arrow {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-inline-end: 2px solid currentColor;
	transform: rotate(-135deg);
}

html[dir="ltr"] .pj_home_action_arrow {
	transform: rotate(45deg);
}

/* Current issue overview */
.pj_home .pj_home_issue_content,
.pj_home .obj_issue_toc,
.pj_home .obj_issue_toc > .heading,
.pj_home .obj_issue_toc > .galleys,
.pj_home .obj_issue_toc > .sections,
.pj_home .obj_issue_toc .section,
.pj_home .cmp_article_list,
.pj_home .cmp_article_list > li {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.pj_home .obj_issue_toc {
	display: grid !important;
	grid-template-columns: 238px minmax(0, 1fr);
	grid-template-areas:
		"cover actions"
		"cover articles";
	gap: 0 48px !important;
	align-items: start;
}

.pj_home .obj_issue_toc > .heading {
	grid-area: cover;
	display: flex !important;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	top: 108px;
}

.pj_home .obj_issue_toc > .heading .cover {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.pj_home .obj_issue_toc > .heading .cover img {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border: 1px solid var(--home-border);
	border-radius: var(--home-radius);
	background: #fff;
	box-shadow: var(--home-shadow);
}

.pj_home .obj_issue_toc > .heading .published {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100% !important;
	margin: 0 !important;
	padding: 14px 0 0 !important;
	border: 0 !important;
	border-top: 1px solid var(--home-border-soft) !important;
	color: var(--home-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

.pj_home .obj_issue_toc > .heading .published .label {
	font-weight: 600;
}

.pj_home .obj_issue_toc > .heading .published .value {
	color: var(--home-ink);
	font-weight: 700;
}

.pj_home .obj_issue_toc > .galleys {
	grid-area: actions;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 68px;
	padding: 0 0 24px !important;
	border-bottom: 1px solid var(--home-green-500) !important;
}

.pj_home .obj_issue_toc > .galleys::before,
.pj_home .obj_issue_toc > .galleys::after,
.pj_home .obj_issue_toc .section::before,
.pj_home .obj_issue_toc .section::after {
	display: none !important;
	content: none !important;
	width: 0 !important;
	height: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.pj_home .obj_issue_toc > .galleys h3 {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--home-green-900) !important;
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
}

.pj_home .obj_issue_toc > .galleys h3::after {
	display: none !important;
	content: none !important;
}

.pj_home .obj_issue_toc > .galleys .galleys_links {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: flex-end !important;
	gap: 8px;
	margin: 0 !important;
	padding: 0 !important;
}

.pj_home .obj_issue_toc > .galleys .obj_galley_link {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	max-width: 420px;
	padding: 9px 16px !important;
	border: 1px solid var(--home-green-500) !important;
	border-radius: 6px !important;
	color: #fff !important;
	background: var(--home-green-500) !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	line-height: 1.45 !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

.pj_home .obj_issue_toc > .galleys .obj_galley_link:hover,
.pj_home .obj_issue_toc > .galleys .obj_galley_link:focus-visible {
	border-color: var(--home-green-700) !important;
	background: var(--home-green-700) !important;
}

.pj_home .obj_issue_toc > .sections {
	grid-area: articles;
	min-width: 0;
	padding-top: 30px !important;
}

.pj_home .obj_issue_toc .section > h3 {
	margin: 0 0 12px !important;
	padding: 0 0 20px !important;
	border: 0 !important;
	color: var(--home-green-700) !important;
	font-size: 1.28rem !important;
	font-weight: 800 !important;
	line-height: 1.5 !important;
}

.pj_home .obj_issue_toc .section > h3::after {
	display: none !important;
	content: none !important;
}

/* Articles are editorial rows, not cards. */
.pj_home .cmp_article_list {
	display: block !important;
	list-style: none !important;
}

.pj_home .cmp_article_list > li {
	display: block !important;
	border-top: 1px solid var(--home-green-500) !important;
}

.pj_home .cmp_article_list > li:last-child {
	border-bottom: 1px solid var(--home-green-500) !important;
}

.pj_home .obj_article_summary,
.pj_home .obj_article_summary::before,
.pj_home .obj_article_summary::after {
	float: none !important;
	clear: none !important;
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: 0 !important;
}

.pj_home .obj_article_summary::before,
.pj_home .obj_article_summary::after {
	display: none !important;
	content: none !important;
}

.pj_home .obj_article_summary {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
	grid-template-areas:
		"title action"
		"meta action";
	gap: 8px 28px;
	align-items: center;
	min-height: 132px;
	padding: 26px 4px !important;
	overflow: visible !important;
}

.pj_home .obj_article_summary .title {
	grid-area: title;
	width: auto !important;
	max-width: 780px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--home-green-900) !important;
	font-size: 1.08rem !important;
	font-weight: 700 !important;
	line-height: 1.65 !important;
	text-align: start !important;
}

.pj_home .obj_article_summary .title a,
.pj_home .obj_article_summary .title a:link,
.pj_home .obj_article_summary .title a:visited {
	color: var(--home-green-600) !important;
	text-decoration: none !important;
}

.pj_home .obj_article_summary .title a:hover,
.pj_home .obj_article_summary .title a:focus-visible {
	color: var(--home-green-800) !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 5px !important;
}

.pj_home .obj_article_summary .meta {
	grid-area: meta;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--home-muted) !important;
	font-size: 0.92rem !important;
	line-height: 1.65 !important;
	text-align: start !important;
}

.pj_home .obj_article_summary .authors,
.pj_home .obj_article_summary .pages,
.pj_home .obj_article_summary .published {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	color: inherit !important;
	text-align: start !important;
}

.pj_home .obj_article_summary > .galleys_links {
	grid-area: action;
	display: flex !important;
	align-items: center;
	justify-content: flex-end !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.pj_home .obj_article_summary > .galleys_links li {
	display: block !important;
	width: 100%;
	margin: 0 !important;
}

.pj_home .obj_article_summary .obj_galley_link {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 46px;
	height: auto !important;
	max-height: none !important;
	padding: 11px 14px !important;
	overflow: visible !important;
	border: 1px solid var(--home-green-500) !important;
	border-radius: 6px !important;
	color: var(--home-green-700) !important;
	background: var(--home-green-50) !important;
	font-size: 0.82rem !important;
	font-weight: 700 !important;
	line-height: 1.55 !important;
	text-align: center !important;
	text-decoration: none !important;
	white-space: normal !important;
	overflow-wrap: anywhere !important;
	word-break: normal !important;
	box-shadow: none !important;
}

.pj_home .obj_article_summary .obj_galley_link:hover,
.pj_home .obj_article_summary .obj_galley_link:focus-visible {
	color: #fff !important;
	background: var(--home-green-600) !important;
}

/* About journal band */
.pj_home .pj_home_about {
	display: grid !important;
	grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
	gap: 64px;
	padding: 56px !important;
	border: 1px solid #cfe2d8 !important;
	border-radius: var(--home-radius) !important;
	background: var(--home-green-50) !important;
	box-shadow: none !important;
}

.pj_home .pj_home_about > #homepageAbout {
	display: none !important;
}

.pj_home .pj_home_about_heading {
	align-self: start;
	padding-top: 0 !important;
}

.pj_home .pj_home_about_heading h2 {
	color: var(--home-green-600) !important;
}

.pj_home .pj_home_about_content,
.pj_home .additional_content {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--home-ink) !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 2 !important;
}

.pj_home .pj_home_about_content p,
.pj_home .additional_content p {
	max-width: none !important;
	margin: 0 0 18px !important;
	font-weight: 400 !important;
}

.pj_home .pj_home_about_content strong,
.pj_home .additional_content strong {
	font-weight: 500 !important;
}

.pj_home .pj_home_about_content ol,
.pj_home .pj_home_about_content ul,
.pj_home .additional_content ol,
.pj_home .additional_content ul {
	margin: 16px 0 0 !important;
	padding-inline-start: 24px !important;
}

.pj_home .pj_home_about_content li,
.pj_home .additional_content li {
	margin-bottom: 8px !important;
}

/* Announcements retain OJS content while matching the same visual rhythm. */
.pj_home .cmp_announcements {
	margin: 0 0 72px !important;
	padding: 40px !important;
	border: 1px solid var(--home-border) !important;
	border-radius: var(--home-radius) !important;
	background: var(--home-surface) !important;
	box-shadow: var(--home-shadow) !important;
}

@media (max-width: 980px) {
	.pkp_page_index .pkp_structure_content,
	.pkp_page_index .pkp_structure_content.has_sidebar {
		width: 100% !important;
		max-width: none !important;
		padding: 0 0 64px !important;
	}

	.pj_home > section + section {
		margin-top: 64px !important;
	}

	.pj_home .obj_issue_toc {
		grid-template-columns: 190px minmax(0, 1fr);
		gap: 0 28px !important;
	}

	.pj_home .obj_issue_toc > .heading {
		position: static;
	}

	.pj_home .obj_article_summary {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"title"
			"meta"
			"action";
		gap: 8px;
		padding: 24px 0 !important;
	}

	.pj_home .obj_article_summary > .galleys_links {
		justify-content: flex-start !important;
		margin-top: 8px !important;
	}

	.pj_home .obj_article_summary > .galleys_links li {
		width: auto;
		max-width: 100%;
	}

	.pj_home .obj_article_summary .obj_galley_link {
		width: auto !important;
		max-width: 100%;
	}

	.pj_home .pj_home_about {
		grid-template-columns: 1fr;
		gap: 28px;
		padding: 40px !important;
	}
}

@media (max-width: 680px) {
	.pkp_page_index .pkp_structure_content,
	.pkp_page_index .pkp_structure_content.has_sidebar {
		width: 100% !important;
		max-width: none !important;
		padding: 0 0 52px !important;
	}

	.pj_home .pj_home_section_header {
		align-items: flex-start;
		flex-direction: column;
		gap: 20px;
		margin-bottom: 24px !important;
		padding-bottom: 20px !important;
	}

	.pj_home .pj_home_section_header h2,
	.pj_home .pj_home_about h2 {
		font-size: 1.55rem !important;
	}

	.pj_home .pj_home_header_action {
		width: 100%;
	}

	.pj_home .obj_issue_toc {
		display: flex !important;
		flex-direction: column;
		gap: 28px !important;
	}

	.pj_home .obj_issue_toc > .heading {
		width: 100%;
	}

	.pj_home .obj_issue_toc > .heading .cover {
		width: min(72vw, 250px) !important;
		margin-inline: auto !important;
	}

	.pj_home .obj_issue_toc > .heading .published {
		width: min(72vw, 250px) !important;
		margin-inline: auto !important;
	}

	.pj_home .obj_issue_toc > .galleys {
		align-items: flex-start;
		flex-direction: column;
		width: 100%;
		padding-bottom: 24px !important;
	}

	.pj_home .obj_issue_toc > .galleys .galleys_links,
	.pj_home .obj_issue_toc > .galleys .galleys_links li,
	.pj_home .obj_issue_toc > .galleys .obj_galley_link {
		width: 100% !important;
		max-width: none !important;
	}

	.pj_home .obj_issue_toc > .sections {
		width: 100%;
		padding-top: 0 !important;
	}

	.pj_home .obj_article_summary {
		min-height: 0;
		padding: 22px 0 !important;
	}

	.pj_home .obj_article_summary .title {
		font-size: 1rem !important;
		line-height: 1.7 !important;
	}

	.pj_home .obj_article_summary > .galleys_links,
	.pj_home .obj_article_summary > .galleys_links li,
	.pj_home .obj_article_summary .obj_galley_link {
		width: 100% !important;
		max-width: none !important;
	}

	.pj_home .pj_home_about {
		gap: 22px;
		padding: 28px 22px !important;
	}

	.pj_home .pj_home_about_content,
	.pj_home .additional_content {
		font-size: 0.96rem !important;
		line-height: 1.9 !important;
	}

	.pj_home .cmp_announcements {
		margin-bottom: 48px !important;
		padding: 24px 20px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pj_home *,
	.pj_home *::before,
	.pj_home *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
