/* Woking Golf Club – custom header (wgc-hdr) */

:root {
	--wgc-hdr-green: #2C5234;
	--wgc-hdr-green-solid: rgba(44, 82, 52, 0.97);
	--wgc-hdr-white: #fff;
	--wgc-hdr-ink: #141617;
	--wgc-hdr-slate: #4A4E57;
	--wgc-hdr-sage: #A8C7A0;
	--wgc-hdr-serif: "Palatino Linotype", "Book Antiqua", Palatino, serif;
	--wgc-hdr-h: 80px;
	--wgc-hdr-h-solid: 72px;
	--wgc-hdr-pad: 56px;
	--wgc-hdr-top: 0px;
	--wgc-hdr-ease: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 1024px) {
	:root {
		--wgc-hdr-h: 64px;
		--wgc-hdr-h-solid: 60px;
		--wgc-hdr-pad: 20px;
	}
}

/* Admin bar */
body.admin-bar { --wgc-hdr-top: 32px; }
@media (max-width: 782px) {
	body.admin-bar { --wgc-hdr-top: 46px; }
}
@media (max-width: 600px) {
	/* The admin bar scrolls away on small screens; drop the header to 0 once scrolled. */
	body.admin-bar .wgc-hdr--solid:not(.wgc-hdr--always-solid) { --wgc-hdr-top: 0px; }
}

/* Inner pages without a hero: keep content clear of the fixed header */
body.wgc-hdr-no-hero { padding-top: var(--wgc-hdr-h-solid); }

.wgc-hdr-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Bar */

.wgc-hdr {
	position: fixed;
	top: var(--wgc-hdr-top);
	left: 0;
	right: 0;
	z-index: 9000;
	color: var(--wgc-hdr-white);
	font-family: var(--wgc-hdr-serif);
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	transform: translateY(0);
	transition:
		transform .45s var(--wgc-hdr-ease),
		background-color .35s ease,
		border-color .35s ease,
		top .3s ease;
	-webkit-font-smoothing: antialiased;
}

/* Readability scrim over the hero */
.wgc-hdr::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 150px;
	background: linear-gradient(to bottom, rgba(20, 40, 26, 0.45) 0%, rgba(20, 40, 26, 0) 100%);
	pointer-events: none;
	transition: opacity .35s ease;
	z-index: -1;
}

.wgc-hdr--solid {
	background-color: var(--wgc-hdr-green-solid);
	border-bottom-color: transparent;
}
.wgc-hdr--solid::before { opacity: 0; }

.wgc-hdr--hidden { transform: translateY(calc(-100% - var(--wgc-hdr-top))); }

.wgc-hdr__bar {
	display: grid;
	/* Side columns never shrink below their content, so the centred menu
	   can't be overlapped by the brand or the utilities. */
	grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
	column-gap: 32px;
	align-items: center;
	height: var(--wgc-hdr-h);
	padding: 0 var(--wgc-hdr-pad);
	transition: height .35s ease;
}
.wgc-hdr--solid .wgc-hdr__bar { height: var(--wgc-hdr-h-solid); }

.wgc-hdr a,
.wgc-hdr button {
	color: inherit;
	font-family: var(--wgc-hdr-serif);
	text-decoration: none;
	border-radius: 0;
	box-shadow: none;
}
.wgc-hdr button {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.wgc-hdr :focus-visible,
.wgc-hdr-overlay :focus-visible {
	outline: 1px solid var(--wgc-hdr-white);
	outline-offset: 4px;
}

/* Beat Avada's global link colours (body a, a:hover) */
.wgc-hdr-root .wgc-hdr__brand,
.wgc-hdr-root .wgc-hdr__brand:hover,
.wgc-hdr-root .wgc-hdr__brand:focus,
.wgc-hdr-root .wgc-hdr__link,
.wgc-hdr-root .wgc-hdr__link:hover,
.wgc-hdr-root .wgc-hdr__link:focus,
.wgc-hdr-root .wgc-hdr__link:visited { color: var(--wgc-hdr-white); }

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

.wgc-hdr__brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	justify-self: start;
	line-height: 1;
}
.wgc-hdr__crest {
	display: block;
	height: 44px;
	width: auto;
	max-width: none;
}
.wgc-hdr__wordmark {
	display: flex;
	flex-direction: column;
	gap: 6px;
	white-space: nowrap;
}
.wgc-hdr__wordmark-name {
	font-size: 13px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--wgc-hdr-white);
}
.wgc-hdr__wordmark-sub {
	font-size: 10px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

/* ---------------------------------------------------------------- Menu (desktop) */

.wgc-hdr__menu,
.wgc-hdr__sub,
.wgc-hdr-overlay__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.wgc-hdr__menu {
	display: flex;
	align-items: center;
	gap: 44px;
}
.wgc-hdr__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	height: var(--wgc-hdr-h);
	transition: height .35s ease;
}
.wgc-hdr--solid .wgc-hdr__item { height: var(--wgc-hdr-h-solid); }

.wgc-hdr__link {
	position: relative;
	display: inline-block;
	padding: 6px 0;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wgc-hdr-white);
}
.wgc-hdr__link::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .35s ease;
}
.wgc-hdr__link:hover::after,
.wgc-hdr__link:focus-visible::after,
.wgc-hdr__item.is-current > .wgc-hdr__link::after {
	transform: scaleX(1);
}

.wgc-hdr__caret {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 24px;
	color: rgba(255, 255, 255, 0.8);
}
.wgc-hdr__caret svg { transition: transform .25s ease; }
.wgc-hdr__item.is-open .wgc-hdr__caret svg { transform: rotate(180deg); }

.wgc-hdr__sub {
	position: absolute;
	top: 100%;
	left: 50%;
	width: 240px;
	margin-left: -120px;
	padding: 14px 0;
	background: var(--wgc-hdr-green);
	border-top: 1px solid var(--wgc-hdr-sage);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
@media (hover: hover) {
	.wgc-hdr__item--has-sub:hover > .wgc-hdr__sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
.wgc-hdr__item--has-sub:focus-within > .wgc-hdr__sub,
.wgc-hdr__item--has-sub.is-open > .wgc-hdr__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
.wgc-hdr__item--has-sub.is-closed > .wgc-hdr__sub { opacity: 0; visibility: hidden; }

.wgc-hdr__sublink {
	display: block;
	padding: 10px 26px;
	font-size: 11.5px;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8) !important;
	transition: color .25s ease, transform .25s ease;
}
.wgc-hdr__sublink:hover,
.wgc-hdr__sublink:focus-visible,
.wgc-hdr__sublink[aria-current="page"] {
	color: var(--wgc-hdr-white) !important;
	transform: translateX(6px);
}

/* ---------------------------------------------------------------- Utilities (desktop) */

.wgc-hdr__utils {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	justify-self: end;
}
.wgc-hdr__members {
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin-right: 24px;
	color: rgba(255, 255, 255, 0.78) !important;
	transition: color .3s ease;
}
.wgc-hdr__members:hover,
.wgc-hdr__members:focus-visible { color: var(--wgc-hdr-white) !important; }

.wgc-hdr .wgc-hdr__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 40px;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
	background: transparent;
	transition: border-color .3s ease, background-color .3s ease, color .3s ease;
}
.wgc-hdr .wgc-hdr__btn--status {
	padding: 0 18px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--wgc-hdr-white);
}
.wgc-hdr .wgc-hdr__btn--status:hover { border-color: rgba(255, 255, 255, 0.7); }
.wgc-hdr .wgc-hdr__btn--visit {
	margin-left: 12px;
	padding: 0 22px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	color: var(--wgc-hdr-white);
}
.wgc-hdr .wgc-hdr__btn--visit:hover,
.wgc-hdr .wgc-hdr__btn--visit:focus-visible {
	background: var(--wgc-hdr-white);
	border-color: var(--wgc-hdr-white);
	color: var(--wgc-hdr-green);
}

.wgc-hdr__dot {
	display: inline-block;
	flex: none;
	width: 6px;
	height: 6px;
	background: var(--wgc-hdr-sage);
}

.wgc-hdr__btn-short,
.wgc-hdr__toggle { display: none; }

/* ---------------------------------------------------------------- Medium screens (landscape tablets, small laptops) */

@media (min-width: 1025px) and (max-width: 1360px) {
	:root { --wgc-hdr-pad: 32px; }
	.wgc-hdr__bar { column-gap: 24px; }
	.wgc-hdr__menu { gap: 28px; }
	.wgc-hdr__link,
	.wgc-hdr__members,
	.wgc-hdr .wgc-hdr__btn { letter-spacing: 0.12em; }
	.wgc-hdr__members { margin-right: 18px; }
	.wgc-hdr .wgc-hdr__btn--status { padding: 0 14px; }
	.wgc-hdr .wgc-hdr__btn--visit { margin-left: 10px; padding: 0 16px; }
}

@media (min-width: 1025px) and (max-width: 1200px) {
	.wgc-hdr__brand { gap: 12px; }
	.wgc-hdr__crest { height: 42px; }
	.wgc-hdr__btn-full { display: none; }
	.wgc-hdr__btn-short { display: inline; }
}

/* ---------------------------------------------------------------- Mobile + tablet bar */

@media (max-width: 1024px) {
	.wgc-hdr__bar { grid-template-columns: 1fr auto; }
	.wgc-hdr__nav,
	.wgc-hdr__members,
	.wgc-hdr .wgc-hdr__btn--visit { display: none; }

	.wgc-hdr__crest { height: 38px; }
	.wgc-hdr__brand { gap: 12px; }

	.wgc-hdr__utils { gap: 6px; }

	.wgc-hdr .wgc-hdr__btn--status {
		position: relative;
		height: 36px;
		padding: 0 12px;
		gap: 8px;
		font-size: 10px;
		letter-spacing: 0.2em;
	}
	/* Extend the tap area to 44px without changing the visual size */
	.wgc-hdr .wgc-hdr__btn--status::after {
		content: "";
		position: absolute;
		left: 0; right: 0;
		top: -5px; bottom: -5px;
	}
	.wgc-hdr__btn-full { display: none; }
	.wgc-hdr__btn-short { display: inline; }

	.wgc-hdr .wgc-hdr__toggle {
		display: inline-flex;
		align-items: center;
		justify-content: flex-end;
		gap: 10px;
		min-width: 44px;
		min-height: 44px;
		padding: 0 0 0 10px;
		font-size: 10.5px;
		line-height: 1;
		letter-spacing: 0.24em;
		text-transform: uppercase;
		color: var(--wgc-hdr-white);
	}
	.wgc-hdr__toggle-icon {
		position: relative;
		display: block;
		width: 22px;
		height: 10px;
	}
	.wgc-hdr__toggle-icon span {
		position: absolute;
		right: 0;
		height: 1px;
		background: currentColor;
		transition: transform .35s var(--wgc-hdr-ease), width .35s var(--wgc-hdr-ease), top .35s var(--wgc-hdr-ease);
	}
	.wgc-hdr__toggle-icon span:first-child { top: 2px; width: 22px; }
	.wgc-hdr__toggle-icon span:last-child { top: 8px; width: 14px; }

	.wgc-hdr-menu-open .wgc-hdr__toggle-icon span:first-child { top: 5px; transform: rotate(45deg); }
	.wgc-hdr-menu-open .wgc-hdr__toggle-icon span:last-child { top: 5px; width: 22px; transform: rotate(-45deg); }

	/* With the overlay open the bar sits clear on the green */
	.wgc-hdr-menu-open .wgc-hdr {
		background-color: transparent;
		border-bottom-color: rgba(255, 255, 255, 0.12);
		transform: none;
	}
	.wgc-hdr-menu-open .wgc-hdr::before { opacity: 0; }
}

@media (max-width: 399px) {
	.wgc-hdr__wordmark { display: none; }
}

/* ---------------------------------------------------------------- Mobile overlay */

.wgc-hdr-overlay {
	position: fixed;
	inset: 0;
	z-index: 8999;
	background: var(--wgc-hdr-green);
	color: var(--wgc-hdr-white);
	font-family: var(--wgc-hdr-serif);
	overflow-y: auto;
	overscroll-behavior: contain;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility 0s linear .35s;
}
.wgc-hdr-overlay[hidden] { display: none; }
.wgc-hdr-menu-open .wgc-hdr-overlay {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}
.wgc-hdr-overlay__inner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	min-height: 100%;
	padding: calc(var(--wgc-hdr-top) + var(--wgc-hdr-h) + 16px) 24px calc(32px + env(safe-area-inset-bottom));
	transform: translateY(12px);
	transition: transform .35s var(--wgc-hdr-ease);
}
.wgc-hdr-menu-open .wgc-hdr-overlay__inner { transform: none; }

.wgc-hdr-overlay__list li { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.wgc-hdr-overlay__list li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.wgc-hdr-overlay__link {
	display: block;
	padding: 16px 0;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--wgc-hdr-white) !important;
	text-decoration: none;
}
.wgc-hdr-overlay__link.is-current { color: var(--wgc-hdr-sage) !important; }

.wgc-hdr-overlay__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.wgc-hdr-overlay__visit,
.wgc-hdr-overlay .wgc-hdr-overlay__status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border-radius: 0;
	box-shadow: none;
	font-family: var(--wgc-hdr-serif);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
}
.wgc-hdr-overlay__visit {
	background: var(--wgc-hdr-white);
	border: 1px solid var(--wgc-hdr-white);
	color: var(--wgc-hdr-green) !important;
}
.wgc-hdr-overlay .wgc-hdr-overlay__status {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--wgc-hdr-white);
	-webkit-appearance: none;
	appearance: none;
}
.wgc-hdr-overlay__members,
.wgc-hdr-overlay__tel {
	display: block;
	padding: 6px 0;
	text-align: center;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.8) !important;
	text-decoration: none;
}
.wgc-hdr-overlay__members { margin-top: 8px; }
.wgc-hdr-overlay__tel { letter-spacing: 0.08em; }

html.wgc-hdr-menu-open,
html.wgc-hdr-menu-open body { overflow: hidden; }

@media (min-width: 1025px) {
	.wgc-hdr-overlay { display: none !important; }
}

/* ---------------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.wgc-hdr,
	.wgc-hdr *,
	.wgc-hdr::before,
	.wgc-hdr-overlay,
	.wgc-hdr-overlay__inner {
		transition: none !important;
	}
	.wgc-hdr-overlay__inner { transform: none; }
	.wgc-hdr--hidden { visibility: hidden; }
}
