/* ==========================================================================
   Barclay Header - Two-row design
   Row 1: Slim utility bar (contact + quick links)
   Row 2: Logo + primary nav + CTA button
   ========================================================================== */

.barclay-header .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Wrapper ---- */
.barclay-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 99999;
	font-family: 'Open Sans', sans-serif;
}

.admin-bar .barclay-header {
	top: 32px;
}

/* Total header height = 70px main */
body.has-barclay-header {
	padding-top: 70px;
}

.admin-bar.has-barclay-header {
	padding-top: 70px;
}

/* ---- Main nav bar ---- */
.header-main {
	background: #fff;
	height: 70px;
	display: flex;
	align-items: center;
	border-bottom: 3px solid #f26622;
	transition: background 0.3s ease;
}

.barclay-header.is-scrolled .header-main {
	background: #1a1a1d;
}

.header-container {
	width: 80%;
	max-width: 1208px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
}

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

.header-logo img {
	max-height: 44px;
	width: auto;
	transition: opacity 0.2s ease;
}

/* Logo swap: dark logo on white bg (default), white logo on dark bg (scrolled) */
.header-logo .logo-dark {
	display: block;
}

.header-logo .logo-light {
	display: none;
}

.barclay-header.is-scrolled .header-logo .logo-dark {
	display: none;
}

.barclay-header.is-scrolled .header-logo .logo-light {
	display: block;
}

.header-logo:hover img {
	opacity: 0.85;
}

/* ---- Nav ---- */
.header-nav {
	display: flex;
	align-items: center;
}

.header-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 4px;
	align-items: center;
}

/* ---- Menu items ---- */
.menu-item {
	position: relative;
}

.menu-link,
.dropdown-toggle {
	display: flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	color: #1a1a1d;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding: 8px 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.3s ease;
	text-decoration: none;
	line-height: 1.4;
	position: relative;
}

a.menu-link:visited,
a.dropdown-toggle:visited {
	color: #1a1a1d;
}

/* Scrolled state: white text on dark bg */
.barclay-header.is-scrolled .menu-link,
.barclay-header.is-scrolled .dropdown-toggle {
	color: #fff;
}

.barclay-header.is-scrolled a.menu-link:visited,
.barclay-header.is-scrolled a.dropdown-toggle:visited {
	color: #fff;
}

/* Orange underline indicator on hover */
.menu-link::after,
.dropdown-toggle::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 14px;
	right: 14px;
	height: 2px;
	background: #f26622;
	transform: scaleX(0);
	transition: transform 0.2s ease;
}

.menu-link:hover::after,
.menu-link:focus-visible::after {
	transform: scaleX(1);
}

/* No underline on dropdown toggles or CTA button */
.dropdown-toggle::after,
.menu-cta-btn::after {
	display: none;
}

.menu-link:hover,
.menu-link:focus-visible,
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible,
.menu-item.is-open > .dropdown-toggle {
	color: #f26622;
}

a.menu-link:visited:hover,
a.menu-link:visited:focus-visible,
a.dropdown-toggle:visited:hover,
a.dropdown-toggle:visited:focus-visible,
.menu-item.is-open > a.dropdown-toggle:visited {
	color: #f26622;
}

.barclay-header.is-scrolled a.menu-link:visited:hover,
.barclay-header.is-scrolled a.menu-link:visited:focus-visible,
.barclay-header.is-scrolled a.dropdown-toggle:visited:hover,
.barclay-header.is-scrolled a.dropdown-toggle:visited:focus-visible,
.barclay-header.is-scrolled .menu-item.is-open > a.dropdown-toggle:visited {
	color: #f26622;
}

.menu-link:focus-visible,
.dropdown-toggle:focus-visible {
	outline: 2px solid #f26622;
	outline-offset: -2px;
	border-radius: 3px;
}

/* ---- CTA button (Contact Us) ---- */
.menu-cta-btn {
	background: #f26622 !important;
	color: #fff !important;
	border-radius: 4px;
	padding: 8px 20px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 1px;
	transition: background 0.2s ease, transform 0.1s ease !important;
}

.menu-cta-btn:hover,
.menu-cta-btn:focus-visible {
	background: #d4551a !important;
	color: #fff !important;
	transform: translateY(-1px);
}

a.menu-cta-btn:visited {
	color: #fff;
}

/* ---- Chevron ---- */
.chevron {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.menu-item.is-open > .dropdown-toggle .chevron {
	transform: rotate(180deg);
}

/* ---- Dropdown ---- */
.dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 260px;
	background: #1a1a1d;
	list-style: none;
	margin: 0;
	padding: 10px 0;
	border-left: 3px solid #f26622;
	border-radius: 0 0 4px 0;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.menu-item.is-open > .dropdown-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dropdown-menu a {
	display: block;
	padding: 9px 20px;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.3px;
	transition: color 0.15s ease, padding-left 0.15s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
	color: #fff;
	padding-left: 26px;
}

.dropdown-menu a:focus-visible {
	outline: 2px solid #f26622;
	outline-offset: -2px;
}

.mobile-only {
	display: none;
}

/* ---- Hamburger ---- */
.header-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	z-index: 10;
}

.hamburger-line {
	display: block;
	width: 24px;
	height: 2px;
	background: #1a1a1d;
	transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.barclay-header.is-scrolled .hamburger-line {
	background: #fff;
}

.header-menu-toggle:focus-visible {
	outline: 2px solid #f26622;
	outline-offset: 2px;
	border-radius: 3px;
}

.header-menu-toggle.is-open .hamburger-line:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.header-menu-toggle.is-open .hamburger-line:nth-child(2) {
	opacity: 0;
}

.header-menu-toggle.is-open .hamburger-line:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Overlay ---- */
.header-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: -1;
}

body.header-menu-open .header-overlay {
	display: block;
}

/* ---- Scroll shadow ---- */
.barclay-header.is-scrolled {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ---- Nav hover triggers scrolled-state styling (desktop only) ---- */
@media (min-width: 981px) {
	.barclay-header:has(.header-nav:hover) .header-main {
		background: #1a1a1d;
	}

	.barclay-header:has(.header-nav:hover) {
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	}

	.barclay-header:has(.header-nav:hover) .header-logo .logo-dark {
		display: none;
	}

	.barclay-header:has(.header-nav:hover) .header-logo .logo-light {
		display: block;
	}

	.barclay-header:has(.header-nav:hover) .menu-link,
	.barclay-header:has(.header-nav:hover) .dropdown-toggle {
		color: #fff;
	}

	.barclay-header:has(.header-nav:hover) a.menu-link:visited,
	.barclay-header:has(.header-nav:hover) a.dropdown-toggle:visited {
		color: #fff;
	}

	.barclay-header:has(.header-nav:hover) .menu-link:hover,
	.barclay-header:has(.header-nav:hover) .menu-link:focus-visible,
	.barclay-header:has(.header-nav:hover) .dropdown-toggle:hover,
	.barclay-header:has(.header-nav:hover) .dropdown-toggle:focus-visible,
	.barclay-header:has(.header-nav:hover) .menu-item.is-open > .dropdown-toggle,
	.barclay-header:has(.header-nav:hover) a.menu-link:visited:hover,
	.barclay-header:has(.header-nav:hover) a.dropdown-toggle:visited:hover {
		color: #f26622;
	}
}


/* ==========================================================================
   Mobile / Responsive
   ========================================================================== */

@media (max-width: 980px) {
	body.has-barclay-header {
		padding-top: 65px;
	}

	.admin-bar.has-barclay-header {
		padding-top: 65px;
	}

	.header-main {
		height: 65px;
	}

	.header-container {
		width: 90%;
		height: 65px;
		justify-content: space-between;
	}

	.header-logo img {
		max-height: 38px;
	}

	.header-menu-toggle {
		display: flex;
	}

	/* Slide-out panel */
	.header-nav {
		position: fixed;
		top: 65px;
		bottom: 0;
		right: -100%;
		width: 85%;
		max-width: 380px;
		background: #1a1a1d;
		overflow-y: auto;
		transition: right 0.3s ease;
		display: block;
		padding: 16px 0;
		box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
		-webkit-overflow-scrolling: touch;
	}

	.admin-bar .header-nav {
		top: 97px;
	}

	.header-nav.is-open {
		right: 0;
	}

	.header-menu {
		flex-direction: column;
		gap: 0;
		width: 100%;
	}

	.menu-item {
		width: 100%;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	}

	.menu-link,
	.dropdown-toggle {
		width: 100%;
		justify-content: space-between;
		padding: 14px 24px;
		font-size: 14px;
		color: #fff;
	}

	/* Standalone links (no dropdown) align left */
	.menu-item:not(.has-dropdown) .menu-link {
		justify-content: flex-start;
	}

	a.menu-link:visited,
	a.dropdown-toggle:visited {
		color: #fff;
	}

	/* No underline animation on mobile */
	.menu-link::after,
	.dropdown-toggle::after {
		display: none;
	}

	/* CTA button fills width on mobile */
	.menu-item-cta {
		padding: 16px 24px;
		border-bottom: none;
	}

	.menu-cta-btn {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	/* Dropdown accordion */
	.dropdown-menu {
		position: static;
		min-width: 0;
		border-left: none;
		border-radius: 0;
		box-shadow: none;
		background: rgba(0, 0, 0, 0.15);
		max-height: 0;
		overflow: hidden;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: max-height 0.3s ease;
		padding: 0;
	}

	.menu-item.is-open > .dropdown-menu {
		padding: 0;
	}

	.dropdown-menu a {
		padding: 10px 24px 10px 36px;
		font-size: 13px;
	}

	.dropdown-menu a:hover,
	.dropdown-menu a:focus-visible {
		padding-left: 36px;
	}

	.mobile-only {
		display: list-item;
	}

	.mobile-only a {
		font-weight: 600;
		color: #f26622 !important;
	}

	body.header-menu-open {
		overflow: hidden;
	}
}

@media (max-width: 782px) {
	.admin-bar .barclay-header {
		top: 46px;
	}

	.admin-bar .header-nav {
		top: 111px;
	}

	.admin-bar.has-barclay-header {
		padding-top: 65px;
	}
}

@media (max-width: 480px) {
	.header-container {
		width: 92%;
	}

	.header-nav {
		width: 100%;
		max-width: none;
	}
}

/* Hide sidebar column and expand content to full width */
.et_pb_section_0 .et_pb_row_1-4_3-4 > .et_pb_column_1_4,
.et_pb_section_1 .et_pb_row_1-4_3-4 > .et_pb_column_1_4 {
	display: none;
}

.et_pb_section_0 .et_pb_row_1-4_3-4 > .et_pb_column_3_4,
.et_pb_section_1 .et_pb_row_1-4_3-4 > .et_pb_column_3_4 {
	width: 100% !important;
}
