/*
 * Vote Smart KE global civic site shell
 * Shared header and footer styling for the Astra child theme.
 */

:root {
	--vsk-shell-ink: #1b2d3b;
	--vsk-shell-navy: #102b3e;
	--vsk-shell-navy-deep: #0b2233;
	--vsk-shell-teal: #17645f;
	--vsk-shell-teal-dark: #104d49;
	--vsk-shell-gold: #e6b544;
	--vsk-shell-muted: #5f6e79;
	--vsk-shell-line: #e1e7e8;
	--vsk-shell-soft: #f3f6f4;
	--vsk-shell-white: #fff;
	--vsk-shell-content: 1320px;
}

/* The custom components are inserted through Astra's header/footer hooks. */
#masthead,
#colophon {
	display: none !important;
}

.vsk-shell-container {
	width: min(var(--vsk-shell-content), calc(100% - 56px));
	margin-inline: auto;
}

.vsk-shell-topbar {
	background: linear-gradient(105deg, #e9f1ed 0%, #f3f2e9 100%);
	border-bottom: 1px solid #dce6e1;
	color: var(--vsk-shell-navy);
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 12px;
	line-height: 1.4;
}

.vsk-shell-topbar-inner {
	min-height: 40px;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.vsk-shell-topbar-principles {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: clamp(18px, 2.1vw, 30px);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	font-size: 12.5px;
	font-weight: 650;
	letter-spacing: .035em;
}

.vsk-shell-topbar-principles li {
	display: inline-flex !important;
	align-items: center;
	gap: 7px;
	white-space: nowrap;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	color: #29434b;
	line-height: 1.2;
}

.vsk-shell-topbar-principles svg,
.vsk-shell-topbar-note svg {
	display: block !important;
	width: 16px !important;
	height: 16px !important;
	max-width: none !important;
	flex: 0 0 auto;
	fill: none !important;
	stroke: currentColor !important;
	stroke-width: 1.65;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.vsk-shell-topbar-principles li:nth-child(1) svg,
.vsk-shell-topbar-principles li:nth-child(2) svg {
	color: var(--vsk-shell-teal);
}

.vsk-shell-topbar-principles li:nth-child(3) svg {
	color: #9a711b;
}

.vsk-shell-topbar-note {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #405a5e;
	font-size: 12.5px;
	margin: 0;
	font-weight: 600;
	letter-spacing: .025em;
}

.vsk-shell-topbar-note svg {
	color: var(--vsk-shell-teal);
}

.vsk-shell-header {
	position: relative;
	z-index: 30;
	background: var(--vsk-shell-white);
	border-bottom: 1px solid var(--vsk-shell-line);
	box-shadow: 0 5px 18px rgba(16, 43, 62, .045);
}

.vsk-shell-header-inner {
	position: relative;
	min-height: 88px;
	display: grid;
	grid-template-columns: minmax(190px, 245px) minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(18px, 2.2vw, 34px);
}

.vsk-shell-brand {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 3px;
}

.vsk-shell-logo,
.vsk-shell-logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.vsk-shell-logo .custom-logo {
	width: auto;
	max-width: 220px;
	max-height: 48px;
}

.vsk-shell-wordmark,
.vsk-shell-footer-wordmark {
	color: var(--vsk-shell-navy);
	font-family: Montserrat, "Source Sans Pro", Arial, sans-serif;
	font-size: clamp(20px, 1.65vw, 25px);
	font-weight: 700;
	letter-spacing: -.045em;
	line-height: 1.15;
	text-decoration: none;
}

.vsk-shell-wordmark:hover,
.vsk-shell-wordmark:focus-visible {
	color: var(--vsk-shell-teal-dark);
}

.vsk-shell-brand-tagline {
	color: var(--vsk-shell-muted);
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 12px;
	letter-spacing: .035em;
	line-height: 1.3;
}

.vsk-shell-nav {
	min-width: 0;
}

.vsk-shell-nav-desktop .vsk-shell-menu,
.vsk-shell-nav-mobile .vsk-shell-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vsk-shell-nav-desktop > .vsk-shell-menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(7px, 1.15vw, 18px);
}

.vsk-shell-nav .menu-item {
	position: relative;
	margin: 0;
	padding: 0;
}

.vsk-shell-nav .menu-item > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 5px;
	color: var(--vsk-shell-ink);
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	transition: color .16s ease;
}

.vsk-shell-nav .menu-item > a::after {
	position: absolute;
	right: 5px;
	bottom: 3px;
	left: 5px;
	height: 2px;
	background: var(--vsk-shell-teal);
	content: "";
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .16s ease;
}

.vsk-shell-nav .menu-item > a:hover,
.vsk-shell-nav .menu-item > a:focus-visible,
.vsk-shell-nav .current-menu-item > a,
.vsk-shell-nav .current_page_item > a,
.vsk-shell-nav .current-menu-ancestor > a {
	color: var(--vsk-shell-teal-dark);
}

.vsk-shell-nav .menu-item > a:hover::after,
.vsk-shell-nav .menu-item > a:focus-visible::after,
.vsk-shell-nav .current-menu-item > a::after,
.vsk-shell-nav .current_page_item > a::after,
.vsk-shell-nav .current-menu-ancestor > a::after {
	transform: scaleX(1);
}

.vsk-shell-nav .menu-item-has-children > a {
	padding-right: 18px;
}

.vsk-shell-nav .menu-item-has-children > a::before {
	position: absolute;
	right: 3px;
	top: 50%;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	content: "";
	transform: translateY(-70%) rotate(45deg);
}

.vsk-shell-nav .sub-menu {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 50;
	display: none;
	min-width: 225px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--vsk-shell-white);
	border: 1px solid var(--vsk-shell-line);
	border-radius: 10px;
	box-shadow: 0 14px 32px rgba(16, 43, 62, .14);
}

.vsk-shell-nav .menu-item:hover > .sub-menu,
.vsk-shell-nav .menu-item:focus-within > .sub-menu {
	display: block;
}

.vsk-shell-nav .sub-menu .menu-item > a {
	display: flex;
	min-height: 40px;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 14px;
}

.vsk-shell-nav .sub-menu .menu-item > a::after,
.vsk-shell-nav .sub-menu .menu-item-has-children > a::before {
	display: none;
}

.vsk-shell-nav .sub-menu .menu-item > a:hover,
.vsk-shell-nav .sub-menu .menu-item > a:focus-visible {
	background: var(--vsk-shell-soft);
}

.vsk-shell-profile-button {
	min-height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 18px;
	white-space: nowrap;
	background: var(--vsk-shell-teal);
	border: 1px solid var(--vsk-shell-teal);
	border-radius: 7px;
	color: #fff;
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.vsk-shell-profile-button svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

.vsk-shell-profile-button:hover,
.vsk-shell-profile-button:focus-visible {
	background: var(--vsk-shell-teal-dark);
	border-color: var(--vsk-shell-teal-dark);
	color: #fff;
	transform: translateY(-1px);
}

.vsk-shell-mobile-menu {
	display: none;
}

.vsk-shell-mobile-menu summary {
	min-height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 13px;
	background: #fff;
	border: 1px solid #cbd6d8;
	border-radius: 7px;
	color: var(--vsk-shell-navy);
	cursor: pointer;
	font-family: "Source Sans Pro", Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	list-style: none;
}

.vsk-shell-mobile-menu summary::-webkit-details-marker {
	display: none;
}

.vsk-shell-mobile-menu summary::marker {
	content: "";
}

.vsk-shell-mobile-menu summary svg {
	width: 20px;
	height: 20px;
}

.vsk-shell-mobile-panel {
	position: absolute;
	top: calc(100% + 1px);
	right: 0;
	left: 0;
	z-index: 60;
	padding: 16px 20px 20px;
	background: var(--vsk-shell-white);
	border: 1px solid var(--vsk-shell-line);
	border-top: 0;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 18px 30px rgba(16, 43, 62, .13);
}

.vsk-shell-nav-mobile .vsk-shell-menu > .menu-item > a {
	width: 100%;
	min-height: 46px;
	padding: 11px 4px;
	border-bottom: 1px solid #edf1f0;
	font-size: 16px;
}

.vsk-shell-nav-mobile .vsk-shell-menu > .menu-item > a::after,
.vsk-shell-nav-mobile .vsk-shell-menu > .menu-item-has-children > a::before {
	display: none;
}

.vsk-shell-nav-mobile .sub-menu {
	position: static;
	display: block;
	min-width: 0;
	padding: 0 0 7px 15px;
	border: 0;
	border-left: 2px solid #dce9e5;
	border-radius: 0;
	box-shadow: none;
}

.vsk-shell-nav-mobile .sub-menu .menu-item > a {
	min-height: 38px;
	padding: 8px 10px;
	font-size: 14px;
}

.vsk-shell-profile-button-mobile {
	width: 100%;
	margin-top: 16px;
}

.vsk-shell-footer {
	margin-top: 0;
	background: var(--vsk-shell-navy);
	border-top: 4px solid var(--vsk-shell-gold);
	color: #dce6e9;
	font-family: "Source Sans Pro", Arial, sans-serif;
}

.vsk-shell-footer-grid {
	display: grid;
	grid-template-columns: minmax(230px, 1.25fr) repeat(4, minmax(145px, .85fr));
	gap: clamp(22px, 2.6vw, 38px);
	padding-block: 58px 52px;
}

.vsk-shell-footer-brand {
	max-width: 360px;
}

.vsk-shell-footer-wordmark {
	display: inline-block;
	margin-bottom: 15px;
	color: #fff;
	font-size: 24px;
}

.vsk-shell-footer-wordmark:hover,
.vsk-shell-footer-wordmark:focus-visible {
	color: var(--vsk-shell-gold);
}

.vsk-shell-footer-brand > p {
	max-width: 330px;
	margin: 0;
	color: #d0dde1;
	font-size: 15px;
	line-height: 1.65;
}

.vsk-shell-footer-candidate {
	margin-top: 24px;
	padding: 15px 16px;
	background: rgba(255, 255, 255, .075);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 9px;
}

.vsk-shell-footer-candidate > span {
	display: block;
	margin-bottom: 6px;
	color: #d0dde1;
	font-size: 13px;
}

.vsk-shell-footer-candidate > a {
	color: #f1c65e;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.vsk-shell-footer-candidate > a:hover,
.vsk-shell-footer-candidate > a:focus-visible {
	color: #ffe09a;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.vsk-shell-footer-group h2 {
	margin: 3px 0 17px;
	color: #fff;
	font-family: Montserrat, "Source Sans Pro", Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .025em;
}

.vsk-shell-footer-group ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vsk-shell-footer-group li {
	margin: 0;
	padding: 0;
}

.vsk-shell-footer-group li + li {
	margin-top: 9px;
}

.vsk-shell-footer-group a {
	color: #d3dfe2;
	font-size: 14px;
	line-height: 1.45;
	text-decoration: none;
	text-underline-offset: 3px;
}

.vsk-shell-footer-group a:hover,
.vsk-shell-footer-group a:focus-visible {
	color: #f2c65c;
	text-decoration: underline;
}

.vsk-shell-footer-bottom {
	background: var(--vsk-shell-navy-deep);
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.vsk-shell-footer-bottom-inner {
	box-sizing: border-box;
	min-height: 58px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	/* Reserve room for Astra's fixed back-to-top button at the lower right. */
	padding-inline-end: 62px;
}

.vsk-shell-footer-bottom p {
	margin: 0;
	color: #bccbd0;
	font-size: 13px;
	line-height: 1.45;
}

.vsk-shell-footer-bottom p span {
	padding-inline: 5px;
	color: var(--vsk-shell-gold);
}

.vsk-shell-header a:focus-visible,
.vsk-shell-mobile-menu summary:focus-visible,
.vsk-shell-footer a:focus-visible {
	outline: 3px solid var(--vsk-shell-gold);
	outline-offset: 3px;
}

/* Keep Astra's existing back-to-top control in the refreshed brand palette. */
.ast-scroll-top-icon {
	background-color: var(--vsk-shell-teal) !important;
	border: 2px solid #fff;
	border-radius: 999px !important;
	box-shadow: 0 5px 16px rgba(16, 43, 62, .22);
}

.ast-scroll-top-icon:hover,
.ast-scroll-top-icon:focus-visible {
	background-color: var(--vsk-shell-teal-dark) !important;
}

@media (max-width: 1120px) {
	.vsk-shell-header-inner {
		grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) auto;
		gap: 14px;
	}

	.vsk-shell-nav-desktop > .vsk-shell-menu {
		gap: 5px;
	}

	.vsk-shell-nav .menu-item > a {
		font-size: 14px;
	}

	.vsk-shell-profile-button {
		padding-inline: 13px;
		font-size: 13px;
	}

	.vsk-shell-footer-grid {
		grid-template-columns: minmax(205px, 1.1fr) repeat(4, minmax(125px, .85fr));
		gap: 20px;
	}
}

@media (max-width: 980px) {
	.vsk-shell-container {
		width: min(var(--vsk-shell-content), calc(100% - 40px));
	}

	.vsk-shell-header-inner {
		min-height: 78px;
		display: flex;
		justify-content: space-between;
		gap: 16px;
	}

	.vsk-shell-nav-desktop,
	.vsk-shell-header-inner > .vsk-shell-profile-button {
		display: none;
	}

	.vsk-shell-mobile-menu {
		position: static;
		display: block;
	}

	.vsk-shell-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 38px 42px;
		padding-block: 46px;
	}

	.vsk-shell-footer-brand {
		grid-column: 1 / -1;
		max-width: 600px;
	}
}

@media (max-width: 640px) {
	.vsk-shell-container {
		width: calc(100% - 32px);
	}

	.vsk-shell-topbar-inner {
		min-height: 40px;
		justify-content: center;
		padding-block: 7px;
	}

	.vsk-shell-topbar-principles {
		justify-content: center !important;
		flex-wrap: wrap !important;
		gap: 6px 13px;
		font-size: 10.5px;
		letter-spacing: .02em;
	}

	.vsk-shell-topbar-principles li {
		gap: 5px;
	}

	.vsk-shell-topbar-principles svg {
		width: 11px !important;
		height: 11px !important;
		stroke-width: 1.5 !important;
	}

	.vsk-shell-topbar-note {
		display: none;
	}

	.vsk-shell-header-inner {
		min-height: 70px;
	}

	.vsk-shell-brand-tagline {
		font-size: 11px;
	}

	.vsk-shell-wordmark {
		font-size: 20px;
	}

	.vsk-shell-logo .custom-logo {
		max-width: 175px;
		max-height: 42px;
	}

	.vsk-shell-mobile-menu summary {
		min-height: 42px;
		padding-inline: 10px;
	}

	.vsk-shell-mobile-panel {
		padding: 12px 16px 18px;
	}

	.vsk-shell-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 26px 18px;
		padding-block: 34px 30px;
	}

	.vsk-shell-footer-brand {
		grid-column: 1 / -1;
	}

	.vsk-shell-footer-candidate {
		margin-top: 19px;
	}

	.vsk-shell-footer-group {
		min-width: 0;
	}

	.vsk-shell-footer-group:last-of-type {
		grid-column: 1 / -1;
	}

	.vsk-shell-footer-group:last-of-type ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px 18px;
	}

	.vsk-shell-footer-group li + li {
		margin-top: 0;
	}

	.vsk-shell-footer-bottom-inner {
		min-height: 0;
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
		padding-block: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vsk-shell-nav .menu-item > a,
	.vsk-shell-profile-button {
		transition: none;
	}
}
