/**
 * Layout: container, header, offcanvas menu, footer.
 * Values ported from Elementor templates 15 (header) and 17 (footer).
 */

/* Container widths follow the Elementor kit breakpoints. */
:root {
	--postb-container-max: 1256px;
	--postb-color-primary: var(--e-global-color-primary, #229cd8);
	--postb-color-accent: var(--e-global-color-accent, #229cd8);
	--postb-color-text: var(--e-global-color-text, #212529);
	--postb-color-border: var(--e-global-color-f41e701, #e9ecef);
	--postb-color-hover-bg: var(--e-global-color-062c95a, #f8f9fa);
	--postb-header-height: 0px;
	--postb-transition: 0.25s;
}
@media (max-width: 1399px) { :root { --postb-container-max: 1076px; } }
@media (max-width: 1199px) { :root { --postb-container-max: 896px; } }
@media (max-width: 991px)  { :root { --postb-container-max: 656px; } }
@media (max-width: 768px)  { :root { --postb-container-max: 476px; } }

.postb-container {
	width: 100%;
	max-width: var(--postb-container-max);
	margin-inline: auto;
}

/* Anchor targets keep clear of the sticky header. */
[id] { scroll-margin-top: var(--postb-header-height); }

/* ---------- Menus (shared) ---------- */
.postb-menu {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}
.postb-menu a {
	display: block;
	color: inherit;
	text-decoration: none;
	transition: background-color var(--postb-transition), color var(--postb-transition);
}
.postb-menu .sub-menu { display: none; }
.postb-menu--inline { flex-direction: row; gap: 2rem; }
.postb-menu--block { flex-direction: column; }

/* ---------- Header ---------- */
.postb-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background-color: var(--e-global-color-5b8b8d1, #fff);
	transition: box-shadow var(--postb-transition);
}
.postb-header.is-fixed { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }

.postb-header__bar {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	gap: 2rem;
	margin-inline: -2rem;
	padding: 1rem 2rem;
}
.postb-header__brand,
.postb-header__nav {
	display: flex;
	flex-direction: row;
	align-items: center;
}
.postb-header__brand { gap: 2rem; }
.postb-header__nav { justify-content: flex-end; gap: 4rem; }

.postb-header__logo { flex: 0 0 auto; display: block; }
.postb-header__logo img { display: block; width: auto; height: 80px; }
.postb-header__funding img { display: block; max-width: 100%; height: auto; }

.postb-header__menu .postb-menu > .menu-item > a {
	font-size: 1.25rem;
	font-weight: 400;
	text-transform: uppercase;
}
.postb-header__menu .postb-menu > .menu-item > a:hover,
.postb-header__menu .postb-menu > .current-menu-item > a { color: var(--postb-color-accent); }

.postb-header__toggle {
	display: none;
	padding: 0;
	border: 0;
	background: none;
	color: var(--postb-color-primary);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.postb-header__toggle svg { display: block; width: 1em; height: 1em; }
.postb-header__toggle:hover,
.postb-header__toggle:focus { background: none; color: var(--postb-color-primary); }

@media (max-width: 1199px) {
	.postb-header__logo img { height: 64px; }
	.postb-header__nav { gap: 2rem; }
	.postb-header__menu { display: none; }
	.postb-header__toggle { display: block; }
}
@media (max-width: 991px) {
	.postb-header__funding { display: none; }
}
@media (max-width: 768px) {
	.postb-header__logo img { height: 48px; }
}
@media (max-width: 575px) {
	.postb-header__bar { gap: 1rem; margin-inline: 0; padding: 1rem; }
	.postb-header__nav { gap: 1rem; }
}

/* ---------- Social links ---------- */
.postb-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.postb-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	font-size: 25px;
	line-height: 1;
	color: var(--postb-social-color, currentColor);
	transition: opacity var(--postb-transition);
}
.postb-social__link svg { width: 1em; height: 1em; fill: currentColor; }
.postb-social__link:hover { opacity: 0.9; color: var(--postb-social-color, currentColor); }
@media (max-width: 575px) {
	.postb-header .postb-social { column-gap: 1rem; }
}

/* ---------- Offcanvas (replaces Bootstrap offcanvas) ---------- */
.postb-offcanvas { position: fixed; inset: 0; z-index: 9999; }
.postb-offcanvas[hidden] { display: none; }
.postb-offcanvas__backdrop {
	position: absolute;
	inset: 0;
	background-color: #000;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}
.postb-offcanvas__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(400px, 100%);
	max-width: 100%;
	background-color: #fff;
	border-left: 1px solid rgba(0, 0, 0, 0.175);
	outline: 0;
	transform: translateX(100%);
	transition: transform 0.3s ease-in-out;
}
.postb-offcanvas.is-open .postb-offcanvas__backdrop { opacity: 0.5; }
.postb-offcanvas.is-open .postb-offcanvas__panel { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.postb-offcanvas__backdrop,
	.postb-offcanvas__panel { transition: none; }
}

.postb-offcanvas__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
	border-bottom: 1px solid var(--postb-color-border);
}
.postb-offcanvas__title { margin: 0; font-weight: 700; line-height: 1.5; }
.postb-offcanvas__close {
	width: 1em;
	height: 1em;
	padding: 0.25em;
	box-sizing: content-box;
	border: 0;
	border-radius: 0.375rem;
	background: none;
	opacity: 0.5;
	cursor: pointer;
	transition: opacity var(--postb-transition);
}
.postb-offcanvas__close:hover,
.postb-offcanvas__close:focus { opacity: 0.75; background: none; }
.postb-offcanvas__close::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background-color: #000;
	-webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 1em no-repeat;
	mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 1em no-repeat;
}
.postb-offcanvas__body { flex-grow: 1; overflow-y: auto; padding: 0; }
.postb-offcanvas__body .postb-menu > .menu-item > a {
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--postb-color-border);
}
.postb-offcanvas__body .postb-menu .sub-menu { display: block; margin: 0; padding: 0; list-style: none; }
.postb-offcanvas__body .postb-menu .sub-menu a {
	padding: 1rem 1.5rem 1rem 3rem;
	border-bottom: 1px solid var(--postb-color-border);
}
.postb-offcanvas__body .postb-menu a:hover {
	background-color: var(--postb-color-hover-bg);
	color: var(--postb-color-primary);
}
.postb-offcanvas__body .postb-menu .current-menu-item > a { color: var(--postb-color-primary); }
@media (max-width: 575px) {
	.postb-offcanvas__body .postb-menu { align-items: stretch; }
}

body.postb-offcanvas-open { overflow: hidden; }

/* ---------- Footer ---------- */
.postb-footer { padding: 2rem 1rem 4rem; }
.postb-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
}
.postb-footer__logo img { display: block; width: auto; height: 8rem; }

.postb-address { display: flex; flex-direction: column; gap: 1rem; }
.postb-address__title { margin: 0; }
.postb-address__lines {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 0;
	font-style: normal;
}
.postb-address__line { position: relative; padding-left: 1rem; }
.postb-address__line > svg {
	position: absolute;
	top: calc(0.125rem + 3px);
	left: 0;
	width: auto;
	height: 1em;
	fill: var(--postb-color-accent);
}
.postb-address__value { display: block; margin-left: 1rem; }
.postb-address a { color: var(--postb-color-accent); white-space: nowrap; text-decoration: none; }
.postb-address a:hover { color: var(--postb-color-primary); }
.postb-address__hours {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.25rem 1rem;
	margin-bottom: 0;
}
.postb-address__hours dt { font-weight: 400; }
.postb-address__hours dd { margin: 0; }

.postb-footer__bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
	padding-top: 2rem;
}
.postb-footer__copyright { margin: 0; }
.postb-footer__menu .postb-menu > .menu-item > a:hover { color: var(--postb-color-accent); }

@media (max-width: 767.98px) {
	.postb-footer__menu .postb-menu--inline { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 575px) {
	.postb-footer__copyright { text-align: center; }
}
