/* =============================================
   Header - Autotech Child
   ============================================= */

.site-header {
	position: relative;
	z-index: 1000;
	font-family: "Be Vietnam Pro", sans-serif;
}

.section-header .container {
	max-width: 1250px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* ---------- Topbar ---------- */
.section-topbar {
	background: var(--at-accent);
	color: #fff;
	font-size: 15px;
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 54px;
}

.topbar-left .widget-childs,
.topbar-contact .widget-childs,
.topbar-right .widget-childs {
	display: flex;
	align-items: center;
	gap: 28px;
}

.topbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	line-height: 1.2;
	background-color: transparent!important;
}

.topbar-btn:hover {
	opacity: 0.92;
}

.topbar-btn .icon {
	font-size: 16px;
}

.widget-socials ul {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget-socials a {
	color: #fff;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
}

.widget-socials a:hover {
	opacity: 0.9;
}

.widget-flag-language {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.widget-flag-language a {
	display: inline-flex;
	line-height: 1;
}

.widget-flag-language a.is-active {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.widget-flag-language img {
	display: block;
	width: 34px;
	height: 22px;
	object-fit: cover;
	border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ---------- Main header ---------- */
.section-main-header {
	background: #fff;
	border-bottom: 1px solid #efefef;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 100px;
}

.header-logo-nav > .widget-childs {
	display: flex;
	align-items: center;
	gap: 34px;
}

.header-logo .custom-logo {
	max-height: 64px;
	width: auto;
	height: auto;
	display: block;
	padding-block: 20px;
}

.site-name {
	font-size: 30px;
	font-weight: 700;
	color: var(--at-accent);
}

.header-nav-wrap .widget-childs {
	display: flex;
	align-items: center;
	gap: 22px;
}

#primary-nav .nav-horizontal,
#primary-nav .menu {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

#primary-nav .menu-item {
	position: relative;
}

#primary-nav .menu-item > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 10px 12px;
	font-size: 18px;
	font-size: clamp(16px, 1vw, 18px);
	line-height: 1;
	font-weight: 700;
	color: #0f172a;
	text-decoration: none;
	transition: color 0.2s ease;
	white-space: nowrap;
}

#primary-nav .menu-item-hot-badge {
	display: inline-block;
	width: auto;
	height: 28px;
	flex: 0 0 auto;
	vertical-align: middle;
	margin-left: 2px;
}

#primary-nav .menu-item > a:hover,
#primary-nav .current-menu-item > a,
#primary-nav .current-menu-ancestor > a {
	color: var(--at-accent);
}

#primary-nav .icon-show,
#primary-nav .icon-close {
	font-size: 13px;
	opacity: 0.8;
}

#primary-nav .sub-menu {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	min-width: 240px;
	background: #fff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 16px 34px rgba(2, 6, 23, 0.14);
	margin: 0;
	padding: 10px 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all 0.2s ease;
	z-index: 999;
}

#primary-nav .menu-item:hover > .sub-menu,
#primary-nav .menu-item.sub-open > .sub-menu,
#primary-nav .sub-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#primary-nav .sub-menu a {
	display: block;
	padding: 8px 14px;
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	text-decoration: none;
}

#primary-nav .sub-menu a:hover {
	background: #f8fafc;
	color: var(--at-accent);
}

.header-lang-mobile {
	display: none;
}

.header-actions .widget-childs {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-search-group {
	position: relative;
}

.header-search-group > .widget-childs {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-search-toggle {
	width: 50px;
	height: 50px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #d1d5db;
	border-radius: 999px;
	background: #fff;
	color: #111827;
	cursor: pointer;
}

.header-search-toggle:hover {
	border-color: var(--at-accent);
	color: var(--at-accent);
}

#header-search-form {
	position: absolute;
	top: calc(100% + 14px);
	right: 0;
	width: min(460px, 82vw);
	background: #fff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 16px 34px rgba(2, 6, 23, 0.14);
	padding: 10px;
	display: none;
}

#header-search-form.is-open {
	display: block;
}

#header-search-form .widget-childs {
	display: flex;
	align-items: center;
	gap: 10px;
}

#header-search-form .widget-form-control {
	flex: 1;
}

#header-search-form input[type="search"] {
	width: 100%;
	height: 44px;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	font-size: 15px;
}

.search-submit {
	height: 44px;
	padding: 0 16px;
	border: none;
	background: var(--at-button-bg);
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}

.cta-button {
	height: 50px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 26px;
	background: var(--at-button-bg);
	color: #fff;
	font-weight: 700;
	font-size: 19px;
	font-size: clamp(16px, 0.95vw, 20px);
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: 0.2px;
}

.cta-button:hover {
	background: var(--at-button-bg-hover);
	color: #fff;
}

.header-consult-toggle {
	/* display: inline-flex; */
	display: none;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
	box-shadow: 0 10px 24px rgba(202, 31, 39, 0.18);
}

.header-consult-toggle:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(202, 31, 39, 0.24);
}

.header-consult-toggle:active {
	transform: translateY(0) scale(0.985);
}

/* ---------- Consult popup ---------- */
.consult-modal {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.consult-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.consult-modal.is-closing {
	opacity: 0;
	visibility: visible;
	pointer-events: none;
}

.consult-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.38);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.consult-modal.is-open .consult-modal__backdrop {
	opacity: 1;
}

.consult-modal.is-closing .consult-modal__backdrop {
	opacity: 0;
}

.consult-modal__dialog {
	position: relative;
	max-width: 980px;
	width: min(980px, 100%);
	max-height: min(760px, calc(100vh - 40px));
	overflow: auto;
	margin: 0;
	background: #fff;
	padding: 28px 40px 34px;
	box-shadow: 0 18px 36px rgba(2, 6, 23, 0.2);
	box-sizing: border-box;
	opacity: 0;
	transform: translateY(26px) scale(0.965);
	transform-origin: center center;
	transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.consult-modal.is-open .consult-modal__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.consult-modal.is-closing .consult-modal__dialog {
	opacity: 0;
	transform: translateY(18px) scale(0.975);
}

.consult-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 50%;
	background: #3b3f4b;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, background 0.2s ease;
}

.consult-modal__close:hover {
	background: #262a33;
	transform: rotate(90deg);
}

.consult-modal__title {
	margin: 2px 0 24px;
	text-align: center;
	color: var(--at-accent);
	font-size: clamp(24px, 2.4vw, 34px);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.consult-form {
	width: 100%;
}

.consult-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 18px;
	width: 100%;
}

.consult-field {
	position: relative;
	display: block;
	min-width: 0;
}

.consult-field--full {
	grid-column: 1 / -1;
}

.consult-field__required {
	position: absolute;
	left: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #ff0000;
	font-size: 24px;
	line-height: 1;
	pointer-events: none;
}

.consult-field input,
.consult-field textarea {
	width: 100%;
	border: 1px solid #dfe3e8;
	background: #fff;
	font-size: 16px;
	color: #374151;
	padding: 12px 14px 12px 32px;
	outline: none;
	font-family: "Be Vietnam Pro", sans-serif;
	font-weight: 500;
	box-sizing: border-box;
}

.consult-field textarea {
	resize: vertical;
	min-height: 170px;
	padding-top: 12px;
	line-height: 1.5;
}

.consult-field input::placeholder,
.consult-field textarea::placeholder {
	color: #b2b2b2;
	opacity: 1;
}

.consult-field input:focus,
.consult-field textarea:focus {
	border-color: var(--at-accent);
	box-shadow: 0 0 0 2px rgba(6, 43, 95, 0.12);
}

.consult-captcha-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	width: 100%;
}

.consult-captcha-wrap input {
	grid-column: 1;
}

.consult-captcha-code {
	height: 52px;
	min-width: 174px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	border: 1px solid #dfe3e8;
	background: #fff;
	color: #374151;
	box-sizing: border-box;
}

#consult-captcha-value {
	font-size: 28px;
	line-height: 1;
	letter-spacing: 2px;
	font-family: "Courier New", monospace;
	font-weight: 700;
	transform: skewX(-8deg);
	user-select: none;
	color: #444b56;
}

.consult-captcha-refresh {
	width: 34px;
	height: 34px;
	border: none;
	background: transparent;
	font-size: 24px;
	color: #2c3b52;
	cursor: pointer;
	padding: 0;
}

.consult-submit-btn {
	margin-top: 18px;
	width: 100%;
	height: 58px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: none;
	background: var(--at-button-bg);
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
	box-sizing: border-box;
}

.consult-submit-btn i {
	font-size: 18px;
}

.consult-submit-btn span {
	font-size: 24px;
	line-height: 1;
}

.consult-submit-btn:hover {
	background: var(--at-button-bg-hover);
}

.consult-submit-btn i,
.consult-submit-btn span {
	transition: transform 0.2s ease;
}

.consult-submit-btn:hover i {
	transform: translateX(2px) rotate(-8deg);
}

.consult-submit-btn:hover span {
	transform: translateX(2px);
}

body.consult-modal-open {
	overflow: hidden;
}

.mobile-menu-toggle,
.mobile-close {
	display: none;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	border: 1px solid #d1d5db;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
}

.mobile-nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(2, 6, 23, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s ease;
	z-index: 999;
}

.mobile-nav-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.site-header.is-sticky .section-main-header {
	position: sticky;
	top: 0;
	z-index: 1001;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

/* ---------- Responsive ---------- */
@media (max-width: 1440px) {
	#primary-nav .menu-item > a {
		padding: 9px 12px;
		font-size: clamp(16px, 0.98vw, 18px);
	}

	.cta-button {
		padding: 0 20px;
	}
}

@media (max-width: 1200px) {
	.section-header .container {
		padding-left: 18px;
		padding-right: 18px;
	}

	.topbar-btn .content {
		display: none;
	}

	.header-inner {
		min-height: 96px;
	}

	.header-logo .custom-logo {
		max-height: 52px;
	}

	#primary-nav .menu-item > a {
		font-size: 15px;
		padding: 8px 10px;
	}

	.cta-button {
		height: 44px;
		font-size: 15px;
	}

	.consult-modal__dialog {
		padding: 24px 24px 28px;
	}

	.consult-field input,
	.consult-field textarea {
		font-size: 16px;
	}

	#consult-captcha-value {
		font-size: 24px;
	}

	.consult-submit-btn,
	.consult-submit-btn span {
		font-size: 22px;
	}

	.header-consult-toggle {
		height: 44px;
		padding: 0 18px;
		font-size: 15px;
	}
}

@media (max-width: 991px) {
	.section-topbar {
		display: none;
	}

	.header-inner {
		min-height: 82px;
	}

	.header-logo-nav {
		flex: 1;
	}

	.header-logo-nav > .widget-childs {
		justify-content: space-between;
		width: 100%;
	}

	.header-nav-wrap {
		position: fixed;
		top: 0;
		right: 0;
		width: min(420px, 86vw);
		height: 100vh;
		background: #fff;
		border-left: 1px solid #e5e7eb;
		z-index: 1000;
		transform: translateX(100%);
		transition: transform 0.25s ease;
		overflow-y: auto;
		padding: 20px;
	}

	.header-nav-wrap.is-open {
		transform: translateX(0);
	}

	.header-nav-wrap .widget-childs {
		display: block;
	}

	.mobile-close {
		display: inline-flex;
		margin-left: auto;
		margin-bottom: 16px;
	}

	#primary-nav .nav-horizontal,
	#primary-nav .menu {
		display: block;
	}

	#primary-nav .menu-item {
		border-bottom: 1px solid #f3f4f6;
	}

	#primary-nav .menu-item > a {
		display: flex;
		justify-content: space-between;
		padding: 14px 2px;
		font-size: 18px;
	}

	#primary-nav .sub-menu {
		position: static;
		transform: none;
		opacity: 1;
		visibility: visible;
		box-shadow: none;
		border: none;
		padding: 0 0 10px;
		display: none;
	}

	#primary-nav .sub-menu.is-open,
	#primary-nav .menu-item.sub-open > .sub-menu {
		display: block;
	}

	#primary-nav .sub-menu a {
		padding: 8px 14px;
		font-size: 15px;
	}

	.header-lang-mobile {
		display: flex;
		margin-top: 20px;
	}

	.header-actions {
		flex-shrink: 0;
	}

	.header-actions .widget-childs {
		gap: 8px;
	}

	#header-search-form {
		right: 0;
		left: auto;
	}

	.cta-button {
		display: none;
	}

	.header-consult-toggle {
		display: inline-flex;
		height: 42px;
		padding: 0 14px;
		font-size: 14px;
	}

	.consult-modal__dialog {
		width: min(940px, 100%);
		max-height: calc(100vh - 16px);
		padding: 28px 16px 24px;
	}

	.consult-form__grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.consult-captcha-wrap {
		grid-template-columns: 1fr;
	}

	.consult-captcha-code {
		justify-content: center;
	}

	.consult-submit-btn {
		height: 56px;
	}

	.consult-submit-btn i {
		font-size: 20px;
	}

	.consult-submit-btn,
	.consult-submit-btn span {
		font-size: 24px;
	}

	.mobile-menu-toggle {
		display: inline-flex;
	}

	body.nav-is-open {
		overflow: hidden;
	}
}

@media (max-width: 640px) {
	.section-header .container {
		padding-left: 14px;
		padding-right: 14px;
	}

	.header-logo .custom-logo {
		max-height: 46px;
	}

	.header-search-toggle {
		width: 44px;
		height: 44px;
	}

	.header-consult-toggle {
		display: none;
		height: 40px;
		padding: 0 12px;
		font-size: 13px;
	}

	#header-search-form {
		position: fixed;
		top: 82px;
		right: 10px;
		left: 10px;
		width: auto;
	}

	#header-search-form .search-submit .content {
		display: none;
	}

	#header-search-form .search-submit {
		width: 44px;
		padding: 0;
	}
}
