/* Header, mobile overlay and footer (template parts). */

/* ---------- Header ---------- */
.tp-site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	transition: var(--wp--custom--transition);
}
.admin-bar .tp-site-header { top: var(--wp-admin--admin-bar--height, 0); }
.tp-site-header.is-stuck { box-shadow: var(--wp--custom--shadow--sm); }
@media (max-width: 767px) {
	.tp-header,
	.tp-offcanvas__header { padding-top: 1rem !important; padding-bottom: 1rem !important; }
}
.tp-header__row > .wp-block-navigation { margin-right: auto; }
.tp-header__links { margin-left: auto; flex-shrink: 0; }
.tp-header__links .wp-block-button__link { padding: 0.625em 1em; }

/* Logo: 2em tall (28px ≤575px), as in the original. */
.wp-block-site-logo.tp-logo img { height: 2em; width: auto; max-width: none; }
@media (max-width: 575px) {
	.tp-header .wp-block-site-logo.tp-logo img,
	.tp-offcanvas .wp-block-site-logo.tp-logo img { height: 28px; }
	.tp-header__mobile { gap: var(--wp--preset--spacing--md) !important; }
	.tp-header__row { gap: var(--wp--preset--spacing--xl) !important; }
}

/* Menu links. */
.wp-block-navigation .wp-block-navigation-item__content { transition: var(--wp--custom--transition); }
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--gray-700); }

/* Burger button: original 3-line icon, 0.5em padding, gray-700. */
.tp-mobile-nav .wp-block-navigation__responsive-container-open {
	padding: var(--wp--preset--spacing--md);
	color: var(--wp--preset--color--gray-700);
}
.tp-mobile-nav .wp-block-navigation__responsive-container-open svg { display: none; }
.tp-mobile-nav .wp-block-navigation__responsive-container-open::before {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../icons/menu.svg") center / contain no-repeat;
	mask: url("../icons/menu.svg") center / contain no-repeat;
}

/* ---------- Mobile overlay (full-screen panel) ---------- */
.tp-mobile-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0 !important;
	background: var(--wp--preset--color--white) !important;
}
.tp-mobile-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding: 0 !important;
	align-items: stretch;
}
.tp-offcanvas { width: 100%; gap: 0 !important; }
.tp-offcanvas .tp-offcanvas__menu .wp-block-navigation__container { gap: var(--wp--preset--spacing--2-xl); align-items: flex-start !important; }
.tp-offcanvas__close {
	padding: var(--wp--preset--spacing--md);
	color: var(--wp--preset--color--gray-700);
	background: none;
	border: 0;
	cursor: pointer;
}
.tp-offcanvas__close svg { display: none; }
.tp-offcanvas__close::before {
	content: "";
	display: block;
	width: 24px;
	height: 24px;
	background-color: currentColor;
	-webkit-mask: url("../icons/close.svg") center / contain no-repeat;
	mask: url("../icons/close.svg") center / contain no-repeat;
}
.tp-offcanvas__buttons .wp-block-button__link { padding: 0.625em 1em; }

/* ---------- Footer ---------- */
.tp-footer__divider { border-top-width: 1px !important; }
.tp-footer__row { margin-bottom: 0; }
.tp-footer__social .wp-block-social-links { justify-content: flex-start; }
.tp-footer__social .wp-social-link { padding: 0; font-size: 16px; }
.tp-footer__social .wp-block-social-links .wp-social-link svg { width: 24px; height: 24px; }
.tp-footer__social .wp-social-link a { padding: 0; transition: var(--wp--custom--transition); }
.tp-footer__social .wp-social-link:hover { color: var(--wp--preset--color--gray-500) !important; transform: none; }
.tp-footer__copyright a { color: inherit; }
@media (min-width: 782px) {
	.tp-footer__row {
		display: grid !important;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}
	.tp-footer__row > .wp-block-column { width: auto; }
}
@media (max-width: 781px) {
	.tp-footer__row { align-items: center !important; }
	.tp-footer__row > .tp-footer__logo { order: 1; }
	.tp-footer__row > .tp-footer__social { order: 2; margin-top: var(--wp--preset--spacing--3-xl); }
	.tp-footer__row > .tp-footer__copyright { order: 3; }
	.tp-footer__social .wp-block-social-links { justify-content: center; }
	.tp-footer__copyright > .wp-block-group { align-items: center !important; }
	.tp-footer__copyright p { text-align: center !important; }
}
@media (max-width: 575px) {
	.tp-footer__social .wp-block-social-links .wp-social-link svg { width: 20px; height: 20px; }
}
.tp-footer__social .wp-social-link a { line-height: 0; }
/* Header and mobile menu phone buttons have no icon in the original design. */
:is(.tp-header, .tp-offcanvas) .wp-block-button__link[href^="tel:"]::before { display: none; }
