/**
 * PubadHub theme styles
 * Brand accent from logo: #473BF0 | Deep navy: #150035
 */

:root {
	--pah-font: "Space Grotesk", system-ui, -apple-system, sans-serif;
	--pah-font-heading: "Space Grotesk", system-ui, -apple-system, sans-serif;
	--pah-font-body: "IBM Plex Sans", system-ui, sans-serif;
	--pah-accent: #473bf0;
	--pah-navy: #150035;
	--pah-white: #ffffff;
	--pah-text: #1a1a2e;
	--pah-muted: #5c5c70;
	--pah-bg: #ffffff;
	--pah-footer-bg: #0b001c;
	--pah-header-h: 72px;
	--pah-container: 1320px;
	--pah-gutter: 24px;
	--pah-radius: 0;
	--pah-transition: 0.25s ease;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	font-family: var(--pah-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--pah-text);
	background: var(--pah-bg);
	-webkit-font-smoothing: antialiased;
}

html.pah-menu-open,
body.pah-menu-open {
	overflow: hidden;
	height: 100%;
	touch-action: none;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
	font-family: var(--pah-font-heading);
	font-weight: 600;
	line-height: 1.25;
	color: var(--pah-navy);
}

/* Body copy: paragraphs, descriptions, links, lists */
p,
a,
ul,
ol,
li {
	font-family: var(--pah-font-body);
}

a {
	color: var(--pah-accent);
	text-decoration: none;
	transition: color var(--pah-transition);
}

a:hover,
a:focus {
	color: var(--pah-navy);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.pah-skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: var(--pah-gutter);
	top: var(--pah-gutter);
	z-index: 100000;
	background: var(--pah-accent);
	color: var(--pah-white);
	padding: 0.75rem 1rem;
}

/* ---------- Header ---------- */
.pah-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--pah-white);
	border-bottom: 1px solid rgba(21, 0, 53, 0.08);
}

.pah-header__inner {
	max-width: var(--pah-container);
	margin: 0 auto;
	padding: 0 var(--pah-gutter);
	min-height: var(--pah-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.pah-logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.pah-logo img,
.pah-logo .custom-logo {
	width: auto;
	height: 32px;
	max-width: min(210px, 55vw);
}

.pah-logo .custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.pah-logo--header img,
.pah-logo--header .custom-logo {
	height: 31px;
}

.pah-nav--primary {
	display: flex;
	align-items: center;
}

.pah-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0.25rem 1.75rem;
	flex-wrap: wrap;
}

.pah-nav__list > li {
	margin: 0;
	position: relative;
}

.pah-nav__list a {
	display: inline-block;
	font-family: var(--pah-font-body);
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--pah-navy);
	padding: 0.35rem 0;
	letter-spacing: 0.01em;
}

.pah-nav__list a:hover,
.pah-nav__list .current-menu-item > a,
.pah-nav__list .current_page_item > a,
.pah-nav__list .pah-section-active > a,
.pah-nav__list .pah-home-active > a {
	color: var(--pah-accent);
}

/* On the home page, WP marks Home as current always — only show it when no section is active. */
body.pah-section-spy .pah-nav__list .current-menu-item > a,
body.pah-section-spy .pah-nav__list .current_page_item > a {
	color: var(--pah-navy);
}

body.pah-section-spy .pah-nav__list .pah-section-active > a,
body.pah-section-spy .pah-nav__list .pah-home-active > a,
body.pah-section-spy .pah-nav__list a:hover {
	color: var(--pah-accent);
}

.pah-nav__list > li.menu-item-has-children > a,
.pah-nav__list > li.page_item_has_children > a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.pah-nav__list > li.menu-item-has-children > a::after,
.pah-nav__list > li.page_item_has_children > a::after {
	content: "";
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
	transition: transform var(--pah-transition);
}

.pah-nav__list > li.menu-item-has-children:hover > a::after,
.pah-nav__list > li.menu-item-has-children:focus-within > a::after,
.pah-nav__list > li.page_item_has_children:hover > a::after,
.pah-nav__list > li.page_item_has_children:focus-within > a::after {
	transform: rotate(180deg);
}

.pah-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 180px;
	background: var(--pah-white);
	box-shadow: 0 8px 24px rgba(21, 0, 53, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--pah-transition), transform var(--pah-transition), visibility var(--pah-transition);
	z-index: 100;
}

.pah-nav__list > li:hover > .sub-menu,
.pah-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.pah-nav__list .sub-menu a {
	display: block;
	padding: 0.5rem 1rem;
	white-space: nowrap;
}

/* Last primary menu item (e.g. "Book a meeting") renders as a CTA button.
   Add the pah-nav-cta class in Appearance → Menus to target a different item. */
.pah-header .pah-nav--primary .pah-nav__list > li:last-child > a,
.pah-header .pah-nav--primary .pah-nav__list > li.pah-nav-cta > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border: 1.5px solid var(--pah-accent);
	border-radius: 10px;
	background: var(--pah-accent);
	color: var(--pah-white);
	font-weight: 600;
	white-space: nowrap;
	transition: background-color var(--pah-transition), color var(--pah-transition),
		border-color var(--pah-transition);
}

.pah-header .pah-nav--primary .pah-nav__list > li:last-child > a:hover,
.pah-header .pah-nav--primary .pah-nav__list > li:last-child > a:focus,
.pah-header .pah-nav--primary .pah-nav__list > li.pah-nav-cta > a:hover,
.pah-header .pah-nav--primary .pah-nav__list > li.pah-nav-cta > a:focus {
	background: var(--pah-white);
	border-color: var(--pah-navy);
	color: var(--pah-navy);
}

.pah-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.pah-nav-toggle__bar {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--pah-navy);
	transition: transform var(--pah-transition), opacity var(--pah-transition);
}

.pah-nav-toggle[aria-expanded="true"] .pah-nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.pah-nav-toggle[aria-expanded="true"] .pah-nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.pah-nav-toggle[aria-expanded="true"] .pah-nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Main ---------- */
.pah-main {
	min-height: 50vh;
}

.pah-content {
	max-width: var(--pah-container);
	margin: 0 auto;
	padding: 2.5rem var(--pah-gutter);
}

.pah-content--full {
	max-width: none;
	padding: 0;
}

/* ---------- Footer ---------- */
.pah-footer {
	background: var(--pah-footer-bg);
	color: rgba(255, 255, 255, 0.85);
	margin-top: auto;
}

.pah-footer__inner {
	max-width: var(--pah-container);
	margin: 0 auto;
	padding: 4rem var(--pah-gutter) 1.75rem;
}

.pah-footer__grid {
	display: grid;
	grid-template-columns: minmax(240px, 1.7fr) repeat(auto-fit, minmax(150px, 1fr));
	gap: 2.5rem 2rem;
	padding-bottom: 3rem;
}

.pah-footer__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.1rem;
	max-width: 22rem;
}

.pah-logo--footer .pah-footer__logo-img {
	display: block;
	height: 32px;
	width: auto;
	max-width: min(210px, 70vw);
}

.pah-footer__logo-text {
	font-family: var(--pah-font-heading);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--pah-white);
}

.pah-footer__tagline {
	margin: 0;
	font-size: 1rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.6);
}

.pah-footer__col-title {
	margin: 0 0 1.25rem;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.55);
}

.pah-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.pah-footer__links a,
.pah-footer__contact-link,
.pah-nav--legal a {
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.92rem;
	font-weight: 400;
	text-decoration: none;
	transition: color var(--pah-transition);
}

.pah-footer__links a:hover,
.pah-footer__links .current-menu-item > a,
.pah-footer__links .pah-section-active > a,
.pah-footer__links .pah-home-active > a,
.pah-footer__contact-link:hover,
.pah-nav--legal a:hover {
	color: var(--pah-white);
}

body.pah-section-spy .pah-footer__links .current-menu-item > a {
	color: rgba(255, 255, 255, 0.82);
}

body.pah-section-spy .pah-footer__links .pah-section-active > a,
body.pah-section-spy .pah-footer__links .pah-home-active > a,
body.pah-section-spy .pah-footer__links a:hover {
	color: var(--pah-white);
}

.pah-footer__contact {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.9rem;
}

.pah-footer__address {
	margin: 0;
	font-style: normal;
	font-size: 0.92rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.82);
}

.pah-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pah-footer__copy {
	margin: 0;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
}

.pah-nav__list--legal {
	gap: 1rem;
}

/* ---------- 404 ---------- */
.pah-404 {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(70vh, 640px);
	text-align: center;
}

.pah-404__inner {
	max-width: 28rem;
	margin: 0 auto;
}

.pah-404__code {
	margin: 0 0 0.5rem;
	font-family: var(--pah-font-heading);
	font-size: clamp(3.5rem, 10vw, 5.5rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--pah-accent);
}

.pah-404__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.pah-404__text {
	margin: 0 0 1.75rem;
	color: var(--pah-muted);
}

.pah-404__actions {
	margin: 0;
}

.pah-404__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 22px;
	border: 1.5px solid var(--pah-accent);
	border-radius: 10px;
	background: var(--pah-accent);
	color: var(--pah-white);
	font-family: var(--pah-font-body);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--pah-transition), color var(--pah-transition),
		border-color var(--pah-transition);
}

.pah-404__btn:hover,
.pah-404__btn:focus {
	background: var(--pah-white);
	border-color: var(--pah-navy);
	color: var(--pah-navy);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.pah-nav-toggle {
		display: flex;
		order: 2;
		z-index: 1001;
	}

	.pah-header__brand {
		order: 1;
	}

	.pah-header__inner {
		flex-wrap: nowrap;
		min-height: 64px;
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
	}

	.pah-nav--primary {
		display: none;
		position: fixed;
		top: var(--pah-nav-top, var(--pah-header-h));
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: calc(100vh - var(--pah-nav-top, var(--pah-header-h)));
		height: calc(100dvh - var(--pah-nav-top, var(--pah-header-h)));
		max-height: calc(100dvh - var(--pah-nav-top, var(--pah-header-h)));
		margin: 0;
		padding: 0.5rem var(--pah-gutter) 1.5rem;
		background: var(--pah-white);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		z-index: 999;
	}

	.pah-nav--primary.is-open {
		display: block;
	}

	.pah-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		width: 100%;
		min-height: 100%;
	}

	.pah-nav__list > li {
		width: 100%;
		border-top: 1px solid rgba(21, 0, 53, 0.08);
	}

	.pah-nav__list a {
		display: block;
		padding: 0.85rem 0;
		width: 100%;
	}

	.pah-nav__list > li.menu-item-has-children > a,
	.pah-nav__list > li.page_item_has_children > a {
		display: flex;
		justify-content: space-between;
	}

	.pah-nav__list > li.menu-item-has-children.is-open > a::after,
	.pah-nav__list > li.page_item_has_children.is-open > a::after {
		transform: rotate(180deg);
	}

	.pah-nav__list .sub-menu {
		display: none;
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		padding: 0 0 0.5rem 1rem;
		min-width: 0;
		width: 100%;
	}

	.pah-nav__list > li.is-open > .sub-menu {
		display: block;
	}

	.pah-header .pah-nav--primary .pah-nav__list > li:last-child,
	.pah-header .pah-nav--primary .pah-nav__list > li.pah-nav-cta {
		border-top: 0;
		margin-top: 1rem;
	}

	.pah-header .pah-nav--primary .pah-nav__list > li:last-child > a,
	.pah-header .pah-nav--primary .pah-nav__list > li.pah-nav-cta > a {
		display: flex;
		width: 100%;
		padding: 14px 20px;
	}
}

@media (max-width: 900px) {
	.pah-footer__inner {
		padding-top: 3rem;
	}

	.pah-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2rem 1.5rem;
		padding-bottom: 2.25rem;
	}

	.pah-footer__brand {
		grid-column: 1 / -1;
		max-width: 30rem;
	}

	.pah-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.pah-logo img,
	.pah-logo .custom-logo {
		height: 28px;
	}
}

@media (max-width: 560px) {
	.pah-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
	}

	.pah-footer__col-title {
		margin-bottom: 0.9rem;
	}
}

@media (max-width: 480px) {
	:root {
		--pah-gutter: 16px;
	}

	.pah-logo img,
	.pah-logo .custom-logo {
		height: 24px;
		max-width: min(180px, 62vw);
	}
}
