/**
 * plugins/themes/jcmp/styles/jcmp.css
 *
 * JCMP theme: a modern design layer over the OJS default theme.
 * All colors, fonts and radii are CSS variables, so rebranding means
 * editing the :root block below only.
 */

:root {
	--jcmp-primary: #153a66;
	--jcmp-primary-dark: #0e2a4b;
	--jcmp-accent: #d99a25;
	--jcmp-accent-dark: #b57e17;
	--jcmp-ink: #1d2733;
	--jcmp-muted: #5b6b7c;
	--jcmp-bg: #f4f6f9;
	--jcmp-card: #ffffff;
	--jcmp-border: #dde4ec;
	--jcmp-radius: 10px;
	--jcmp-shadow: 0 2px 10px rgba(14, 42, 75, 0.08);
	--jcmp-shadow-hover: 0 8px 24px rgba(14, 42, 75, 0.14);
	--jcmp-font-ui: 'Inter', 'Noto Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
	--jcmp-font-head: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

html {
	overflow-x: hidden;
}

body {
	font-family: var(--jcmp-font-ui);
	color: var(--jcmp-ink);
	background: var(--jcmp-bg);
	overflow-x: hidden;
}

h1, h2, h3, h4,
.pkp_site_name,
.obj_article_summary > .title,
.homepage_about h2,
.current_issue h2,
.jcmp_hero_title {
	font-family: var(--jcmp-font-head);
}

a {
	color: var(--jcmp-primary);
}

a:hover, a:focus {
	color: var(--jcmp-primary-dark);
}

/* -------------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------------- */

.pkp_structure_head {
	background: #ffffff;
	border-bottom: 1px solid var(--jcmp-border);
	position: sticky;
	top: 0;
	z-index: 999;
	transition: box-shadow 0.25s ease;
}

.pkp_structure_head.jcmp_scrolled {
	box-shadow: 0 4px 18px rgba(14, 42, 75, 0.18);
}

.pkp_site_name_wrapper {
	padding-top: 1.25rem;
	padding-bottom: 1rem;
}

/* Keep the journal logo/banner compact */
.pkp_site_name img {
	max-height: 96px;
	width: auto;
	max-width: 100%;
	transition: max-height 0.25s ease;
}

.pkp_structure_head.jcmp_scrolled .pkp_site_name img {
	max-height: 56px;
}

/* Primary navigation as a navy bar */
.pkp_navigation_primary_row {
	background: var(--jcmp-primary);
	border-radius: var(--jcmp-radius) var(--jcmp-radius) 0 0;
	box-shadow: var(--jcmp-shadow);
}

.pkp_navigation_primary_wrapper .pkp_nav_list > li > a {
	color: #ffffff;
	font-weight: 500;
	letter-spacing: 0.01em;
	padding: 0.9rem 1.1rem;
	border-bottom: 3px solid transparent;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.pkp_navigation_primary_wrapper .pkp_nav_list > li > a:hover,
.pkp_navigation_primary_wrapper .pkp_nav_list > li > a:focus {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
	border-bottom-color: var(--jcmp-accent);
	text-decoration: none;
}

/* Dropdowns */
.pkp_nav_list ul {
	background: #ffffff;
	border: 1px solid var(--jcmp-border);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow-hover);
	padding: 0.35rem 0;
}

.pkp_nav_list ul a {
	color: var(--jcmp-ink);
}

.pkp_nav_list ul a:hover,
.pkp_nav_list ul a:focus {
	background: var(--jcmp-bg);
	color: var(--jcmp-primary);
}

/* Search link in the nav bar */
.pkp_navigation_search_wrapper .pkp_search {
	color: #ffffff;
}

.pkp_navigation_search_wrapper .pkp_search:hover,
.pkp_navigation_search_wrapper .pkp_search:focus {
	color: var(--jcmp-accent);
}

/* Register / Login as small buttons */
.pkp_navigation_user.pkp_nav_list li a {
	border-radius: 999px;
	font-weight: 600;
}

.pkp_navigation_user.pkp_nav_list li:last-child a {
	background: var(--jcmp-accent);
	border-color: var(--jcmp-accent);
	color: var(--jcmp-primary-dark);
}

.pkp_navigation_user.pkp_nav_list li:last-child a:hover,
.pkp_navigation_user.pkp_nav_list li:last-child a:focus {
	background: var(--jcmp-accent-dark);
	border-color: var(--jcmp-accent-dark);
	color: #ffffff;
}

/* Mobile menu toggle */
.pkp_site_nav_toggle {
	color: var(--jcmp-primary);
}

/* Neutralize the default theme's base-colour option accents.
 * Whatever colour was saved for the default theme must not leak through. */
.pkp_site_nav_menu {
	background: var(--jcmp-primary);
}

.pkp_navigation_primary > li > a:focus,
.pkp_navigation_user > li > a:focus,
.pkp_navigation_search_wrapper a:focus {
	background: rgba(0, 0, 0, 0.84);
	color: var(--jcmp-accent);
}

.pkp_navigation_user > li > a:focus .task_count {
	background: var(--jcmp-accent);
	color: var(--jcmp-primary-dark);
}

/* -------------------------------------------------------------------------
 * Homepage layout: full-width main column, sidebar blocks in a row
 * ---------------------------------------------------------------------- */

@media (min-width: 992px) {
	.pkp_page_index .pkp_structure_main {
		width: 100%;
		float: none;
		padding-bottom: 2rem;
	}

	.pkp_page_index .pkp_structure_sidebar {
		width: 100%;
		float: none;
		display: flex;
		flex-wrap: wrap;
		gap: 1.5rem;
		margin-top: 2.5rem;
	}

	.pkp_page_index .pkp_structure_sidebar .pkp_block {
		flex: 1 1 280px;
		margin-bottom: 0;
	}
}

/* The default theme draws a 1px column divider through the main column.
 * On the homepage the main column is full width, so the divider must go. */
.pkp_page_index .pkp_structure_main:before,
.pkp_page_index .pkp_structure_main:after {
	display: none;
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */

.jcmp_hero {
	background:
		linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 45%),
		linear-gradient(135deg, var(--jcmp-primary) 0%, var(--jcmp-primary-dark) 100%);
	border-radius: var(--jcmp-radius);
	color: #ffffff;
	margin: 1.5rem 0 2.5rem;
	padding: 3.5rem 2.5rem;
	position: relative;
	overflow: hidden;
	box-shadow: var(--jcmp-shadow-hover);
}

.jcmp_hero:after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 24px 24px;
	pointer-events: none;
}

.jcmp_hero_inner {
	position: relative;
	z-index: 1;
	max-width: 720px;
}

.jcmp_hero_kicker {
	color: var(--jcmp-accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0 0 0.75rem;
}

.jcmp_hero_title {
	color: #ffffff;
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 1rem;
}

.jcmp_hero_tagline {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.05rem;
	line-height: 1.6;
	margin: 0 0 1.75rem;
	max-width: 620px;
}

.jcmp_hero_actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
}

/* JCMP buttons */
.jcmp_btn {
	display: inline-block;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.75rem 1.7rem;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.jcmp_btn:hover, .jcmp_btn:focus {
	text-decoration: none;
	transform: translateY(-1px);
}

.jcmp_btn_accent {
	background: var(--jcmp-accent);
	color: var(--jcmp-primary-dark);
}

.jcmp_btn_accent:hover, .jcmp_btn_accent:focus {
	background: var(--jcmp-accent-dark);
	color: #ffffff;
}

.jcmp_btn_outline {
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.65);
	color: #ffffff;
}

.jcmp_btn_outline:hover, .jcmp_btn_outline:focus {
	background: rgba(255, 255, 255, 0.12);
	border-color: #ffffff;
	color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Call for papers card (shown while there is no published issue)
 * ---------------------------------------------------------------------- */

.jcmp_cfp {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	background: var(--jcmp-card);
	border: 1px solid var(--jcmp-border);
	border-left: 5px solid var(--jcmp-accent);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow);
	margin-bottom: 2.5rem;
	padding: 1.75rem 2rem;
}

.jcmp_cfp_text {
	max-width: 640px;
}

.jcmp_cfp h2 {
	font-size: 1.5rem;
	margin: 0 0 0.5rem;
}

.jcmp_cfp p {
	color: var(--jcmp-muted);
	line-height: 1.65;
	margin: 0;
}

.jcmp_cfp .jcmp_btn_accent {
	border: none;
	white-space: nowrap;
}

/* -------------------------------------------------------------------------
 * About section
 * ---------------------------------------------------------------------- */

.homepage_about {
	background: var(--jcmp-card);
	border: 1px solid var(--jcmp-border);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow);
	margin-bottom: 2.5rem;
	padding: 2rem 2.25rem;
}

.homepage_about h2 {
	font-size: 1.6rem;
	margin-top: 0;
	padding-bottom: 0.6rem;
	border-bottom: 3px solid var(--jcmp-accent);
	display: inline-block;
}

.homepage_about p,
.homepage_about li {
	line-height: 1.75;
	color: var(--jcmp-ink);
}

/* -------------------------------------------------------------------------
 * Current issue and article cards
 * ---------------------------------------------------------------------- */

.current_issue > h2 {
	font-size: 1.6rem;
	padding-bottom: 0.6rem;
	border-bottom: 3px solid var(--jcmp-accent);
	display: inline-block;
}

.current_issue .current_issue_title {
	color: var(--jcmp-muted);
	font-weight: 600;
	margin-bottom: 1.5rem;
}

.obj_article_summary {
	background: var(--jcmp-card);
	border: 1px solid var(--jcmp-border);
	border-left: 4px solid var(--jcmp-primary);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow);
	margin-bottom: 1.25rem;
	padding: 1.4rem 1.6rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.obj_article_summary:hover {
	box-shadow: var(--jcmp-shadow-hover);
	transform: translateY(-2px);
}

.obj_article_summary > .title {
	font-size: 1.2rem;
	line-height: 1.4;
	margin-bottom: 0.35rem;
}

.obj_article_summary > .title a {
	color: var(--jcmp-ink);
}

.obj_article_summary > .title a:hover,
.obj_article_summary > .title a:focus {
	color: var(--jcmp-primary);
	text-decoration: none;
}

.obj_article_summary .meta {
	color: var(--jcmp-muted);
	font-size: 0.9rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 1rem;
}

.obj_article_summary .meta .authors {
	font-weight: 500;
}

/* DOI badge */
.jcmp_doi a {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	background: rgba(21, 58, 102, 0.07);
	border: 1px solid var(--jcmp-border);
	border-radius: 999px;
	font-size: 0.78rem;
	padding: 0.15em 0.8em;
	text-decoration: none;
}

.jcmp_doi a:hover, .jcmp_doi a:focus {
	background: var(--jcmp-primary);
	color: #ffffff;
}

.jcmp_doi .jcmp_doi_label {
	background: var(--jcmp-primary);
	border-radius: 999px;
	color: #ffffff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 0.1em 0.55em;
}

.jcmp_doi a:hover .jcmp_doi_label,
.jcmp_doi a:focus .jcmp_doi_label {
	background: var(--jcmp-accent);
	color: var(--jcmp-primary-dark);
}

/* Galley (PDF) links */
.obj_article_summary .galleys_links li a {
	border-radius: 999px;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Announcements
 * ---------------------------------------------------------------------- */

.cmp_announcements {
	background: var(--jcmp-card);
	border: 1px solid var(--jcmp-border);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow);
	margin-bottom: 2.5rem;
	padding: 1.75rem 2rem;
}

.cmp_announcements > .title {
	font-family: var(--jcmp-font-head);
	font-size: 1.4rem;
	padding-bottom: 0.6rem;
	border-bottom: 3px solid var(--jcmp-accent);
	display: inline-block;
}

/* -------------------------------------------------------------------------
 * Sidebar blocks
 * ---------------------------------------------------------------------- */

.pkp_block {
	background: var(--jcmp-card);
	border: 1px solid var(--jcmp-border);
	border-radius: var(--jcmp-radius);
	box-shadow: var(--jcmp-shadow);
	margin-bottom: 1.75rem;
	padding: 1.4rem 1.6rem;
}

.pkp_block .title {
	font-family: var(--jcmp-font-ui);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--jcmp-primary);
	border-bottom: 2px solid var(--jcmp-accent);
	padding-bottom: 0.5rem;
	margin-bottom: 0.9rem;
}

.pkp_block a {
	font-weight: 500;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.pkp_structure_footer_wrapper {
	background: var(--jcmp-primary-dark);
	color: #c9d4e2;
	margin-top: 3rem;
}

.pkp_structure_footer {
	padding-top: 2rem;
	padding-bottom: 2rem;
}

.pkp_footer_content a {
	color: #ffffff;
	font-weight: 500;
}

.pkp_footer_content a:hover,
.pkp_footer_content a:focus {
	color: var(--jcmp-accent);
}

/* Journal logo above the footer text (shipped inside the theme) */
.pkp_footer_content {
	background: url('../images/jcmp-logo-footer.png') no-repeat left top;
	background-size: 250px auto;
	padding-top: 92px;
	min-height: 40px;
}

/* Replace the platform badge slot with the JCMP gold mark */
.pkp_brand_footer {
	opacity: 1;
}

.pkp_brand_footer img {
	display: none;
}

.pkp_brand_footer a {
	display: block;
	width: 52px;
	height: 52px;
	background: url('../images/jcmp-badge-gold.png') no-repeat center;
	background-size: contain;
}

[dir="rtl"] .pkp_footer_content {
	background-position: right top;
}

@media (max-width: 767px) {
	.pkp_footer_content {
		background-size: 200px auto;
		padding-top: 76px;
	}
}

/* -------------------------------------------------------------------------
 * Small screens
 * ---------------------------------------------------------------------- */

@media (max-width: 767px) {
	.jcmp_hero {
		padding: 2.25rem 1.5rem;
	}

	.jcmp_hero_title {
		font-size: 1.8rem;
	}

	.jcmp_cfp {
		padding: 1.4rem 1.25rem;
	}

	.homepage_about {
		padding: 1.4rem 1.25rem;
	}

	.pkp_site_name img {
		max-height: 64px;
	}
}


/* Hide uploaded header logo, show theme-bundled navy logo */
.pkp_site_name a.is_img img { display: none; }
.pkp_site_name a.is_img { display: inline-block; width: 320px; height: 69px; background: url('../images/jcmp-logo-header.png') no-repeat left center; background-size: contain; }
