/**
 * DinnerlyHub - Header Layout
 * Sticky header with desktop nav and mobile hamburger menu.
 */

/* Scoped reset */
.dh-header *,
.dh-header *::before,
.dh-header *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Sticky Header */
.dh-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	width: 100%;
	margin: 0;
	background: var(--dh-white);
	box-shadow: var(--dh-shadow-sm);
	border-bottom: 1px solid var(--dh-green-border);
	font-family: var(--dh-font);
	will-change: auto;
	transition: box-shadow var(--dh-ease);
}

.dh-header.is-scrolled {
	box-shadow: var(--dh-shadow-md);
}

.dh-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: var(--dh-max-width);
	margin: 0 auto;
	padding: 0 24px;
	height: var(--dh-header-h);
	gap: 16px;
}

/* Logo */
.dh-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.dh-logo img.custom-logo {
	width: auto;
	height: 44px;
	max-width: 180px;
	object-fit: contain;
	display: block;
}

.dh-logo__icon {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
}

.dh-logo__text {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--dh-green);
	letter-spacing: -0.3px;
	line-height: 1;
	white-space: nowrap;
}

.dh-logo:focus-visible {
	outline: 2px solid var(--dh-green);
	outline-offset: 3px;
	border-radius: var(--dh-radius-sm);
}

/* Desktop Nav */
.dh-nav {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.dh-nav__list {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
}

.dh-nav__link {
	display: inline-block;
	padding: 8px 13px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--dh-text);
	text-decoration: none;
	border-radius: var(--dh-radius-sm);
	white-space: nowrap;
	position: relative;
	outline-offset: 3px;
	transition: color var(--dh-ease), background var(--dh-ease);
}

/* Animated underline */
.dh-nav__link::after {
	content: '';
	position: absolute;
	bottom: 3px;
	left: 13px;
	right: 13px;
	height: 2px;
	background: var(--dh-green);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--dh-ease);
}

.dh-nav__link:hover {
	color: var(--dh-green);
	background: var(--dh-green-subtle);
}

.dh-nav__link:hover::after {
	transform: scaleX(1);
}

.dh-nav__link[aria-current="page"] {
	color: var(--dh-green);
	background: var(--dh-green-subtle);
}

.dh-nav__link[aria-current="page"]::after {
	transform: scaleX(1);
}

.dh-nav__link:focus-visible {
	outline: 2px solid var(--dh-green);
	outline-offset: 3px;
	border-radius: var(--dh-radius-sm);
}

/* Nav separator */
.dh-nav__separator {
	width: 1px;
	height: 24px;
	background: var(--dh-green-border);
	flex-shrink: 0;
	margin: 0 10px;
}

/* About button - outlined green pill */
.dh-nav__link--about {
	border: 2px solid var(--dh-green);
	color: var(--dh-green) !important;
	padding: 7px 18px;
	border-radius: var(--dh-radius-pill);
	font-weight: 700;
	transition: background var(--dh-ease), color var(--dh-ease),
	            transform var(--dh-ease), box-shadow var(--dh-ease);
}

.dh-nav__link--about::after,
.dh-nav__link--cta::after {
	display: none;
}

.dh-nav__link--about:hover {
	background: var(--dh-green);
	color: var(--dh-white) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(74, 124, 89, 0.30);
}

.dh-nav__link--about[aria-current="page"] {
	background: var(--dh-green);
	color: var(--dh-white) !important;
}

/* Contact CTA - solid orange pill */
.dh-nav__link--cta {
	background: var(--dh-orange);
	color: var(--dh-white) !important;
	padding: 9px 20px;
	border-radius: var(--dh-radius-pill);
	font-weight: 700;
	letter-spacing: 0.2px;
	box-shadow: 0 2px 10px rgba(242, 101, 34, 0.28);
	transition: background var(--dh-ease), transform var(--dh-ease), box-shadow var(--dh-ease);
}

.dh-nav__link--cta:hover {
	background: var(--dh-orange-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 18px rgba(242, 101, 34, 0.38);
}

.dh-nav__link--cta[aria-current="page"] {
	background: var(--dh-orange-dark);
	box-shadow: 0 4px 18px rgba(242, 101, 34, 0.38);
}

/* Hamburger Button */
.dh-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 7px;
	background: none;
	border: none;
	border-radius: var(--dh-radius-sm);
	cursor: pointer;
	flex-shrink: 0;
	transition: background var(--dh-ease);
}

.dh-burger:hover {
	background: var(--dh-green-subtle);
}

.dh-burger:focus-visible {
	outline: 2px solid var(--dh-green);
	outline-offset: 3px;
	border-radius: var(--dh-radius-sm);
}

.dh-burger__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--dh-text);
	border-radius: 2px;
	transform-origin: center;
	transition: transform var(--dh-ease), opacity var(--dh-ease), background var(--dh-ease);
}

/* Animated X */
.dh-burger[aria-expanded="true"] .dh-burger__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
	background: var(--dh-green);
}

.dh-burger[aria-expanded="true"] .dh-burger__bar:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}

.dh-burger[aria-expanded="true"] .dh-burger__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
	background: var(--dh-green);
}

/* Mobile Menu */
.dh-mobile-menu {
	display: block;
	background: var(--dh-white);
	border-top: 1px solid var(--dh-green-border);
	height: 0;
	overflow: hidden;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity var(--dh-ease), transform var(--dh-ease);
}

.dh-mobile-menu.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	overflow: visible;
}

.dh-mobile-menu__list {
	list-style: none;
	padding: 10px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dh-mobile-menu__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--dh-text);
	text-decoration: none;
	border-radius: var(--dh-radius-sm);
	transition: color var(--dh-ease), background var(--dh-ease);
}

.dh-mobile-menu__link:hover,
.dh-mobile-menu__link[aria-current="page"] {
	color: var(--dh-green);
	background: var(--dh-green-subtle);
}

.dh-mobile-menu__link:focus-visible {
	outline: 2px solid var(--dh-green);
	outline-offset: 3px;
	border-radius: var(--dh-radius-sm);
}

.dh-mobile-menu__divider {
	height: 1px;
	background: var(--dh-green-border);
	margin: 6px 16px;
}

/* Mobile About button */
.dh-mobile-menu__link--about {
	border: 2px solid var(--dh-green);
	color: var(--dh-green) !important;
	border-radius: var(--dh-radius-pill);
	justify-content: center;
	margin-top: 4px;
}

.dh-mobile-menu__link--about:hover,
.dh-mobile-menu__link--about[aria-current="page"] {
	background: var(--dh-green);
	color: var(--dh-white) !important;
}

/* Mobile CTA button */
.dh-mobile-menu__link--cta {
	background: var(--dh-orange);
	color: var(--dh-white) !important;
	border-radius: var(--dh-radius-pill);
	justify-content: center;
	margin-top: 4px;
	box-shadow: 0 2px 10px rgba(242, 101, 34, 0.25);
}

.dh-mobile-menu__link--cta:hover {
	background: var(--dh-orange-dark);
}

/* Responsive */
@media (max-width: 960px) {
	.dh-nav {
		display: none;
	}

	.dh-burger {
		display: flex;
	}
}

@media (max-width: 540px) {
	.dh-header__inner {
		padding: 0 16px;
	}

	.dh-logo__text {
		font-size: 1.1rem;
	}

	.dh-logo img.custom-logo {
		height: 36px;
	}
}
