/* ==========================================================================
   Hermosillo Header Widget — Styles
   Figma Fidelity: 1200px canonical content grid, strictly respects parent Elementor container
   ========================================================================== */

/* Overlay Theme Builder Header on top of the hero (frontend only) */
body:not(.elementor-editor-active) header.elementor-location-header {
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 999;
}

/* Ensure widget wrapper respects and fills the parent Elementor container */
.elementor-element-hheader_wgt_01,
.elementor-widget.elementor-widget-hermosillo_header,
.elementor-widget.elementor-widget-hermosillo_header > .elementor-widget-container {
	flex: 1 1 100% !important;
	max-width: 100% !important;
	width: 100% !important;
}

/* Header Widget Root — Respects parent container */
.hermosillo-header-widget {
	background-color: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 100%;
	padding: 40px 0 0;
	position: relative;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
	width: 100%;
}

/* Sticky / Scrolled State */
.hermosillo-header-widget.is-sticky.is-scrolled {
	background-color: rgba(17, 26, 36, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
	left: 0;
	padding: 0;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 9999;
}

/* Inner Container — 1200px canonical width perfectly matching other sections */
.hermosillo-header-widget .hheader-inner {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	height: 64px;
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1200px;
	padding: 0;
	transition: height 0.3s ease;
	width: 100%;
}

.hermosillo-header-widget.is-scrolled .hheader-inner {
	height: 72px;
}

/* Logo */
.hermosillo-header-widget .hheader-logo {
	align-items: center;
	display: inline-flex;
	flex-shrink: 0;
	text-decoration: none;
}

.hermosillo-header-widget .hheader-logo img,
.hermosillo-header-widget .hheader-logo svg {
	display: block;
	height: 36px;
	max-width: 224px;
	transition: height 0.3s ease;
	width: auto;
}

.hermosillo-header-widget.is-scrolled .hheader-logo img,
.hermosillo-header-widget.is-scrolled .hheader-logo svg {
	height: 32px;
}

/* Desktop Navigation */
.hermosillo-header-widget .hheader-nav {
	align-items: center;
	display: flex;
	margin-left: auto;
}

.hermosillo-header-widget .hheader-nav-list {
	align-items: center;
	display: flex;
	gap: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hermosillo-header-widget .hheader-nav-item {
	display: inline-flex;
	margin: 0;
	padding: 0;
}

.hermosillo-header-widget .hheader-link {
	color: #ffffff !important;
	display: inline-block;
	font-family: 'Flama Condensed', 'FlamaCond', 'Roboto Condensed', sans-serif;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 22px;
	padding: 6px 0;
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.hermosillo-header-widget .hheader-link::after {
	background-color: #e65a28;
	bottom: -1px;
	content: '';
	height: 2px;
	left: 0;
	position: absolute;
	transition: width 0.25s ease;
	width: 0;
}

.hermosillo-header-widget .hheader-link:hover,
.hermosillo-header-widget .hheader-link.is-active {
	color: #e65a28 !important;
}

.hermosillo-header-widget .hheader-link:hover::after,
.hermosillo-header-widget .hheader-link.is-active::after {
	width: 100%;
}

/* Header Actions / CTA Button */
.hermosillo-header-widget .hheader-actions {
	align-items: center;
	display: flex;
}

.hermosillo-header-widget .hheader-btn {
	align-items: center;
	background-color: #e65a28;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
	color: #ffffff !important;
	display: inline-flex;
	font-family: 'Flama Condensed', 'FlamaCond', 'Roboto Condensed', sans-serif;
	font-size: 18px;
	font-weight: 600;
	justify-content: center;
	letter-spacing: 0.04em;
	line-height: 1;
	margin-left: 28px;
	min-height: 42px;
	padding: 10px 24px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.hermosillo-header-widget .hheader-btn:hover {
	background-color: #254467 !important;
	transform: translateY(-2px);
}

/* Burger Toggle Button */
.hermosillo-header-widget .hheader-burger {
	background: transparent;
	border: none;
	cursor: pointer;
	display: none;
	flex-direction: column;
	gap: 6px;
	height: 44px;
	justify-content: center;
	padding: 10px;
	width: 44px;
	z-index: 1002;
}

.hermosillo-header-widget .hheader-burger-line {
	background-color: #ffffff;
	display: block;
	height: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
	width: 26px;
}

.hermosillo-header-widget .hheader-burger.is-active .hheader-burger-line:nth-child(1) {
	transform: translateY(8px) rotate(45deg);
}

.hermosillo-header-widget .hheader-burger.is-active .hheader-burger-line:nth-child(2) {
	opacity: 0;
}

.hermosillo-header-widget .hheader-burger.is-active .hheader-burger-line:nth-child(3) {
	transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Drawer */
.hermosillo-header-widget .hheader-mobile-drawer {
	background-color: #111a24;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100vh;
	left: 0;
	opacity: 0;
	overflow-y: auto;
	padding: 100px 32px 48px;
	pointer-events: none;
	position: fixed;
	top: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	visibility: hidden;
	width: 100vw;
	z-index: 1001;
}

.hermosillo-header-widget .hheader-mobile-drawer.is-open {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
}

.hermosillo-header-widget .hheader-mobile-nav {
	display: flex;
	flex-direction: column;
	gap: 16px;
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

.hermosillo-header-widget .hheader-mobile-link {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	color: #ffffff !important;
	display: block;
	font-family: 'Flama Condensed', 'FlamaCond', 'Roboto Condensed', sans-serif;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 12px 0;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.hermosillo-header-widget .hheader-mobile-link:hover,
.hermosillo-header-widget .hheader-mobile-link.is-active {
	color: #e65a28 !important;
	padding-left: 8px;
}

.hermosillo-header-widget .hheader-mobile-btn {
	justify-content: center;
	margin-top: 16px;
	width: 100%;
}

/* Responsive */
@media (max-width: 1248px) {
	.hermosillo-header-widget {
		padding-left: 24px;
		padding-right: 24px;
	}

	.hermosillo-header-widget.is-scrolled {
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media (max-width: 1024px) {
	.hermosillo-header-widget {
		padding: 20px 20px 0;
	}

	.hermosillo-header-widget.is-scrolled {
		padding: 0 20px;
	}

	.hermosillo-header-widget .hheader-inner {
		height: 64px;
	}

	.hermosillo-header-widget.is-scrolled .hheader-inner {
		height: 64px;
	}

	.hermosillo-header-widget .hheader-nav,
	.hermosillo-header-widget .hheader-actions .hheader-btn {
		display: none;
	}

	.hermosillo-header-widget .hheader-burger {
		display: flex;
	}

	.hermosillo-header-widget .hheader-actions {
		margin-left: auto;
	}
}

@media (max-width: 480px) {
	.hermosillo-header-widget {
		padding: 16px 16px 0;
	}

	.hermosillo-header-widget.is-scrolled {
		padding: 0 16px;
	}

	.hermosillo-header-widget .hheader-inner {
		height: 56px;
	}

	.hermosillo-header-widget.is-scrolled .hheader-inner {
		height: 56px;
	}

	.hermosillo-header-widget .hheader-logo img,
	.hermosillo-header-widget .hheader-logo svg {
		height: 26px;
	}

	.hermosillo-header-widget .hheader-mobile-drawer {
		padding: 84px 20px 36px;
	}

	.hermosillo-header-widget .hheader-mobile-link {
		font-size: 22px;
		padding: 10px 0;
	}
}
