/**
 * @file plugins/themes/jomTheme/styles/jom.css
 *
 * Distributed under the GNU GPL v3.
 *
 * @brief Three-column layout and visual style for the Journal of Management.
 *  Loaded after the Default Theme stylesheet and overrides it.
 */

:root {
	--jom-accent: #C8912E;
	--jom-brand: #1B3A5C;
	--jom-ink: #0F2440;
	--jom-on-accent: #1A1408;
	--jom-text: #1E2430;
	--jom-muted: #5A6372;
	--jom-ground: #F4F2EC;
	--jom-card: #FFFFFF;
	--jom-line: #E2DED3;
	--jom-line-soft: #EFECE4;
	--jom-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
	--jom-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
body.jom_theme,
.jom_theme .pkp_structure_page {
	background: var(--jom-ground);
	color: var(--jom-text);
	font-family: var(--jom-sans);
	font-size: 15px;
	line-height: 1.6;
}
.jom_theme .pkp_structure_page { margin: 0; max-width: none; }
.jom_theme a { color: var(--jom-brand); }
.jom_theme a:hover, .jom_theme a:focus { color: var(--jom-ink); }
.jom_theme a:focus-visible,
.jom_theme button:focus-visible,
.jom_theme input:focus-visible {
	outline: 3px solid var(--jom-accent);
	outline-offset: 2px;
}
.jom_theme .pkp_structure_main h1,
.jom_theme .pkp_structure_main h2,
.jom_theme .pkp_structure_main h3 {
	font-family: var(--jom-serif);
	color: var(--jom-ink);
}

.jom_wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

/* Skip links (from core template) */
.jom_theme .cmp_skip_to_content a {
	background: var(--jom-ink);
	color: #fff;
}

/* ---------- Utility bar ---------- */
.jom_utility {
	background: var(--jom-ink);
	color: #D9DEE6;
	font-size: 13px;
}
.jom_utility_inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 40px;
}
.jom_user_menu {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.jom_user_menu > li { position: relative; }
.jom_user_menu a,
.jom_theme .jom_user_menu a {
	color: #FFFFFF;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
}
.jom_user_menu a:hover { text-decoration: underline; color: #FFFFFF; }
.jom_user_menu .task_count {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--jom-accent);
	color: var(--jom-on-accent);
	font-size: 11px;
	line-height: 18px;
}

/* Dropdowns (user menu and tabs) — toggled by the Default Theme's script */
.jom_head ul ul {
	margin: 0;
	padding: 6px 0;
	list-style: none;
}
.jom_head .dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 1000;
	min-width: 200px;
	background: #FFFFFF;
	border: 1px solid var(--jom-line);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(15, 36, 64, 0.12);
}
.jom_tabs .dropdown-menu { left: 0; right: auto; }
.jom_head .dropdown-menu.show { display: block; }
.jom_head .dropdown-menu a,
.jom_theme .jom_head .dropdown-menu a {
	display: flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	color: var(--jom-text);
	font-weight: 400;
	border: 0;
	text-decoration: none;
	white-space: nowrap;
}
.jom_head .dropdown-menu a:hover,
.jom_head .dropdown-menu a:focus {
	background: var(--jom-ground);
	color: var(--jom-ink);
	text-decoration: none;
}

/* ---------- Logo row ---------- */
.jom_brand_row {
	background: #FFFFFF;
	border-bottom: 1px solid var(--jom-line);
}
.jom_brand_inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	padding-top: 20px;
	padding-bottom: 20px;
}
.jom_brand,
.jom_theme a.jom_brand {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	color: var(--jom-ink);
	min-width: 0;
}
.jom_logo_mark { flex: 0 0 auto; }
.jom_logo_img {
	max-height: 72px;
	width: auto;
	height: auto;
}
.jom_brand_text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.jom_brand_name {
	font-family: var(--jom-serif);
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.15;
}
.jom_brand_sub {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--jom-muted);
}
.jom_search {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.jom_search label {
	font-size: 13px;
	color: #4A5260;
}
.jom_search input {
	height: 44px;
	width: 240px;
	max-width: 50vw;
	box-sizing: border-box;
	padding: 0 14px;
	border: 1px solid #C9C4B6;
	border-radius: 6px;
	background: #FBFAF7;
	font: inherit;
	font-size: 14px;
	color: var(--jom-text);
}
.jom_search button {
	height: 44px;
	width: 44px;
	border: 0;
	border-radius: 6px;
	background: var(--jom-brand);
	color: #FFFFFF;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.jom_search button:hover { background: var(--jom-ink); }

.jom_nav_toggle {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid #C9C4B6;
	border-radius: 6px;
	background: #FFFFFF;
	color: var(--jom-ink);
	font: inherit;
	font-weight: 500;
	cursor: pointer;
}

/* ---------- Tabs ---------- */
.jom_tabs {
	background: #FFFFFF;
	border-bottom: 1px solid var(--jom-line);
}
.jom_tabs_inner {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 4px;
}
.jom_tab_list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.jom_tab_list > li { position: relative; }
.jom_tab_home,
.jom_theme a.jom_tab_home,
.jom_tab_list > li > a,
.jom_theme .jom_tab_list > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 16px;
	box-sizing: border-box;
	font-size: 15px;
	font-weight: 500;
	color: #4A5260;
	text-decoration: none;
	border-bottom: 3px solid transparent;
}
.jom_theme a.jom_tab_home:hover,
.jom_theme .jom_tab_list > li > a:hover {
	color: var(--jom-ink);
	border-bottom-color: var(--jom-line);
}
.jom_theme a.jom_tab_home.is_active,
.jom_theme .jom_tab_list > li.is_active > a {
	color: var(--jom-ink);
	font-weight: 600;
	border-bottom-color: var(--jom-accent);
}
.jom_tab_list > li > a[data-toggle="dropdown"]::after {
	content: "";
	display: inline-block;
	margin-left: 8px;
	width: 5px;
	height: 5px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

/* ---------- Banner ---------- */
.jom_banner {
	position: relative;
	overflow: hidden;
	background: var(--jom-brand);
	color: #FFFFFF;
}
.jom_banner_art {
	position: absolute;
	right: -40px;
	top: 0;
	opacity: 0.22;
	pointer-events: none;
}
.jom_banner_inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding-top: 60px;
	padding-bottom: 56px;
}
.jom_eyebrow {
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--jom-accent) 55%, #FFFFFF);
}
.jom_banner_title {
	margin: 0;
	max-width: 760px;
	font-family: var(--jom-serif);
	font-size: 48px;
	line-height: 1.1;
	font-weight: 600;
	color: #FFFFFF;
}
.jom_banner_text {
	margin: 0;
	max-width: 640px;
	font-size: 18px;
	line-height: 1.6;
	color: #D9E1EC;
}
.jom_banner_actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 6px;
}

/* ---------- Buttons ---------- */
.jom_btn,
.jom_theme a.jom_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	box-sizing: border-box;
}
.jom_theme a.jom_btn_accent { background: var(--jom-accent); color: var(--jom-on-accent); }
.jom_theme a.jom_btn_accent:hover { filter: brightness(0.94); color: var(--jom-on-accent); }
.jom_theme a.jom_btn_ghost { border: 1px solid #8FA3BC; color: #FFFFFF; font-weight: 500; }
.jom_theme a.jom_btn_ghost:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.jom_theme a.jom_btn_brand { background: var(--jom-brand); color: #FFFFFF; font-size: 14px; min-height: 44px; }
.jom_theme a.jom_btn_brand:hover { background: var(--jom-ink); color: #FFFFFF; }

/* ---------- Three-column layout ---------- */
.jom_theme .pkp_structure_content.jom_layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "main" "left" "right";
	gap: 28px;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 36px 24px 56px;
	box-sizing: border-box;
	float: none;
}
.jom_theme .jom_layout::before,
.jom_theme .jom_layout::after { display: none; content: none; }
.jom_theme .jom_layout .pkp_structure_main {
	grid-area: main;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
}
.jom_theme .jom_layout .pkp_structure_main::before,
.jom_theme .jom_layout .pkp_structure_main::after { display: none; content: none; }
.jom_col_left { grid-area: left; }
.jom_theme .jom_layout .pkp_structure_sidebar {
	grid-area: right;
	float: none;
	width: auto;
	padding: 0;
}

@media (min-width: 768px) {
	.jom_theme .jom_layout.jom_has_left.jom_has_right {
		grid-template-columns: minmax(0, 1fr) 260px;
		grid-template-areas: "main right" "left right";
	}
	.jom_theme .jom_layout.jom_has_left:not(.jom_has_right) {
		grid-template-columns: 240px minmax(0, 1fr);
		grid-template-areas: "left main";
	}
}
@media (min-width: 1100px) {
	.jom_theme .jom_layout.jom_has_left.jom_has_right {
		grid-template-columns: 240px minmax(0, 1fr) 280px;
		grid-template-areas: "left main right";
		align-items: start;
	}
	.jom_theme .jom_layout.jom_has_right:not(.jom_has_left) {
		grid-template-columns: minmax(0, 1fr) 280px;
		grid-template-areas: "main right";
		align-items: start;
	}
}

/* Pages with nothing beside the main column */
.jom_theme .jom_layout:not(.jom_has_left):not(.jom_has_right) .pkp_structure_main {
	max-width: 860px;
	width: 100%;
	margin: 0 auto;
}

/* ---------- Cards ---------- */
.jom_card,
.jom_theme .pkp_structure_sidebar .pkp_block {
	background: var(--jom-card);
	border: 1px solid var(--jom-line);
	border-radius: 8px;
	padding: 22px;
	box-sizing: border-box;
}
.jom_col_left,
.jom_theme .pkp_structure_sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.jom_card_title,
.jom_theme .pkp_structure_sidebar .pkp_block .title {
	display: block;
	margin: 0 0 12px;
	font-family: var(--jom-serif);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--jom-ink);
	text-transform: none;
	letter-spacing: 0;
}
.jom_facts {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px 12px;
	margin: 0;
	font-size: 14px;
}
.jom_facts dt { color: var(--jom-muted); }
.jom_facts dd { margin: 0; word-break: break-word; }

.jom_linklist { padding: 12px 0; }
.jom_linklist .jom_card_title { margin: 10px 22px 6px; }
.jom_links,
.jom_theme .pkp_structure_sidebar .pkp_block ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.jom_links a,
.jom_theme .jom_links a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border-top: 1px solid var(--jom-line-soft);
	font-size: 15px;
	text-decoration: none;
}
.jom_links a:hover { background: var(--jom-ground); }
.jom_links ul { padding: 0; list-style: none; }
.jom_links ul a { padding-left: 36px; font-size: 14px; }

.jom_editor_name { margin: 0; font-weight: 600; }
.jom_editor_aff { margin: 4px 0 0; font-size: 14px; color: var(--jom-muted); }

/* Sidebar blocks from OJS (right column) */
.jom_theme .pkp_structure_sidebar .pkp_block .content { font-size: 14px; }
.jom_theme .pkp_structure_sidebar .pkp_block li a {
	display: flex;
	align-items: center;
	min-height: 40px;
	border-top: 1px solid var(--jom-line-soft);
	text-decoration: none;
}
/* "Make a submission" block becomes the call-for-papers panel */
.jom_theme .pkp_structure_sidebar .block_make_submission {
	background: var(--jom-ink);
	border-color: var(--jom-ink);
	color: #C9D3E0;
}
.jom_theme .pkp_structure_sidebar .block_make_submission .title { color: #FFFFFF; }
.jom_theme .pkp_structure_sidebar .block_make_submission a,
.jom_theme .block_make_submission_link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 6px;
	background: var(--jom-accent);
	color: var(--jom-on-accent);
	font-weight: 600;
	text-decoration: none;
}
.jom_theme .pkp_structure_sidebar .block_make_submission a:hover { filter: brightness(0.94); color: var(--jom-on-accent); }

/* ---------- Homepage (centre column) ---------- */
.jom_index {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.jom_index > .jom_card { padding: 28px; }
.jom_index h2 {
	margin: 0 0 14px;
	font-family: var(--jom-serif);
	font-size: 26px;
	color: var(--jom-ink);
}
.jom_card_head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 20px;
}
.jom_card_head h2 { margin: 0; }
.jom_more { font-size: 14px; font-weight: 500; }
.jom_current_body {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}
.jom_cover,
.jom_cover_img {
	width: 150px;
	flex: 0 0 150px;
	border-radius: 4px;
}
.jom_cover_img { height: auto; align-self: flex-start; }
.jom_cover {
	height: 200px;
	padding: 16px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: var(--jom-ink);
	color: #FFFFFF;
}
.jom_cover_title {
	font-family: var(--jom-serif);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
}
.jom_cover_rule { display: block; width: 40px; height: 3px; background: var(--jom-accent); }
.jom_cover_meta { font-size: 12px; color: #C9D3E0; }
.jom_current_meta {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}
.jom_current_meta h3 { margin: 0; font-size: 20px; }
.jom_muted, .jom_theme .jom_muted { margin: 0; font-size: 14px; color: var(--jom-muted); }
.jom_issue_desc p { margin: 0 0 8px; }

/* Issue table of contents inside the Articles card */
.jom_articles .obj_issue_toc > .heading .cover,
.jom_articles .obj_issue_toc > .heading .description,
.jom_articles .obj_issue_toc > .heading .published { display: none; }
.jom_articles .obj_issue_toc .sections .section > h3,
.jom_articles .obj_issue_toc .section h3 {
	margin: 18px 0 4px;
	font-family: var(--jom-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jom-brand);
}
.jom_articles .obj_issue_toc .section h3::before,
.jom_articles .obj_issue_toc .section h3::after { display: none; }
.jom_articles .cmp_article_list { margin: 0; padding: 0; list-style: none; }
.jom_articles .cmp_article_list > li {
	padding: 16px 0;
	border-top: 1px solid var(--jom-line-soft);
	margin: 0;
}
.jom_articles .obj_article_summary .title,
.jom_articles .obj_article_summary h4 {
	margin: 0 0 4px;
	font-family: var(--jom-serif);
	font-size: 18px;
	line-height: 1.35;
}
.jom_articles .obj_article_summary .title a { text-decoration: none; }
.jom_articles .obj_article_summary .meta { font-size: 14px; color: var(--jom-muted); }
.jom_articles .obj_galley_link {
	border-color: var(--jom-brand);
	color: var(--jom-brand);
	border-radius: 4px;
}
.jom_articles .obj_galley_link:hover { background: var(--jom-brand); color: #FFFFFF; }

.jom_index .homepage_image img { display: block; width: 100%; height: auto; border-radius: 4px; }
.jom_announcements h2 { margin-top: 0; }

/* ---------- Footer ---------- */
.jom_theme .jom_footer {
	background: var(--jom-ink);
	color: #C9D3E0;
	border: 0;
	margin-top: 0;
}
.jom_footer_inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding-top: 36px;
	padding-bottom: 36px;
	font-size: 14px;
}
.jom_footer_brand { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.jom_footer_name {
	font-family: var(--jom-serif);
	font-size: 20px;
	font-weight: 600;
	color: #FFFFFF;
}
.jom_footer .pkp_footer_content { padding: 0; color: #C9D3E0; }
.jom_footer .pkp_footer_content p { margin: 0; }
.jom_footer a,
.jom_theme .jom_footer a { color: #FFFFFF; }
.jom_footer_links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.jom_brand_footer img { display: block; max-width: 120px; height: auto; filter: brightness(0) invert(1); opacity: 0.8; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
	.jom_nav_toggle { display: inline-flex; }
	.jom_search { order: 3; width: 100%; }
	.jom_search input { flex: 1 1 auto; max-width: none; width: auto; }
	.jom_tabs { display: none; }
	.jom_tabs.is_open { display: block; }
	.jom_tabs_inner,
	.jom_tab_list { flex-direction: column; gap: 0; width: 100%; }
	.jom_theme a.jom_tab_home,
	.jom_theme .jom_tab_list > li > a {
		width: 100%;
		border-bottom: 1px solid var(--jom-line-soft);
		border-left: 3px solid transparent;
	}
	.jom_theme a.jom_tab_home.is_active,
	.jom_theme .jom_tab_list > li.is_active > a { border-bottom-color: var(--jom-line-soft); border-left-color: var(--jom-accent); }
	.jom_tab_list ul { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 6px 16px; }
	.jom_tab_list ul a { display: flex; align-items: center; min-height: 40px; padding: 0 16px; text-decoration: none; }
	.jom_banner_title { font-size: 34px; }
	.jom_banner_art { opacity: 0.12; }
	.jom_brand_name { font-size: 22px; }
}
@media (max-width: 480px) {
	.jom_search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.jom_banner_inner { padding-top: 40px; padding-bottom: 40px; }
	.jom_index > .jom_card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.jom_theme * { transition: none !important; }
}
