/* QTA mobile accordion drawer
-------------------------------------------------------------- */

/* Hamburger — mobile only */
.qta-mobile-menu-toggle {
	display: none;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	width: 2.5em;
	height: 2.5em;
	cursor: pointer;
	color: #333;
	line-height: 1;
	z-index: 320;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.qta-mobile-menu-toggle:hover {
	background-color: #555;
	color: #fff;
}

.qta-mobile-menu-toggle:focus {
	outline: 2px solid #c30;
	outline-offset: 2px;
}

.qta-mobile-menu-toggle__bars,
.qta-mobile-menu-toggle__bars::before,
.qta-mobile-menu-toggle__bars::after {
	display: block;
	width: 1.35em;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.qta-mobile-menu-toggle__bars {
	position: relative;
}

.qta-mobile-menu-toggle__bars::before,
.qta-mobile-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.qta-mobile-menu-toggle__bars::before {
	top: -6px;
}

.qta-mobile-menu-toggle__bars::after {
	top: 6px;
}

/* Drawer shell — hidden until opened on mobile */
.qta-mobile-menu {
	display: none;
}

body.qta-mobile-menu-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	/* Hide parent select-based mobile nav entirely */
	.main-navigation {
		display: none !important;
	}

	.qta-mobile-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 50%;
		right: 0.75em;
		transform: translateY(-50%);
	}

	.site-header > .row {
		position: relative;
	}

	.qta-mobile-menu {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 10000;
		pointer-events: none;
		visibility: hidden;
	}

	.qta-mobile-menu.is-open {
		pointer-events: auto;
		visibility: visible;
	}

	.qta-mobile-menu__backdrop {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, 0.35);
		opacity: 0;
		transition: opacity 0.2s ease;
	}

	.qta-mobile-menu.is-open .qta-mobile-menu__backdrop {
		opacity: 1;
	}

	.qta-mobile-menu__panel {
		position: absolute;
		inset: 0;
		display: flex;
		flex-direction: column;
		background: #fff;
		transform: translateX(100%);
		transition: transform 0.25s ease;
		overflow: hidden;
	}

	.qta-mobile-menu.is-open .qta-mobile-menu__panel {
		transform: translateX(0);
	}

	/* Clear the WP admin bar when logged in (46px below 783px) */
	body.admin-bar .qta-mobile-menu {
		top: 46px;
	}

	.qta-mobile-menu__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1em;
		padding: 1em 1.25em;
		border-bottom: 1px solid #eee;
		flex-shrink: 0;
	}

	.qta-mobile-menu__logo {
		font-size: 1.15em;
		font-weight: bold;
		line-height: 1.2;
		min-width: 0;
	}

	.qta-mobile-menu__logo a {
		color: #111;
		text-decoration: none;
	}

	.qta-mobile-menu__logo img {
		max-height: 2em;
		width: auto;
		vertical-align: middle;
	}

	.qta-mobile-menu__close {
		appearance: none;
		-webkit-appearance: none;
		background: transparent;
		border: 0;
		padding: 0.25em 0.4em;
		font-size: 1.75em;
		line-height: 1;
		color: #333;
		cursor: pointer;
		border-radius: 4px;
		transition: background-color 0.2s ease, color 0.2s ease;
	}

	.qta-mobile-menu__close:hover {
		background-color: #555;
		color: #fff;
	}

	.qta-mobile-menu__close:focus {
		outline: 2px solid #c30;
		outline-offset: 2px;
	}

	.qta-mobile-menu__body {
		flex: 1 1 auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 0.5em 1.25em 1em;
		min-height: 0;
	}

	/* Top-level accordion list */
	.qta-mobile-nav {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.qta-mobile-nav > li {
		display: block;
		margin: 0;
		padding: 0;
		max-height: none;
		border-bottom: 1px solid #eee;
		text-align: left;
		position: static;
		font-size: 1.05em;
	}

	.qta-mobile-nav > li > a,
	.qta-mobile-toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: calc(100% + 1.5em);
		margin-left: -0.75em;
		margin-right: -0.75em;
		padding: 1.1em 0.75em;
		color: #111;
		font-weight: bold;
		font-family: inherit;
		font-size: inherit;
		line-height: 1.3;
		text-align: left;
		text-decoration: none;
		background: transparent;
		border: 0;
		border-radius: 4px;
		cursor: pointer;
		box-sizing: border-box;
		transition: background-color 0.2s ease, color 0.2s ease;
	}

	.qta-mobile-nav > li > a:hover,
	.qta-mobile-toggle:hover {
		background-color: #555;
		color: #fff;
	}

	.qta-mobile-nav > li > a:hover .qta-mobile-toggle__chevron,
	.qta-mobile-toggle:hover .qta-mobile-toggle__chevron {
		border-color: #fff;
	}

	.qta-mobile-nav > li.current-menu-item > a,
	.qta-mobile-nav > li.current-menu-ancestor > .qta-mobile-toggle {
		color: #c30;
	}

	.qta-mobile-nav > li.current-menu-item > a:hover,
	.qta-mobile-nav > li.current-menu-ancestor > .qta-mobile-toggle:hover {
		color: #fff;
	}

	.qta-mobile-toggle__chevron {
		flex-shrink: 0;
		width: 0.55em;
		height: 0.55em;
		margin-left: 0.75em;
		border-right: 2px solid #666;
		border-bottom: 2px solid #666;
		transform: rotate(45deg);
		transition: transform 0.2s ease, border-color 0.2s ease;
	}

	.qta-mobile-nav > li.is-open > .qta-mobile-toggle .qta-mobile-toggle__chevron {
		transform: rotate(-135deg);
		margin-top: 0.25em;
	}

	/* Expanded submenu panel — match parent toggle width */
	.qta-mobile-submenu {
		display: none !important;
		list-style: none;
		margin: 0 -0.75em 1em;
		padding: 0.35em 1em 0.5em;
		background: #f5f5f5;
		border-radius: 10px;
		position: static !important;
		width: calc(100% + 1.5em) !important;
		box-sizing: border-box;
		left: auto !important;
		top: auto !important;
		border: 0 !important;
		box-shadow: none !important;
	}

	.qta-mobile-submenu::after {
		display: none !important;
	}

	.qta-mobile-nav > li.is-open > .qta-mobile-submenu {
		display: block !important;
	}

	.qta-mobile-submenu > li {
		display: block;
		margin: 0;
		padding: 0;
		max-height: none;
		border-bottom: 1px solid #e8e8e8;
		background: transparent;
		text-align: left;
	}

	.qta-mobile-submenu > li:last-child {
		border-bottom: 0;
	}

	.qta-mobile-submenu > li > a {
		display: block;
		padding: 0.85em 0.15em;
		color: #333;
		font-weight: normal;
		font-size: 0.95em;
		text-decoration: none;
	}

	.qta-mobile-submenu > li > a:hover,
	.qta-mobile-submenu > li.current-menu-item > a {
		color: #000;
	}

	.qta-mobile-submenu > li.current-menu-item > a {
		color: #c30;
	}

	/* Footer: lang + CTA — pinned below scrollable nav */
	.qta-mobile-menu__footer {
		flex-shrink: 0;
		padding: 1em 1.25em 1.5em;
		border-top: 1px solid #eee;
		background: #fff;
	}

	.qta-mobile-lang {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 1.25em;
		margin-bottom: 1em;
		font-size: 1em;
	}

	.qta-mobile-lang__item .qta-lang-label {
		display: inline-block;
		padding: 0.35em 0.5em;
		letter-spacing: 0.02em;
		color: #333;
		text-decoration: none;
	}

	.qta-mobile-lang__item.is-current .qta-lang-label {
		color: #c30;
		border-bottom: 1px dotted #ccc;
	}

	.qta-mobile-lang__item > a.qta-lang-label:hover {
		color: #000;
		border-bottom: 1px dotted #ccc;
	}

	.qta-mobile-cta {
		display: block;
		width: 100%;
		box-sizing: border-box;
		padding: 0.95em 1.25em;
		background: #1a2744;
		color: #fff !important;
		font-weight: bold;
		font-size: 0.95em;
		letter-spacing: 0.06em;
		text-align: center;
		text-decoration: none !important;
		border-radius: 4px;
		border: 0;
	}

	.qta-mobile-cta:hover,
	.qta-mobile-cta:focus {
		background: #111c33;
		color: #fff !important;
	}
}

@media (min-width: 768px) {
	.qta-mobile-menu-toggle,
	.qta-mobile-menu {
		display: none !important;
	}
}
