/* Global site header / footer (Portal Hub child theme) — middle (brand) + bottom (primary nav) */

.site-header {
	position: relative;
	z-index: 100;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

/* Middle: white row — logo + language */
.site-header__middle {
	background: #ffffff;
	width: 100%;
	box-sizing: border-box;
	padding: 15px 0;
	border-bottom: 1px solid #f0f0f0;
}

/* Default: logo left, tools right */
.site-header__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: nowrap;
	box-sizing: border-box;
}

.site-header__brand {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	text-decoration: none;
	flex-shrink: 0;
	min-width: 0;
}

.site-header__tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 1 auto;
	min-width: 0;
	max-width: min(50%, 280px);
}

.site-header__tools:empty {
	display: none;
}

/* Front page only: centered logo with language still on the right */
.site-header__inner--front {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: 12px;
}

.site-header__inner--front .site-header__lead {
	grid-column: 1;
	min-width: 0;
	pointer-events: none;
}

.site-header__inner--front .site-header__brand {
	grid-column: 2;
	justify-self: center;
	flex-shrink: 1;
	max-width: 100%;
}

.site-header__inner--front .site-header__tail {
	grid-column: 3;
	justify-self: end;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 0;
	max-width: 100%;
}

.site-header__inner--front .site-header__tools {
	max-width: min(100%, 280px);
}

/* News language switcher (Portal Core) sits in .site-header__tools */
.site-header__tools .portal-news-lang {
	margin: 0;
}

.site-header__tools .portal-lang-select {
	width: auto;
	min-width: 0 !important;
	max-width: 100%;
	padding: 8px 18px 8px 10px;
	border: 1px solid #cfcfcf;
	border-radius: 18px;
	background-color: #ffffff;
	color: #1a1a1a;
	font-size: 15px;
	line-height: 1.2;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23707070' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 10px 6px;
	background-position: right 6px center;
	text-align: left;
	text-align-last: left;
	white-space: nowrap;
}

/* Hide login/register on Jobs hub */
.portal-vertical-jobs .site-header__tools a[href*="wp-login.php"],
.portal-vertical-jobs .site-header__tools a[href*="register"],
.portal-vertical-jobs .site-header__nav-list li[class*="login"],
.portal-vertical-jobs .site-header__nav-list li[class*="register"] {
	display: none !important;
}

/* Mobile: logo + language stay on one row; nav bar scrolls horizontally. */
@media (max-width: 782px) {
	.site-header__middle {
		padding: 10px 0;
	}

	.site-header__inner {
		gap: 8px;
		padding: 0 12px;
	}

	.site-header__inner--front {
		column-gap: 8px;
	}

	.site-header__logo {
		max-height: 44px;
		max-width: 100%;
	}

	.site-header__tools {
		max-width: min(46%, 220px);
		justify-content: flex-end;
	}

	.site-header__inner--front .site-header__tools {
		max-width: min(46%, 220px);
	}

	.site-header__tools .portal-lang-select {
		width: auto !important;
		min-width: 0 !important;
		max-width: 100%;
		font-size: 12px !important;
		padding: 7px 16px 7px 8px !important;
		min-height: auto !important;
		height: auto !important;
		line-height: normal !important;
		background-position: right 5px center;
		text-align: left;
		text-align-last: left;
	}

	.site-header__nav-inner {
		padding-left: max(12px, env(safe-area-inset-left, 0px));
		padding-right: max(12px, env(safe-area-inset-right, 0px));
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: thin;
		touch-action: pan-x;
	}

	#portal-hub-front-menu {
		justify-content: flex-start;
	}

	.site-header__nav-list>li>a {
		padding: 12px 14px;
		font-size: 0.875rem;
	}
}

.site-header__brand:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 4px;
	border-radius: 4px;
}

.site-header__logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 60px;
	max-width: min(100%, 92vw, 480px);
	object-fit: contain;
	object-position: left center;
	border: none;
	outline: none;
	box-shadow: none;
	background: transparent;
}

.site-header__inner--front .site-header__logo {
	object-position: center;
}

/* Bottom: primary navigation (dark bar) */
.site-header__nav {
	background: #0d2847;
	width: 100%;
	box-sizing: border-box;
}

.site-header__nav-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.site-header__menu {
	margin: 0;
}

.site-header__nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
}

#portal-hub-front-menu {
	justify-content: center;
}

.site-header__nav-list>li {
	flex-shrink: 0;
}

.site-header__nav-list>li>a {
	display: block;
	padding: 14px 16px;
	color: #ffffff;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 600;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.site-header__nav-list>li>a:hover,
.site-header__nav-list>li>a:focus-visible {
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	outline: none;
}

.site-header__nav-list>li.current-menu-item>a,
.site-header__nav-list>li.current-menu-ancestor>a,
.site-header__nav-list>li.current_page_item>a {
	border-bottom-color: #c41e3a;
	color: #ffffff;
}

.site-footer {
	margin-top: auto;
	background: #f5f7fa;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.site-footer__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 24px 28px;
}

.site-footer__copy {
	margin: 0;
	font-size: 0.875rem;
	color: #555;
	text-align: center;
}

.site-footer--portal-dark {
	background: #14284a;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	color: #d7deea;
}

.site-footer--portal-dark .portal-footer-inner {
	padding-top: 28px;
	padding-bottom: 14px;
}

.portal-footer-grid {
	display: grid;
	grid-template-columns: 2fr 1.3fr 1.3fr 1.1fr;
	gap: 28px;
}

.portal-footer-col,
.portal-footer-col p,
.portal-footer-col li,
.portal-footer-col a,
.portal-footer-list {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.65;
	color: #d7deea;
}

.portal-footer-title {
	margin: 0 0 10px;
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
}

.portal-footer-list {
	list-style: none;
	padding: 0;
}

.portal-footer-list li {
	margin-bottom: 4px;
}

.portal-footer-list a {
	color: #d7deea;
	text-decoration: none;
}

.portal-footer-list a:hover {
	color: #ffffff;
	text-decoration: underline;
}

.portal-footer-bottom {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-footer-copy {
	margin: 0;
	font-size: 0.8125rem;
	color: #aebcd3;
	text-align: center;
}

.portal-footer-widgets {
	color: #d7deea;
}

.portal-footer-widget {
	margin-bottom: 12px;
}


@media (max-width: 900px) {
	.portal-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 560px) {
	.portal-footer-grid {
		grid-template-columns: 1fr;
	}
}