/**
 * Aluna Site Header — Frontend styles
 * Matches: wireframes-html/aluna-home-v4.html  .hdr / .mob-drawer
 */

/* ── CSS Variables (mirror of reference) ── */
.ahdr {
	--cream: #F2E6D0;
	--cream-lt: #FBF5EC;
	--sand: #D9C9A8;
	--taupe: #8B7E70;
	--brown: #6B5C4E;
	--black: #1C1814;
	--white: #FEFCF8;
	--text: #2C2420;
	--text-sec: #6B5C4E;
	--border: rgba(139,126,112,.18);
	--border-st: rgba(139,126,112,.35);
	--font-body: 'Jost', sans-serif;
	--font-display: 'Cormorant Garamond', serif;
	--ahdr-height: 110px;
}

/* ── Main Header ── */
.ahdr {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 900;
	height: var(--ahdr-height);
	background: #fff;
	border-bottom: 1px solid var(--border);
	box-shadow: 0 1px 20px rgba(0,0,0,.06);
	overflow: visible;
}

.ahdr-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 52px;
	max-width: 100%;
}

/* ── Spacer (pushes content below fixed header) ── */
.ahdr-spacer {
	display: block;
}

/* ── Logo ── */
.ahdr-logo-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	flex-shrink: 0;
}

.ahdr-logo-img {
	display: block;
	height: 90px;
	width: auto;
	object-fit: contain;
}

.ahdr-logo-placeholder {
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 400;
	color: var(--text);
	letter-spacing: 4px;
	text-transform: uppercase;
}

/* ── Navigation ── */
.ahdr-nav-wrap {
	flex: 1;
	display: flex;
	justify-content: center;
}

ul.ahdr-nav {
	display: flex;
	gap: 28px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.ahdr-nav > li {
	position: relative;
	display: flex;
	align-items: center;
	white-space: nowrap;
}

ul.ahdr-nav > li > a {
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--text-sec);
	text-decoration: none;
	transition: color .3s;
}

ul.ahdr-nav > li > a:hover {
	color: var(--text);
}

/* ── Dropdown (sub-menus) ── */
ul.ahdr-nav > li.ahdr-drop {
	position: relative;
}

ul.ahdr-nav > li.ahdr-drop > a::after {
	content: '▾';
	font-size: 9px;
	opacity: .55;
	margin-left: 3px;
}

.ahdr-drop-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--white);
	border: 1px solid var(--border);
	box-shadow: 0 8px 28px rgba(0,0,0,.09);
	min-width: 160px;
	display: none;
	flex-direction: column;
	z-index: 1001;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Hover bridge so menu doesn't close */
.ahdr-drop-menu::before {
	content: '';
	position: absolute;
	top: -8px;
	left: -10px;
	right: -10px;
	height: 10px;
}

ul.ahdr-nav > li.ahdr-drop:hover > .ahdr-drop-menu {
	display: flex;
}

.ahdr-drop-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ahdr-drop-menu a {
	display: block;
	padding: 13px 22px;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--text-sec);
	text-decoration: none;
	transition: color .2s;
	border-bottom: 1px solid var(--border);
}

.ahdr-drop-menu li:last-child a {
	border-bottom: none;
}

.ahdr-drop-menu a:hover {
	color: var(--taupe);
}

.ahdr-nav-empty {
	font-family: var(--font-body);
	font-size: 13px;
	color: #999;
	font-style: italic;
}

/* ── Nav Overflow ("···" toggle) ── */
ul.ahdr-nav > li.ahdr-ovfl {
	position: relative;
	display: none;       /* JS shows it when needed */
	align-items: center;
	white-space: nowrap;
}

ul.ahdr-nav > li.ahdr-ovfl.is-active {
	display: flex;
}

.ahdr-ovfl-tog {
	font-family: var(--font-body);
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0;
	color: var(--text-sec);
	text-decoration: none;
	cursor: pointer;
	padding: 0 2px 2px;
	transition: color .3s;
}

.ahdr-ovfl-tog:hover {
	color: var(--text);
}

/* Suppress the dropdown caret on the overflow toggle */
ul.ahdr-nav > li.ahdr-ovfl > a::after {
	content: none;
}

.ahdr-ovfl-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	background: var(--white);
	border: 1px solid var(--border);
	box-shadow: 0 8px 28px rgba(0,0,0,.09);
	min-width: 180px;
	display: none;
	flex-direction: column;
	z-index: 1001;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Hover bridge */
.ahdr-ovfl-menu::before {
	content: '';
	position: absolute;
	top: -8px;
	left: -10px;
	right: -10px;
	height: 10px;
}

ul.ahdr-nav > li.ahdr-ovfl:hover > .ahdr-ovfl-menu {
	display: flex;
}

.ahdr-ovfl-menu a {
	display: block;
	padding: 13px 22px;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--text-sec);
	text-decoration: none;
	transition: color .2s;
	border-bottom: 1px solid var(--border);
}

.ahdr-ovfl-menu a:last-child {
	border-bottom: none;
}

.ahdr-ovfl-menu a:hover {
	color: var(--taupe);
}

/* Sub-items inside overflow get indented */
.ahdr-ovfl-menu a.ahdr-ovfl-sub {
	padding-left: 34px;
	font-size: 11px;
}

/* ── CTAs ── */
.ahdr-cta {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.ahdr-btn {
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	padding: 10px 22px;
	cursor: pointer;
	text-decoration: none;
	transition: all .2s;
	white-space: nowrap;
}

.ahdr-btn-outline {
	border: 1px solid var(--border-st);
	color: var(--text-sec);
	background: transparent;
}

.ahdr-btn-outline:hover {
	border-color: var(--taupe);
	color: var(--taupe);
}

.ahdr-btn-fill {
	background: var(--taupe);
	border: 1px solid var(--taupe);
	color: var(--white);
}

.ahdr-btn-fill:hover {
	background: var(--brown);
	border-color: var(--brown);
}

/* ── Hamburger (hidden on desktop) ── */
.ahdr-hamburger {
	display: none;
	width: 44px;
	height: 44px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.ahdr-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--text);
	border-radius: 2px;
	transition: transform .3s ease, opacity .3s ease, width .3s ease;
	transform-origin: center;
}

.ahdr-hamburger.open .ahdr-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.ahdr-hamburger.open .ahdr-bar:nth-child(2) {
	opacity: 0;
	width: 0;
}

.ahdr-hamburger.open .ahdr-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Overlay ── */
.ahdr-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(28,24,20,.55);
	z-index: 960;
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity .3s ease;
}

.ahdr-overlay.open {
	display: block;
	opacity: 1;
}

/* ── Mobile Drawer ── */
.ahdr-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(340px, 88vw);
	background: #fff;
	z-index: 970;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 32px rgba(28,24,20,.12);
}

.ahdr-drawer.open {
	transform: translateX(0);
}

/* Drawer header */
.ahdr-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
	background: #fff;
}

.ahdr-drawer-logo {
	height: 40px;
	width: auto;
	object-fit: contain;
}

.ahdr-drawer-close {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(139,126,112,.08);
	border: 1px solid var(--border);
	border-radius: 50%;
	cursor: pointer;
	color: var(--text-sec);
	font-size: 16px;
	transition: all .2s;
}

.ahdr-drawer-close:hover {
	background: var(--taupe);
	color: #fff;
	border-color: var(--taupe);
}

/* Drawer CTAs */
.ahdr-drawer-ctas {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 24px 18px;
	border-bottom: 1px solid var(--border);
}

.ahdr-drawer-ctas .ahdr-btn {
	width: 100%;
	text-align: center;
	padding: 13px 20px;
	font-size: 12px;
	letter-spacing: 2.5px;
	display: block;
}

/* Drawer navigation */
.ahdr-drawer-nav-wrap {
	flex: 1;
}

ul.ahdr-mob-nav {
	display: flex;
	flex-direction: column;
	padding: 8px 0;
	list-style: none;
	margin: 0;
}

ul.ahdr-mob-nav li {
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.ahdr-mob-nav a {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--text-sec);
	text-decoration: none;
	padding: 14px 24px;
	border-bottom: 1px solid var(--border);
	transition: color .2s, background .2s, padding-left .2s;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

ul.ahdr-mob-nav a:hover {
	color: var(--taupe);
	background: rgba(139,126,112,.04);
	padding-left: 30px;
}

/* Sub-menu inside drawer */
ul.ahdr-mob-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.ahdr-mob-nav .sub-menu a {
	padding-left: 40px;
	font-weight: 400;
	font-size: 11px;
}

/* Drawer footer */
.ahdr-drawer-foot {
	padding: 20px 24px;
	border-top: 1px solid var(--border);
	flex-shrink: 0;
	background: #fafaf8;
}

.ahdr-drawer-tagline {
	font-family: var(--font-body);
	font-size: 10px;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--taupe);
	opacity: .65;
	text-align: center;
	display: block;
}

/* ── Admin bar offset (solo cuando está logueado) ── */
/* Desktop: admin bar es fixed 32px → offset estático.
   Móvil (<782px): admin bar es position:absolute y se va con el scroll,
   así que usamos una custom property --ahdr-admin-offset que JS actualiza. */
.admin-bar .ahdr {
	top: var(--ahdr-admin-offset, 32px);
}

/* ── Responsive ── */
@media (max-width: 1200px) {
	.ahdr-inner {
		padding: 0 32px;
	}
	ul.ahdr-nav {
		gap: 18px;
	}
	.ahdr-btn {
		font-size: 13px;
		padding: 9px 16px;
		letter-spacing: 2px;
	}
}

@media (max-width: 960px) {
	.ahdr {
		height: 70px !important;
	}
	.ahdr-inner {
		padding: 0 20px;
	}
	.ahdr-spacer {
		height: 70px !important;
	}

	/* Shrink logo — !important overrides inline style="height:90px" from PHP */
	.ahdr-logo-img {
		height: 44px !important;
	}

	/* Hide desktop nav and CTAs */
	.ahdr-nav-wrap,
	.ahdr-cta {
		display: none !important;
	}

	/* Show hamburger */
	.ahdr-hamburger {
		display: flex;
	}
}
