/**
 * OTR header / navigation — parity with optimataxrelief.com SiteHeader
 */

.otr-header {
	position: sticky;
	top: 0;
	z-index: 99999;
	background: #fff;
	font-family: var(--otr-font);
}

.otr-header__chrome {
	position: relative;
	z-index: 50;
	background: #fff;
}

.otr-header__inner {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

/* Utility phone bar */
.otr-header__utility {
	background: var(--otr-utility);
	color: #fff;
}

.otr-header__utility-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: 0.625rem;
	padding-bottom: 0.625rem;
}

.otr-header__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	transition: color 0.15s ease;
}

.otr-header__phone:hover,
.otr-header__phone:focus-visible {
	color: var(--otr-green);
}

.otr-header__phone-icon {
	flex-shrink: 0;
}

/* Main bar */
.otr-header__main {
	border-bottom: 1px solid var(--otr-border);
	background: #fff;
}

.otr-header__main-inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
}

@media (min-width: 1024px) {
	.otr-header__main-inner {
		padding-top: 1rem;
		padding-bottom: 1rem;
	}
}

.otr-header__logo {
	position: relative;
	z-index: 10;
	flex-shrink: 0;
	line-height: 0;
	text-decoration: none;
}

.otr-header__logo img {
	display: block;
	height: 3.5rem; /* 56px */
	width: auto;
}

@media (min-width: 768px) {
	.otr-header__logo img {
		height: 72px;
	}
}

/* Desktop primary nav — centered */
.otr-header__nav {
	display: none;
	position: absolute;
	inset-block: 0;
	left: 50%;
	transform: translateX(-50%);
	align-items: center;
	gap: 0.125rem;
}

@media (min-width: 1024px) {
	.otr-header__nav {
		display: flex;
	}
}

.otr-header__nav-item {
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
}

.otr-header__nav-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--otr-nav-text);
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s ease;
}

.otr-header__nav-trigger:hover,
.otr-header__nav-trigger:focus-visible,
.otr-header__nav-item.is-open > .otr-header__nav-trigger {
	color: var(--otr-blue);
}

/* Dropdown panels */
.otr-header__dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 60;
	transform: translateX(-50%);
}

.otr-header__dropdown[hidden] {
	display: none !important;
}

.otr-header__caret {
	pointer-events: none;
	position: absolute;
	left: 50%;
	top: 0;
	z-index: 1;
	width: 0;
	height: 0;
	transform: translate(-50%, -100%);
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 9px solid var(--otr-blue-bright);
}

.otr-header__dropdown-panel {
	position: relative;
	overflow: hidden;
	border-radius: 0 0 0.5rem 0.5rem;
	border-top: 3px solid var(--otr-blue-bright);
	background: #fff;
	box-shadow: 0 12px 40px rgba(16, 42, 84, 0.14);
}

.otr-header__dropdown-list {
	min-width: 260px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.otr-header__dropdown-list li {
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

.otr-header__dropdown-link {
	display: block;
	width: 100%;
	padding: 1rem 1.5rem;
	text-align: left;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--otr-nav-text);
	text-decoration: none;
	border-bottom: 1px solid #f1f3f4;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.otr-header__dropdown-link:hover,
.otr-header__dropdown-link:focus-visible {
	background-color: var(--otr-dropdown-hover);
	border-bottom-color: var(--otr-dropdown-hover);
	color: #fff;
}

.otr-header__dropdown-link.is-last {
	border-bottom: none;
}

/* Services mega menu */
.otr-header__mega {
	display: flex;
	width: 700px;
}

.otr-header__mega-card {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
	min-height: 280px;
	padding: 1.75rem 1.25rem;
	text-align: center;
	text-decoration: none;
	color: inherit;
	border-right: 1px solid #eef0f2;
	box-sizing: border-box;
	transition: background-color 0.15s ease;
}

.otr-header__mega-card:last-child {
	border-right: 0;
}

.otr-header__mega-card:hover,
.otr-header__mega-card:focus-visible {
	background: #f8f9fa;
}

.otr-header__mega-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	margin: 0 auto 0.75rem;
}

.otr-header__mega-icon img {
	width: 41px;
	height: 41px;
	object-fit: contain;
}

.otr-header__mega-title {
	margin: 0 0 0.625rem;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--otr-nav-text);
}

.otr-header__mega-desc {
	margin: 0 0 1.25rem;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.375;
	color: #5f6368;
}

.otr-header__mega-cta {
	display: inline-block;
	width: 190px;
	margin: 0 auto;
	padding: 0.75rem 1.5rem;
	border: 2px solid var(--otr-blue-bright);
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	color: var(--otr-blue-bright);
	box-sizing: border-box;
	transition: all 0.2s ease;
}

.otr-header__mega-card:hover .otr-header__mega-cta,
.otr-header__mega-card:focus-visible .otr-header__mega-cta {
	background: var(--otr-blue-bright);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

/* Header actions */
.otr-header__actions {
	position: relative;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.otr-header__actions {
		gap: 1rem;
	}
}

.otr-header__btn-desktop {
	display: none;
}

@media (min-width: 640px) {
	.otr-header__btn-desktop {
		display: inline-flex;
	}
}

.otr-header__menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: var(--otr-blue);
	cursor: pointer;
}

.otr-header__icon-menu,
.otr-header__icon-close {
	display: block;
	flex-shrink: 0;
}

.otr-header__icon-close,
.otr-header__icon-close[hidden] {
	display: none !important;
}

@media (min-width: 1024px) {
	.otr-header__menu-toggle {
		display: none;
	}
}

.otr-header.is-mobile-open .otr-header__icon-menu {
	display: none !important;
}

.otr-header.is-mobile-open .otr-header__icon-close,
.otr-header.is-mobile-open .otr-header__icon-close[hidden] {
	display: block !important;
}

/* Mobile overlay */
.otr-header__mobile {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 40;
	overflow-y: auto;
	background: #fff;
}

.otr-header__mobile[hidden] {
	display: none !important;
}

@media (min-width: 1024px) {
	.otr-header__mobile {
		display: none !important;
	}
}

.otr-header__mobile-nav {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding-top: 0.5rem;
	padding-bottom: 2.5rem;
}

.otr-header__mobile-sections {
	border-bottom: 1px solid var(--otr-border);
}

.otr-header__accordion {
	border-bottom: 1px solid var(--otr-border);
}

.otr-header__accordion:last-of-type {
	border-bottom: 0;
}

.otr-header__accordion-trigger {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-align: left;
	color: var(--otr-nav-text);
	cursor: pointer;
}

.otr-header__chevron {
	color: var(--otr-text-muted);
	transition: transform 0.2s ease;
}

.otr-header__accordion.is-open .otr-header__chevron {
	transform: rotate(180deg);
}

.otr-header__accordion-panel[hidden] {
	display: none !important;
}

.otr-header__mobile-cards {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0 1.25rem 1rem;
}

.otr-header__mobile-card {
	display: block;
	padding: 1rem;
	border: 1px solid var(--otr-border);
	border-radius: 0.5rem;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease;
}

.otr-header__mobile-card:hover,
.otr-header__mobile-card:focus-visible {
	background: var(--otr-bg-soft);
}

.otr-header__mobile-card-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--otr-navy);
}

.otr-header__mobile-card-desc {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: var(--otr-text-muted);
}

.otr-header__mobile-list {
	margin: 0;
	padding: 0 1.25rem 0.75rem;
	list-style: none;
}

.otr-header__mobile-list li {
	margin: 0;
}

.otr-header__mobile-list a {
	display: block;
	padding: 0.625rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	color: var(--otr-text-muted);
	text-decoration: none;
}

.otr-header__mobile-list a:hover,
.otr-header__mobile-list a:focus-visible {
	background: var(--otr-bg-soft);
	color: var(--otr-blue);
}

.otr-header__mobile-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-top: 1px solid var(--otr-border);
	font-size: 1rem;
	font-weight: 600;
	color: var(--otr-nav-text);
	text-decoration: none;
}

.otr-header__mobile-actions {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 2rem;
	padding: 0 1.25rem;
}

@media (max-width: 639px) {
	.otr-header__mobile-actions {
		display: flex;
	}
}

.otr-header__btn-mobile {
	width: 100%;
	height: 3rem;
	font-size: 1rem;
}
