/* ==========================================================================
   Buker Pond Events — header (centered logo, split navigation)
   ========================================================================== */

.bpe-header { position: relative; z-index: 999; width: 100%; color: var(--bpe-champagne); font-family: var(--bpe-font-body); }
.bpe-header--transparent { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(180deg, rgba(12, 9, 7, .82) 0%, rgba(12, 9, 7, .42) 58%, rgba(12, 9, 7, 0) 100%); }

/* Pages that do not start with a hero photo get a solid header (no overlap). */
.bpe-header--solid,
.bpe-header.is-solid,
body.bpe-site:not(:has(.bpe-hero)) .bpe-header--transparent { position: relative; top: auto; background: var(--bpe-espresso); border-bottom: 1px solid var(--bpe-line); }

/* ---------- Top bar ---------- */
.bpe-topbar { border-bottom: 1px solid rgba(214, 176, 138, .14); }
.bpe-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(100% - 48px, 1680px); min-height: 42px; margin-inline: auto; }
.bpe-topbar__place { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 237, 229, .78); }
.bpe-topbar__place .bpe-icon { width: 15px; height: 15px; color: var(--bpe-gold); }
.bpe-topbar__links { display: flex; align-items: center; gap: 20px; }
body.bpe-site .bpe-topbar__link { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; letter-spacing: .03em; color: rgba(243, 237, 229, .8); }
body.bpe-site .bpe-topbar__link:hover { color: var(--bpe-gold); }
.bpe-topbar__link .bpe-icon { width: 16px; height: 16px; }
.bpe-topbar__sep { width: 1px; height: 16px; background: rgba(214, 176, 138, .3); }
body.bpe-site .bpe-topbar__cta { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--bpe-gold); }
body.bpe-site .bpe-topbar__cta:hover { color: var(--bpe-champagne); }

/* ---------- Main bar ---------- */
.bpe-header__bar {
	position: relative;
	z-index: 1000;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(24px, 2.6vw, 48px);
	width: min(100% - 48px, 1680px);
	min-height: 120px;
	margin-inline: auto;
	transition: min-height .45s var(--bpe-ease);
}
.bpe-nav { min-width: 0; }
.bpe-nav--left { justify-self: end; }
.bpe-nav--right { justify-self: start; }
.bpe-menu { display: flex; align-items: center; gap: clamp(18px, 1.6vw, 34px); margin: 0; padding: 0; list-style: none; }
.bpe-menu > li { position: relative; display: flex; align-items: center; }

body.bpe-site .bpe-nav .bpe-menu > li > a {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 12px 0;
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .17em;
	line-height: 1.3;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--bpe-champagne);
}
body.bpe-site .bpe-nav .bpe-menu > li > a:hover { color: #fff; }
.bpe-nav .bpe-menu > li > a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 1px; background: var(--bpe-gold); transition: left .4s var(--bpe-ease), right .4s var(--bpe-ease); }
.bpe-nav .bpe-menu > li:hover > a::after,
.bpe-nav .bpe-menu > li > a:focus-visible::after,
.bpe-nav .bpe-menu > li.current-menu-item > a::after,
.bpe-nav .bpe-menu > li.current-menu-ancestor > a::after,
.bpe-nav .bpe-menu > li.current-menu-parent > a::after { left: 0; right: 0; }
body.bpe-site .bpe-nav .bpe-menu > li.current-menu-item > a,
body.bpe-site .bpe-nav .bpe-menu > li.current-menu-ancestor > a { color: var(--bpe-gold); }

/* Chevron button for menus with a dropdown */
body.bpe-site .bpe-subtoggle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 30px; margin: 0 0 0 3px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--bpe-gold); cursor: pointer; }
body.bpe-site .bpe-subtoggle:hover, body.bpe-site .bpe-subtoggle:focus { background: none; color: var(--bpe-champagne); }
.bpe-subtoggle::before { content: ""; width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .35s var(--bpe-ease); }
.bpe-menu li:hover > .bpe-subtoggle::before, .bpe-menu li.is-open > .bpe-subtoggle::before { transform: translateY(1px) rotate(-135deg); }

/* ---------- Dropdown ---------- */
.bpe-nav .sub-menu {
	position: absolute;
	top: calc(100% + 16px);
	left: 50%;
	z-index: 5;
	width: 330px;
	margin: 0;
	padding: 12px 0;
	list-style: none;
	background: #0F0B09;
	border: 1px solid var(--bpe-line);
	border-top: 2px solid var(--bpe-gold);
	box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 10px);
	transition: opacity .3s var(--bpe-ease), transform .3s var(--bpe-ease), visibility .3s;
}
.bpe-nav .sub-menu::before { content: ""; position: absolute; top: -8px; left: 50%; width: 12px; height: 12px; background: var(--bpe-gold); transform: translateX(-50%) rotate(45deg); clip-path: polygon(0 0, 100% 0, 0 100%); }
.bpe-nav .sub-menu::after { content: ""; position: absolute; left: 0; right: 0; top: -20px; height: 20px; }
.bpe-nav li:hover > .sub-menu, .bpe-nav li:focus-within > .sub-menu, .bpe-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.bpe-nav .sub-menu li { display: block; }
body.bpe-site .bpe-nav .sub-menu a { display: block; padding: 11px 28px; border-left: 2px solid transparent; text-transform: none; letter-spacing: 0; white-space: normal; transition: background .25s, border-color .25s, padding .3s var(--bpe-ease); }
.bpe-menu__title { display: block; font-family: var(--bpe-font-display); font-size: 1.28rem; font-weight: 500; line-height: 1.2; color: var(--bpe-cream); }
.bpe-menu__desc { display: block; margin-top: 3px; font-size: .78rem; line-height: 1.45; color: #A39890; }
body.bpe-site .bpe-nav .sub-menu a:hover, body.bpe-site .bpe-nav .sub-menu a:focus-visible { background: rgba(214, 176, 138, .07); border-left-color: var(--bpe-gold); padding-left: 32px; }
.bpe-nav .sub-menu a:hover .bpe-menu__title, .bpe-nav .sub-menu .current-menu-item > a .bpe-menu__title { color: var(--bpe-gold); }

/* ---------- Logo (Primary logo, reversed for dark backgrounds) ---------- */
.bpe-header__logo { position: relative; z-index: 2; display: block; width: 300px; margin-block: 10px; line-height: 0; transition: width .45s var(--bpe-ease), margin .45s var(--bpe-ease), opacity .3s; }
body.bpe-site .bpe-header__logo img { width: 100%; height: auto; max-width: none; object-fit: contain; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .45)); }
.bpe-header__logo:hover { opacity: .9; }

/* ---------- Burger ---------- */
body.bpe-site .bpe-burger { display: none; justify-self: end; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(214, 176, 138, .45); border-radius: 0; background: rgba(12, 9, 7, .35); box-shadow: none; color: var(--bpe-champagne); cursor: pointer; }
body.bpe-site .bpe-burger:hover, body.bpe-site .bpe-burger:focus { background: rgba(12, 9, 7, .55); color: var(--bpe-gold); }
.bpe-burger__lines { position: relative; display: block; width: 20px; height: 12px; }
.bpe-burger__lines span { position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; transition: transform .35s var(--bpe-ease), opacity .25s; }
.bpe-burger__lines span:nth-child(1) { top: 0; }
.bpe-burger__lines span:nth-child(2) { top: 6px; }
.bpe-burger__lines span:nth-child(3) { top: 12px; }
.bpe-burger[aria-expanded="true"] .bpe-burger__lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bpe-burger[aria-expanded="true"] .bpe-burger__lines span:nth-child(2) { opacity: 0; }
.bpe-burger[aria-expanded="true"] .bpe-burger__lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sticky (after scrolling) ---------- */
body.bpe-site .bpe-header.is-stuck { position: fixed; top: 0; left: 0; right: 0; background: rgb(12, 9, 7); border-bottom: 1px solid var(--bpe-line); animation: bpe-drop .45s var(--bpe-ease); }
body.admin-bar .bpe-header.is-stuck { top: 32px; }
.bpe-header.is-stuck .bpe-topbar { display: none; }
.bpe-header.is-stuck .bpe-header__bar { min-height: 78px; }
.bpe-header.is-stuck .bpe-header__logo { width: 170px; margin-block: 6px; }
.bpe-header.is-stuck .sub-menu { top: calc(100% + 12px); }
@keyframes bpe-drop { from { transform: translateY(-100%); } to { transform: none; } }
.bpe-header-spacer { display: block; }

/* ---------- Mobile drawer ---------- */
.bpe-drawer { position: fixed; inset: 0; z-index: 998; overflow-y: auto; padding: 130px 24px 48px; background: var(--bpe-espresso); background-image: radial-gradient(ellipse at top, rgba(214, 176, 138, .12), transparent 60%); }
.admin-bar .bpe-drawer { top: 32px; }
.bpe-drawer[hidden] { display: none; }
.bpe-drawer__inner { display: flex; flex-direction: column; gap: 28px; max-width: 520px; margin-inline: auto; }
.bpe-drawer .bpe-btn { width: 100%; }
.bpe-menu--mobile { flex-direction: column; align-items: stretch; gap: 0; }
.bpe-menu--mobile > li { flex-wrap: wrap; border-bottom: 1px solid var(--bpe-line); }
body.bpe-site .bpe-drawer .bpe-menu--mobile > li > a { flex: 1; padding: 15px 0; font-family: var(--bpe-font-display); font-size: 1.7rem; font-weight: 500; line-height: 1.2; color: var(--bpe-cream); }
body.bpe-site .bpe-drawer .bpe-menu--mobile .bpe-subtoggle { width: 48px; height: 48px; }
.bpe-menu--mobile .sub-menu { display: none; width: 100%; margin: 0; padding: 0 0 14px 14px; list-style: none; border-left: 1px solid var(--bpe-line); }
.bpe-menu--mobile li.is-open > .sub-menu { display: block; }
body.bpe-site .bpe-drawer .bpe-menu--mobile .sub-menu a { display: block; padding: 9px 0 9px 12px; }
.bpe-menu--mobile .bpe-menu__title { font-size: 1.2rem; font-style: italic; color: var(--bpe-champagne); }
.bpe-menu--mobile .bpe-menu__desc { display: none; }
.bpe-drawer__contact { display: grid; gap: 12px; font-size: .92rem; }
.bpe-drawer__contact p { margin: 0; }
body.bpe-site .bpe-drawer__contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--bpe-champagne); }
body.bpe-drawer-open { overflow: hidden; }
body.bpe-site.bpe-drawer-open .bpe-header { position: fixed; top: 0; left: 0; right: 0; background: var(--bpe-espresso); }
body.bpe-site.admin-bar.bpe-drawer-open .bpe-header { top: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) {
	body.bpe-site .bpe-nav .bpe-menu > li > a { font-size: .72rem; letter-spacing: .14em; }
	.bpe-menu { gap: clamp(14px, 1.2vw, 22px); }
	.bpe-header__bar { gap: 26px; }
	.bpe-header__logo { width: 272px; }
}
@media (max-width: 1360px) {
	body.bpe-site .bpe-nav .bpe-menu > li > a { font-size: .7rem; letter-spacing: .11em; }
	.bpe-menu { gap: 15px; }
	.bpe-header__bar { gap: 20px; }
	.bpe-header__logo { width: 244px; }
}
@media (max-width: 1279px) {
	.bpe-nav { display: none; }
	.bpe-header__bar { grid-template-columns: 48px 1fr 48px; min-height: 86px; }
	.bpe-header__logo { grid-column: 2; justify-self: center; width: 230px; margin-block: 10px; }
	body.bpe-site .bpe-burger { display: inline-flex; grid-column: 3; }
	.bpe-header.is-stuck .bpe-header__bar { min-height: 70px; }
	.bpe-header.is-stuck .bpe-header__logo { width: 140px; margin-block: 7px; }
	.bpe-topbar__link span { display: none; }
}
@media (max-width: 782px) {
	.admin-bar .bpe-drawer, body.bpe-site.admin-bar.bpe-drawer-open .bpe-header { top: 46px; }
	body.admin-bar .bpe-header.is-stuck { top: 46px; }
}
@media (max-width: 600px) {
	/* The WordPress admin bar scrolls away on small phones. */
	body.admin-bar .bpe-header.is-stuck { top: 0; }
}
@media (max-width: 700px) {
	.bpe-topbar { display: none; }
	.bpe-header__bar { width: calc(100% - 40px); min-height: 78px; gap: 8px; }
	.bpe-header__logo { width: min(168px, 100%); margin-block: 8px; }
	.bpe-drawer { padding-top: 112px; }
}
