/*
Theme Name:   WikiPress Child
Theme URI:    https://geopoliticalmaps.com
Description:  Child theme for WikiPress tailored for GeopoliticalMaps.com — Neutral Structural Geopolitical Atlas & Open-Data Cartographic Library.
Author:       GeopoliticalMaps.com
Author URI:   https://geopoliticalmaps.com
Template:     wikipress
Version:      1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  wikipress-child
Tags:         atlas, cartography, wiki, two-columns, left-sidebar, right-sidebar, custom-colors
*/

:root {
	--wikipress-primary: #0f4c81;
	--wikipress-primary-hover: #093154;
	--wikipress-accent: #f1f5f9;
	--wikipress-border: #cbd5e1;
	--wikipress-border-light: #e2e8f0;
	--wikipress-max-width: 1320px;
	--wikipress-content-max: 840px;
}

/* Aligned numerals across spatial & metric tables */
.infobox-table td,
.gpm-metrics-table td,
.gpm-subdivisions-table td,
.wp-block-table td {
	font-variant-numeric: tabular-nums;
}

/* ---- Atlas Hero Instant Autocomplete & Quick Pills ---- */
.gpm-search-wrap {
	position: relative;
	max-width: 760px;
}

.gpm-search-results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	background: #ffffff;
	border: 1px solid #cbd9e8;
	border-radius: 8px;
	box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
	z-index: 50;
	max-height: 360px;
	overflow-y: auto;
	text-align: left;
}

.gpm-search-results[hidden] {
	display: none;
}

.gpm-search-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 16px;
	border-bottom: 1px solid #f1f5f9;
	color: #0f172a;
	text-decoration: none;
	font-size: 0.95rem;
}

.gpm-search-item:last-child {
	border-bottom: none;
}

.gpm-search-item:hover {
	background: #f1f5f9;
	text-decoration: none;
}

.gpm-search-badge {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #0f4c81;
	flex-shrink: 0;
}

.gpm-hero-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.gpm-pill-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #0f4c81;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.18s ease;
}

.gpm-pill-link:hover {
	background: #0f4c81;
	color: #ffffff;
	border-color: #0f4c81;
	text-decoration: none;
}

/* ---- Homepage Section Containers ---- */
.gpm-focus-section {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.gpm-focus-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.gpm-focus-sidebar {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 22px;
}

.gpm-focus-callouts {
	display: grid;
	gap: 12px;
	margin: 18px 0;
}

.gpm-callout-card {
	background: #f1f5f9;
	border-left: 3px solid #0f4c81;
	padding: 10px 14px;
	border-radius: 4px;
}

.gpm-callout-card strong {
	display: block;
	font-size: 1.15rem;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
}

.gpm-callout-card span {
	font-size: 0.84rem;
	color: #475569;
}

/* ---- 7-SILO Directory Grid ---- */
.gpm-silo-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.gpm-silo-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #dbe4ee;
	border-radius: 8px;
	padding: 20px;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.gpm-silo-card:hover {
	transform: translateY(-2px);
	border-color: #0f4c81;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.gpm-silo-tag {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #0f4c81;
	margin-bottom: 8px;
}

.gpm-silo-card h3 {
	font-size: 1.08rem;
	margin: 0 0 8px;
}

.gpm-silo-card p {
	font-size: 0.88rem;
	color: #475569;
	line-height: 1.5;
	margin: 0 0 14px;
	flex: 1;
}

.gpm-silo-meta {
	font-size: 0.8rem;
	font-weight: 600;
	color: #0f4c81;
}

/* ---- Interactive Tools Strip ---- */
.gpm-tools-section {
	background: #f1f5f9;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}

.gpm-tools-strip {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.gpm-tool-card {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.gpm-tool-engine {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	padding: 2px 7px;
	border-radius: 4px;
	background: #e0f2fe;
	color: #0369a1;
	margin-bottom: 8px;
}

.gpm-tool-card h3 {
	font-size: 0.96rem;
	margin: 0 0 8px;
}

.gpm-tool-card p {
	font-size: 0.82rem;
	color: #475569;
	margin: 0 0 12px;
	line-height: 1.45;
}

/* ---- Continent Quick-Index Tabs ---- */
.gpm-region-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.gpm-region-tab {
	padding: 8px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #334155;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.gpm-region-tab[aria-selected="true"] {
	background: #0f4c81;
	color: #ffffff;
	border-color: #0f4c81;
}

.gpm-region-panel[hidden] {
	display: none;
}

.gpm-region-links {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.gpm-region-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	color: #0f172a;
	font-size: 0.9rem;
	font-weight: 500;
}

.gpm-region-link:hover {
	border-color: #0f4c81;
	background: #f1f5f9;
	text-decoration: none;
}

/* ---- Briefings Grid ---- */
.gpm-briefings-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.gpm-briefing-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.gpm-briefing-thumb img {
	width: 100%;
	height: 170px;
	object-fit: cover;
	display: block;
}

.gpm-briefing-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.gpm-briefing-body h3 {
	font-size: 1.02rem;
	margin: 6px 0 8px;
}

.gpm-briefing-meta {
	font-size: 0.78rem;
	color: #64748b;
	margin-top: auto;
	padding-top: 10px;
}

/* ---- Full-Width Tool & Archive Grids ---- */
.gpm-tool-fullwidth .content-wrapper {
	display: block;
	max-width: 1320px;
	margin: 0 auto;
}

.gpm-tool-shell {
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #ffffff;
	overflow: hidden;
	margin: 1.5rem 0;
}

.gpm-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 1.5rem 0;
}

.gpm-entity-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.74rem;
	font-weight: 700;
	text-transform: uppercase;
	background: #e2e8f0;
	color: #0f4c81;
}

@media (max-width: 1024px) {

	.gpm-focus-grid,
	.gpm-silo-grid,
	.gpm-tools-strip,
	.gpm-region-links,
	.gpm-briefings-grid,
	.gpm-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {

	.gpm-focus-grid,
	.gpm-silo-grid,
	.gpm-tools-strip,
	.gpm-region-links,
	.gpm-briefings-grid,
	.gpm-archive-grid {
		grid-template-columns: 1fr;
	}
}