/* TBA Header — brand colours taken from the existing TBA logo */
:root {
	--tba-navy: #29176d;
	--tba-navy-dark: #1d0f52;
	--tba-red: #d3281f;
	--tba-red-dark: #b11f17;
	--tba-ink: #1e1c1b;
	--tba-muted: #5d5a6b;
	--tba-line: #e7e5ef;
	--tba-bg-soft: #f6f5fb;
	--tba-radius: 8px;
	--tba-shadow: 0 10px 30px rgba(29, 15, 82, .12);
	--tba-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.tba-header-wrap, .tba-header-wrap * { box-sizing: border-box; }
.tba-header-wrap { font-family: var(--tba-font); position: relative; z-index: 999; }
.tba-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.tba-ico { width: 15px; height: 15px; fill: currentColor; flex: 0 0 auto; }

/* ---------- Top bar ---------- */
.tba-topbar { background: var(--tba-navy); color: #fff; font-size: 13.5px; line-height: 1; }
.tba-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.tba-topbar ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.tba-topbar-contact { gap: 24px; }
.tba-topbar a { color: rgba(255,255,255,.92); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.tba-topbar a:hover, .tba-topbar a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tba-topbar-right { display: flex; align-items: center; gap: 18px; }
.tba-social { gap: 6px; }
.tba-social a { width: 28px; height: 28px; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.tba-social a:hover { background: var(--tba-red); text-decoration: none; }
.tba-lang { display: inline-flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); }
.tba-topbar { position: relative; z-index: 1001; }
.tba-topbar.tba-gt-open { z-index: 100002; } /* theme header is z-index 99999 */
.tba-gt { position: relative; }
.tba-gt-btn { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background .2s; }
.tba-gt-btn:hover, .tba-gt-btn[aria-expanded="true"] { background: var(--tba-red); }
.tba-gt-btn .tba-ico { width: 18px; height: 18px; }
.tba-topbar .tba-gt-list { display: block; position: absolute; top: calc(100% + 10px); right: 0; z-index: 1002; min-width: 200px; width: max-content; margin: 0; padding: 8px; list-style: none; text-align: left; background: #fff; border: 1px solid var(--tba-line); border-top: 3px solid var(--tba-red); border-radius: 0 0 var(--tba-radius) var(--tba-radius); box-shadow: var(--tba-shadow); }
.tba-topbar .tba-gt-list[hidden] { display: none; }
.tba-gt-list li { margin: 0; }
.tba-gt-list button { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; background: transparent; border: 0; border-radius: 6px; color: var(--tba-ink); font: 500 14px/1.3 var(--tba-font); text-align: left; cursor: pointer; }
.tba-gt-list button:hover, .tba-gt-list button:focus-visible { background: var(--tba-bg-soft); color: var(--tba-navy); }
.tba-gt-list li.is-active button { color: var(--tba-red); }
.tba-gt-list small { color: var(--tba-muted); font-size: 12px; font-weight: 400; }
.tba-gt-engine { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Hide Google's own banner / tooltips so the page doesn't jump */
body > .skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-tooltip, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.tba-lang select { font-size: 13px; padding: 3px 6px; border-radius: 4px; border: 0; }
.tba-lang ul { gap: 10px; }

/* ---------- Main bar ---------- */
#masthead.tba-masthead { background: #fff; padding: 0; margin: 0; border-bottom: 1px solid var(--tba-line); transition: box-shadow .25s; }
.tba-header-sticky .tba-masthead { position: sticky; top: 0; z-index: 998; }
.admin-bar.tba-header-sticky .tba-masthead { top: 32px; }
.tba-masthead.is-scrolled { box-shadow: 0 6px 20px rgba(29,15,82,.10); }
.tba-masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.tba-brand { flex: 0 0 auto; display: flex; align-items: center; }
.tba-brand .custom-logo-link { display: block; line-height: 0; }
.tba-brand .custom-logo { width: auto !important; height: 70px !important; max-width: 200px; object-fit: contain; transition: height .25s; }
.tba-masthead.is-scrolled .tba-brand .custom-logo { height: 58px !important; }
.tba-site-name { font-weight: 700; font-size: 20px; color: var(--tba-navy); text-decoration: none; }

/* Desktop navigation */
.tba-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.tba-nav-head, .tba-nav-foot, .tba-burger, .tba-overlay { display: none; }
.tba-menu, .tba-menu ul { list-style: none; margin: 0; padding: 0; }
.tba-menu { display: flex; align-items: center; flex-wrap: nowrap; gap: 2px; }
.tba-menu > li { position: relative; margin: 0; }
.tba-menu > li > a {
	display: flex; align-items: center; gap: 5px;
	padding: 30px 10px; font-size: 14.5px; font-weight: 500; color: var(--tba-ink);
	text-decoration: none; white-space: nowrap; position: relative; transition: color .2s;
}
.tba-menu > li > a::after {
	content: ""; position: absolute; left: 10px; right: 10px; bottom: 22px; height: 2px;
	background: var(--tba-red); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.tba-menu > li:hover > a, .tba-menu > li:focus-within > a,
.tba-menu > li.current-menu-item > a, .tba-menu > li.current-menu-ancestor > a, .tba-menu > li.current-menu-parent > a { color: var(--tba-navy); }
.tba-menu > li:hover > a::after, .tba-menu > li:focus-within > a::after,
.tba-menu > li.current-menu-item > a::after, .tba-menu > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.tba-menu > li.menu-item-has-children > a::before {
	content: ""; order: 2; width: 7px; height: 7px; margin-left: 2px; margin-top: -4px;
	border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); opacity: .7;
}

/* Dropdowns */
.tba-menu .sub-menu {
	position: absolute; top: calc(100% - 10px); left: 0; min-width: 280px; padding: 10px; text-align: left;
	background: #fff; border: 1px solid var(--tba-line); border-top: 3px solid var(--tba-red);
	border-radius: 0 0 var(--tba-radius) var(--tba-radius); box-shadow: var(--tba-shadow);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 1000;
}
.tba-menu > li:hover > .sub-menu, .tba-menu > li:focus-within > .sub-menu, .tba-menu > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tba-menu > li:nth-last-child(-n+3) > .sub-menu { left: auto; right: 0; }
.tba-menu .sub-menu li { margin: 0; }
.tba-menu .sub-menu a {
	display: block; padding: 10px 12px; font-size: 14px; color: var(--tba-ink); text-decoration: none;
	border-radius: 6px; line-height: 1.35; transition: background .15s, color .15s, padding .15s;
}
.tba-menu .sub-menu a:hover, .tba-menu .sub-menu a:focus-visible, .tba-menu .sub-menu .current-menu-item > a {
	background: var(--tba-bg-soft); color: var(--tba-navy); padding-left: 16px;
}

/* Contact CTA */
.tba-menu > li.tba-menu-cta { margin-left: 10px; }
.tba-menu > li.tba-menu-cta > a {
	background: var(--tba-red); color: #fff; padding: 11px 18px; border-radius: 6px; font-weight: 600;
	box-shadow: 0 4px 12px rgba(211,40,31,.25); transition: background .2s, transform .2s;
}
.tba-menu > li.tba-menu-cta > a::after { display: none; }
.tba-menu > li.tba-menu-cta:hover > a, .tba-menu > li.tba-menu-cta:focus-within > a, .tba-menu > li.tba-menu-cta.current-menu-item > a { background: var(--tba-red-dark); color: #fff; }
.tba-menu > li.tba-menu-cta > .sub-menu { top: calc(100% + 8px); border-radius: var(--tba-radius); }
.tba-menu > li.tba-menu-cta::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }

.tba-sub-toggle { display: none; }

/* Keyboard focus */
.tba-header-wrap a:focus-visible, .tba-header-wrap button:focus-visible { outline: 2px solid var(--tba-red); outline-offset: 2px; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1199px) {
	.tba-masthead-inner { min-height: 72px; }
	.tba-brand .custom-logo, .tba-masthead.is-scrolled .tba-brand .custom-logo { height: 52px !important; }

	.tba-burger {
		display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0;
		background: var(--tba-navy); border: 0; border-radius: 8px; cursor: pointer; flex: 0 0 auto;
	}
	.tba-burger:hover { background: var(--tba-navy-dark); }
	.tba-burger-box { display: flex; flex-direction: column; gap: 5px; width: 22px; }
	.tba-burger-box span { display: block; height: 2px; background: #fff; border-radius: 2px; }

	.tba-nav {
		position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); z-index: 100001; text-align: left;
		flex-direction: column; justify-content: flex-start; background: #fff; overflow-y: auto; overscroll-behavior: contain;
		transform: translateX(100%); transition: transform .3s ease; box-shadow: -10px 0 30px rgba(0,0,0,.15); visibility: hidden;
	}
	.tba-nav.is-open { transform: none; visibility: visible; }
	.tba-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--tba-navy); color: #fff; position: sticky; top: 0; z-index: 2; }
	.tba-nav-title { font-weight: 600; font-size: 16px; letter-spacing: .3px; }
	.tba-nav-close { background: transparent; border: 0; color: #fff; font-size: 30px; line-height: 1; padding: 0 4px; cursor: pointer; }

	.tba-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
	.tba-menu > li { border-bottom: 1px solid var(--tba-line); display: flex; flex-wrap: wrap; align-items: center; }
	.tba-menu > li > a { flex: 1 1 auto; padding: 15px 18px; font-size: 15.5px; }
	.tba-menu > li > a::after, .tba-menu > li.menu-item-has-children > a::before { display: none; }
	.tba-sub-toggle {
		display: inline-flex; align-items: center; justify-content: center; width: 52px; align-self: stretch;
		background: transparent; border: 0; border-left: 1px solid var(--tba-line); cursor: pointer; color: var(--tba-navy);
	}
	.tba-sub-toggle::before, .tba-sub-toggle::after { display: none !important; content: none !important; }
	.tba-sub-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; transition: transform .2s; }
	.tba-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.tba-sub-toggle { padding: 0; margin: 0; min-height: 52px; box-shadow: none; text-transform: none; font-size: 0; line-height: 0; border-radius: 0; }
	.tba-sub-toggle:hover, .tba-sub-toggle:focus { background: var(--tba-bg-soft); color: var(--tba-navy); }
	.tba-menu a, .tba-menu .sub-menu a { text-align: left; justify-content: flex-start; }
	.tba-menu .sub-menu, .tba-menu > li.tba-menu-cta > .sub-menu {
		position: static; flex: 0 0 100%; min-width: 0; padding: 0 0 8px; margin: 0; border: 0; border-radius: 0;
		box-shadow: none; background: var(--tba-bg-soft); opacity: 1; visibility: visible; transform: none; display: none;
	}
	.tba-menu > li:hover > .sub-menu, .tba-menu > li:focus-within > .sub-menu { display: none; }
	.tba-menu > li.is-open > .sub-menu { display: block; }
	.tba-menu .sub-menu a { padding: 12px 18px 12px 32px; border-radius: 0; font-size: 15px; }
	.tba-menu .sub-menu a:hover, .tba-menu .sub-menu .current-menu-item > a { padding-left: 32px; }
	.tba-menu .sub-menu .current-menu-item > a { color: var(--tba-red); font-weight: 500; }

	.tba-menu > li.tba-menu-cta { margin: 14px 18px 0; border: 0; }
	.tba-menu > li.tba-menu-cta > a { justify-content: center; padding: 14px 18px; }
	.tba-menu > li.tba-menu-cta > .tba-sub-toggle, .tba-menu > li.tba-menu-cta > .tba-sub-toggle:hover { border-left-color: rgba(255,255,255,.3); background: var(--tba-red-dark); color: #fff; border-radius: 0 6px 6px 0; min-height: 48px; }
	.tba-menu > li.tba-menu-cta > a { justify-content: center !important; }
	.tba-menu > li.tba-menu-cta > a { border-radius: 6px 0 0 6px; }
	.tba-menu > li.tba-menu-cta::after { display: none; }

	.tba-nav-foot { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 28px; margin-top: auto; }
	.tba-nav-foot a { display: flex; align-items: center; gap: 10px; color: var(--tba-navy); text-decoration: none; font-size: 15px; word-break: break-all; }

	.tba-overlay { display: block; position: fixed; inset: 0; background: rgba(16,10,45,.5); z-index: 99999; opacity: 0; transition: opacity .3s; }
	.tba-overlay.is-visible { opacity: 1; }
	.tba-overlay[hidden] { display: none; }
	body.tba-nav-locked { overflow: hidden; }
}

@media (max-width: 1199px) {
	.admin-bar .tba-nav { top: 32px; }
}
@media (max-width: 782px) {
	.admin-bar.tba-header-sticky .tba-masthead { top: 46px; }
	.admin-bar .tba-nav { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar.tba-header-sticky .tba-masthead { top: 0; }
	.tba-hide-sm { display: none !important; }
	.tba-container { padding: 0 14px; }
	.tba-topbar { font-size: 13px; }
	.tba-topbar-inner { min-height: 38px; }
	.tba-masthead-inner { min-height: 66px; }
	.tba-brand .custom-logo, .tba-masthead.is-scrolled .tba-brand .custom-logo { height: 46px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.tba-header-wrap *, .tba-nav { transition: none !important; }
}
