/* =========================================================================
   HAPEI Header Upgrade v2 - append to end of assets/css/main.css
   Fixes crowding when the primary menu grows.
   Also locks the Thematic Focus cards into a read-only state.
   ========================================================================= */

/* ---------- Header layout ---------- */

.hp-site-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: #fff;
	border-bottom: 1px solid rgba(26, 11, 11, 0.06);
	backdrop-filter: saturate(1.1);
}

.hp-site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(16px, 2vw, 32px);
	min-height: 76px;
	padding-top: 10px;
	padding-bottom: 10px;
}

/* ---------- Brand ---------- */

.hp-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	max-width: 320px;
}

.hp-brand .custom-logo-link,
.hp-brand__text {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	text-decoration: none;
}

.hp-brand .custom-logo {
	width: auto;
	height: 44px;
	max-width: 140px;
	object-fit: contain;
}

.hp-brand__meta {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	min-width: 0;
}

.hp-brand__title {
	font-family: var(--hp-head, "Outfit", sans-serif);
	font-weight: 700;
	font-size: 18px;
	color: var(--hp-ink, #1a0b0b);
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hp-brand__tagline {
	font-size: 12px;
	color: rgba(26, 11, 11, 0.6);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 260px;
}

/* Tagline hides earlier so menu never crowds it. */
@media (max-width: 1279px) {
	.hp-brand__tagline { display: none; }
	.hp-brand { max-width: 220px; }
}

/* ---------- Primary nav (desktop) ---------- */

.hp-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 0;
}

.hp-nav__list {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.hp-nav__list > li {
	position: relative;
	list-style: none;
}

.hp-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-radius: 999px;
	font-family: var(--hp-body, "Inter", sans-serif);
	font-size: 15px;
	font-weight: 500;
	color: var(--hp-ink, #1a0b0b);
	text-decoration: none;
	white-space: nowrap;      /* the fix: no more wrapping menu labels */
	line-height: 1;
	transition: background .18s ease, color .18s ease;
}

.hp-nav__list > li > a:hover,
.hp-nav__list > li.current-menu-item > a,
.hp-nav__list > li.current-menu-parent > a,
.hp-nav__list > li.hp-has-sub:hover > a,
.hp-nav__list > li.hp-has-sub.is-open > a {
	background: rgba(225, 13, 13, 0.06);
	color: var(--hp-primary, #e10d0d);
}

/* Sub-menu caret spacing */
.hp-nav__list .hp-subnav__toggle {
	padding: 6px;
	margin-left: -6px;
}

/* Explore button (mega) */
.hp-mega-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border: 1px solid rgba(26, 11, 11, 0.12);
	border-radius: 999px;
	background: #fff;
	font-family: var(--hp-body, "Inter", sans-serif);
	font-size: 14px;
	font-weight: 500;
	color: var(--hp-ink, #1a0b0b);
	cursor: pointer;
	white-space: nowrap;
	transition: border-color .18s ease, background .18s ease;
}

.hp-mega-toggle:hover,
.hp-mega-toggle[aria-expanded="true"] {
	background: rgba(225, 13, 13, 0.06);
	border-color: rgba(225, 13, 13, 0.25);
	color: var(--hp-primary, #e10d0d);
}

.hp-mega-toggle__chev svg { width: 10px; height: 6px; }

/* ---------- Header actions (right side) ---------- */

.hp-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.hp-btn.hp-btn--donate {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 22px;
	border-radius: 999px;
	background: var(--hp-primary, #e10d0d);
	color: #fff;
	font-family: var(--hp-body, "Inter", sans-serif);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 6px 18px rgba(225, 13, 13, 0.28);
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.hp-btn.hp-btn--donate:hover {
	background: var(--hp-primary-dark, #a40000);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(225, 13, 13, 0.32);
}

.hp-btn__icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Compact Donate below 1400px: icon + label stays but padding tightens. */
@media (max-width: 1399px) {
	.hp-btn.hp-btn--donate { padding: 10px 18px; font-size: 14px; }
}

/* ---------- Burger (mobile trigger) ---------- */

.hp-burger {
	display: none;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1px solid rgba(26, 11, 11, 0.12);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	flex-direction: column;
	justify-content: space-between;
}

.hp-burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--hp-ink, #1a0b0b);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}

.hp-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hp-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hp-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Responsive: switch to mobile menu earlier ---------- */

/* Below 1200px, switch to burger so the desktop nav never crams. */
@media (max-width: 1199px) {
	.hp-nav { display: none; }
	.hp-burger { display: inline-flex; }
	.hp-site-header__inner {
		grid-template-columns: 1fr auto;
	}
}

@media (max-width: 640px) {
	.hp-btn.hp-btn--donate .hp-btn__label { display: none; }
	.hp-btn.hp-btn--donate { padding: 10px 12px; }
	.hp-btn__icon { width: 18px; height: 18px; }
	.hp-brand .custom-logo { height: 36px; }
	.hp-brand__title { font-size: 16px; }
	.hp-site-header__inner { min-height: 64px; }
}

/* ---------- Mobile drawer ---------- */

.hp-mobile {
	display: none;
	padding: 12px 20px 24px;
	background: #fff;
	border-top: 1px solid rgba(26, 11, 11, 0.06);
	box-shadow: 0 12px 24px rgba(26, 11, 11, 0.06);
}

.hp-mobile:not([hidden]) { display: block; }

.hp-mobile__list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.hp-mobile__list li { list-style: none; }

.hp-mobile__list > li > a {
	display: block;
	padding: 14px 12px;
	border-radius: 10px;
	font-family: var(--hp-body, "Inter", sans-serif);
	font-size: 16px;
	font-weight: 500;
	color: var(--hp-ink, #1a0b0b);
	text-decoration: none;
}

.hp-mobile__list > li > a:hover,
.hp-mobile__list .current-menu-item > a {
	background: rgba(225, 13, 13, 0.06);
	color: var(--hp-primary, #e10d0d);
}

.hp-mobile__cta {
	display: inline-flex !important;
	width: 100%;
	justify-content: center;
	padding: 14px 20px !important;
	font-size: 16px !important;
}

.hp-mobile__cta .hp-btn__label { display: inline !important; }

/* =========================================================================
   Thematic Focus - read-only cards (no Learn more, no clickable areas)
   ========================================================================= */

.hp-focus-card.is-static .hp-focus-card__media {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 14px 14px 0 0;
	cursor: default;
	aspect-ratio: 4 / 3;
}

.hp-focus-card.is-static .hp-focus-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

.hp-focus-card.is-static:hover .hp-focus-card__media img {
	transform: scale(1.03);
}

.hp-focus-card.is-static .hp-focus-card__body h3 {
	color: var(--hp-ink, #1a0b0b);
}

.hp-focus-card.is-static .hp-focus-card__body p {
	margin: 0;
	color: rgba(26, 11, 11, 0.72);
	line-height: 1.55;
}

/* Belt-and-braces: neutralise any stray anchor styling if present. */
.hp-focus-card.is-static a { pointer-events: none; }
