/* ADViCE Blocks — alt header / blank page template (plugin-scoped). */

.advice-alt-header {
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
}

.advice-alt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1440px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
}

.advice-alt-header__brand {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	text-decoration: none;
}

.advice-alt-header__brand img,
.advice-alt-header__logo {
	display: block;
	width: auto;
	height: auto;
	max-height: 56px;
}

/* Navigation — desktop: inline row. */
.advice-alt-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.advice-alt-header__item {
	margin: 0;
}

.advice-alt-header__menu a {
	display: inline-block;
	padding: 0.375rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 4px;
	color: #000;
	text-decoration: none;
	letter-spacing: -0.01em;
}

.advice-alt-header__item.is-current a {
	border-color: #000;
	font-weight: 700;
}

.advice-blank-template__main {
	display: block;
}

/* Forced hero on Insight/Webinar singles: always a solid background colour
   (the featured image is not used as the hero background). */
.advice-single-hero .advice-hero {
	background: #3c4b55;
}

/* Insight / Webinar single view inside the microsite layout. */
.advice-single {
	max-width: 1440px;
	margin-inline: auto;
	padding: clamp(32px, 5vw, 64px) 1.5rem;
}

/* 8/12 content + 4/12 sidebar. */
.advice-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: clamp(24px, 4vw, 48px);
	align-items: start;
}

@media (max-width: 900px) {
	.advice-single__layout {
		grid-template-columns: 1fr;
	}
}

.advice-single__main {
	min-width: 0;
}

/* All single headings render solid black. */
.advice-single h1,
.advice-single h2,
.advice-single h3,
.advice-single h4,
.advice-single h5,
.advice-single h6 {
	color: #000;
}

/* Content h2s match the block headings (e.g. Focus Sectors) — an eyebrow rule
   above the heading, rendered as a ::before. */
.advice-single__content h2 {
	font-size: var(--advice-font-h2, 2rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 2.5rem 0 1rem;
}

.advice-single__content h2::before {
	content: "";
	display: block;
	width: 56px;
	height: 2px;
	margin-bottom: 24px;
	background: #000;
}

.advice-single__updated {
	margin: 2rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid #e1e3e2;
	font-size: 0.85rem;
	color: #5e6a6e;
}

.advice-single__content > * + * {
	margin-top: 1em;
}

/* Video embeds (YouTube/Vimeo) fill the content width at a 16:9 ratio. */
.advice-single__content .wp-block-embed__wrapper {
	max-width: 100%;
}

.advice-single__content .wp-block-embed.is-type-video iframe,
.advice-single__content iframe[src*="youtube.com"],
.advice-single__content iframe[src*="youtube-nocookie.com"],
.advice-single__content iframe[src*="youtu.be"],
.advice-single__content iframe[src*="player.vimeo.com"] {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}

.advice-single__chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 2rem 0 0;
	padding: 0;
}

.advice-single__chips a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #efefef;
	color: #101417;
	text-decoration: none;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.advice-single__chips a:hover {
	background: #101417;
	color: #fff;
}

/* Related content box (sidebar). */
.advice-single__related {
	background: #f5f6f6;
	border-radius: 8px;
	padding: clamp(20px, 3vw, 28px);
}

.advice-single__related-heading {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	line-height: 1.25;
	color: #101417;
}

.advice-single__related-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.advice-single__related-item {
	padding: 0.875rem 0;
	border-top: 1px solid #e1e3e2;
}

.advice-single__related-item:first-child {
	padding-top: 0;
	border-top: 0;
}

.advice-single__related-link {
	display: block;
	text-decoration: none;
	color: #101417;
}

.advice-single__related-link:hover .advice-single__related-title {
	text-decoration: underline;
}

.advice-single__related-meta {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5e6a6e;
}

.advice-single__related-title {
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
}

/* Hamburger toggle + backdrop are desktop-hidden. */
.advice-alt-header__toggle,
.advice-alt-header__backdrop {
	display: none;
}

/* Accessible visually-hidden text (theme CSS isn't loaded on this template). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	word-wrap: normal !important;
}

/* Lock body scroll while the slide-in panel is open. */
.advice-nav-lock {
	overflow: hidden;
}

/* ---- Tablet / mobile: hamburger + right slide-in panel ---- */
@media (max-width: 1279px) {
	.advice-alt-header__toggle {
		position: relative;
		display: inline-flex;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: transparent;
		color: inherit;
		cursor: pointer;
		z-index: 1001;
	}

	.advice-alt-header__toggle-bar,
	.advice-alt-header__toggle-bar::before,
	.advice-alt-header__toggle-bar::after {
		position: absolute;
		left: 50%;
		width: 24px;
		height: 2px;
		margin-left: -12px;
		background: currentColor;
		transition: transform 0.2s ease, top 0.2s ease, background 0.2s ease;
	}

	.advice-alt-header__toggle-bar {
		top: 50%;
		margin-top: -1px;
	}

	.advice-alt-header__toggle-bar::before,
	.advice-alt-header__toggle-bar::after {
		content: '';
	}

	.advice-alt-header__toggle-bar::before {
		top: -7px;
	}

	.advice-alt-header__toggle-bar::after {
		top: 7px;
	}

	.advice-alt-header__nav {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		width: 360px;
		max-width: 85vw;
		padding: 5rem 1.5rem 2rem;
		background: #fff;
		box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
		z-index: 1000;
	}

	.advice-alt-header__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.25rem;
	}

	.advice-alt-header__backdrop {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.4);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease;
		z-index: 999;
	}

	.advice-alt-header.is-nav-open .advice-alt-header__nav {
		transform: translateX(0);
	}

	.advice-alt-header.is-nav-open .advice-alt-header__backdrop {
		opacity: 1;
		visibility: visible;
	}

	/* Hamburger morphs to an X while the panel is open. */
	.advice-alt-header.is-nav-open .advice-alt-header__toggle-bar {
		background: transparent;
	}

	.advice-alt-header.is-nav-open .advice-alt-header__toggle-bar::before {
		top: 0;
		transform: rotate(45deg);
	}

	.advice-alt-header.is-nav-open .advice-alt-header__toggle-bar::after {
		top: 0;
		transform: rotate(-45deg);
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.advice-alt-header__nav,
	.advice-alt-header__backdrop,
	.advice-alt-header__toggle-bar,
	.advice-alt-header__toggle-bar::before,
	.advice-alt-header__toggle-bar::after {
		transition: none;
	}
}
