/**
 * Country Playbooks hub — region toolbar and section layout.
 */

.page-template-page-country-playbooks {
	--pb-gold: #cfaa43;
	--pb-gold-dim: rgba(207, 170, 67, 0.14);
	--pb-gold-border: rgba(207, 170, 67, 0.28);
}

.page-template-page-country-playbooks .series-master-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem 4rem;
}

.page-template-page-country-playbooks .mcca-mc-wrap .mc-grid {
	align-items: start;
	margin-bottom: 2rem;
}

/* ─── Region toolbar (sticky) ─── */
.page-template-page-country-playbooks .pb-region-toolbar {
	position: sticky;
	top: var(--cfo-header-offset, 106px);
	z-index: 40;
	margin: 0 0 2.5rem;
	padding: 1.15rem 0 0;
	background: linear-gradient(180deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.94) 100%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body.admin-bar .page-template-page-country-playbooks .pb-region-toolbar {
	top: calc(var(--cfo-header-offset, 106px) + 32px);
}

.page-template-page-country-playbooks .pb-region-toolbar__label {
	display: block;
	margin: 0 0 0.65rem;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.58rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(207, 170, 67, 0.72);
}

.page-template-page-country-playbooks .pb-region-nav {
	display: flex;
	align-items: stretch;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.page-template-page-country-playbooks .pb-region-nav::-webkit-scrollbar {
	display: none;
}

.page-template-page-country-playbooks .pb-nav-item {
	position: relative;
	flex: 0 0 auto;
	padding: 0.9rem 1.15rem 0.95rem;
	border: none;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	color: rgba(232, 228, 219, 0.48);
	text-decoration: none;
	font-family: 'Libre Franklin', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	line-height: 1.25;
	white-space: nowrap;
	cursor: pointer;
	scroll-snap-align: start;
	appearance: none;
	-webkit-appearance: none;
	transition:
		color 0.22s ease,
		border-color 0.22s ease,
		background 0.22s ease;
}

.page-template-page-country-playbooks .pb-nav-item::after {
	content: '';
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 0;
	height: 2px;
	border-radius: 2px 2px 0 0;
	background: var(--pb-gold);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.24s ease;
}

.page-template-page-country-playbooks .pb-nav-item:hover {
	color: rgba(255, 255, 255, 0.88);
	background: rgba(255, 255, 255, 0.02);
	border-bottom-color: transparent;
}

.page-template-page-country-playbooks .pb-nav-item.active {
	color: var(--pb-gold);
	background: transparent;
	border-bottom-color: transparent;
	box-shadow: none;
}

.page-template-page-country-playbooks .pb-nav-item.active::after {
	transform: scaleX(1);
}

.page-template-page-country-playbooks .pb-nav-item:focus-visible {
	outline: 2px solid rgba(207, 170, 67, 0.55);
	outline-offset: 2px;
}

/* ─── Region sections ─── */
.page-template-page-country-playbooks .pb-region-panels {
	min-height: 200px;
}

.page-template-page-country-playbooks .pb-playbook-region[hidden] {
	display: none !important;
}

.page-template-page-country-playbooks .pb-playbook-region.is-active-region + .pb-playbook-region {
	margin-top: 0;
}

.page-template-page-country-playbooks .pb-playbook-region {
	scroll-margin-top: calc(var(--cfo-header-offset, 106px) + 7rem);
}

.page-template-page-country-playbooks .pb-playbook-region + .pb-playbook-region {
	margin-top: 2.75rem;
	padding-top: 0.25rem;
}

.page-template-page-country-playbooks .pb-section-title {
	margin: 0 0 1.35rem;
	padding: 0;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.3;
	color: var(--pb-gold);
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 1rem;
	position: static;
}

.page-template-page-country-playbooks .pb-section-title::after {
	content: '';
	flex: 1 1 auto;
	height: 1px;
	background: linear-gradient(90deg, rgba(207, 170, 67, 0.32), transparent);
	border-radius: 0;
	position: static;
	bottom: auto;
	left: auto;
	width: auto;
}

.page-template-page-country-playbooks .pb-playbook-region:first-of-type .pb-section-title {
	margin-top: 0;
}

@media (max-width: 768px) {
	.page-template-page-country-playbooks .series-master-container {
		padding: 0 1rem 3rem;
	}

	.page-template-page-country-playbooks .pb-region-toolbar {
		margin-left: -1rem;
		margin-right: -1rem;
		padding: 0.95rem 0 0;
		margin-bottom: 1.75rem;
	}

	.page-template-page-country-playbooks .pb-region-toolbar__label {
		padding: 0 1rem;
		margin-bottom: 0.5rem;
		font-size: 0.54rem;
	}

	.page-template-page-country-playbooks .pb-region-nav {
		padding: 0 0.35rem;
		mask-image: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
	}

	.page-template-page-country-playbooks .pb-nav-item {
		font-size: 0.62rem;
		padding: 0.75rem 0.85rem 0.8rem;
		letter-spacing: 0.07em;
	}

	.page-template-page-country-playbooks .pb-nav-item::after {
		left: 0.65rem;
		right: 0.65rem;
	}

	.page-template-page-country-playbooks .pb-playbook-region {
		scroll-margin-top: calc(var(--cfo-header-offset, 106px) + 6.5rem);
	}
}

@media (min-width: 769px) {
	.page-template-page-country-playbooks .pb-region-nav {
		justify-content: flex-start;
		gap: 0.15rem;
	}

	.page-template-page-country-playbooks .pb-nav-item {
		padding: 0.95rem 1.35rem 1rem;
	}
}
