/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0.1
Description: Child theme of Hello Elementor with a modern custom header.
*/

/* =========================================================
   MODERN HEADER
   ========================================================= */

/* Reset nav list styles injected by WordPress */
#modern-header .nav-primary ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#modern-header .nav-primary ul li a {
	color: inherit;
	text-decoration: none;
}

/* ----- Top bar ----- */
#modern-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	font-family: inherit;
}

.nada {
	color: #12a4a4;
}

.mh-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

/* ----- Logo ----- */
.mh-logo a {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #57624E;
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.mh-logo img {
	height: 40px;
	width: auto;
	display: block;
}

/* Logo placeholder shown when no custom logo is set */
.mh-logo-placeholder {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mh-logo-placeholder .logo-icon {
	width: 38px;
	height: 38px;
	background-color: #3B783F; 
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 1rem;
	font-weight: 800;
}

.mh-logo-placeholder .logo-text {
	color: #57624E;
	font-size: 1.25rem;
	font-weight: 700;
}

/* ----- Navigation ----- */
.mh-nav {
	flex: 1;
	display: flex;
	justify-content: center;
	/* Fill the header's full height so top-level items have no dead zone
	   below them for the mouse to lose :hover in before reaching the
	   fixed-position dropdown panel (which is pinned at the header's bottom
	   edge). */
	align-self: stretch;
}

.mh-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mh-nav > .mh-menu-list {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 100%;
}

.mh-nav > .mh-menu-list > li {
	display: flex;
	align-items: center;
	height: 100%;
}

.mh-nav li {
	position: relative;
	list-style: none;
}

.mh-nav ul li a,
.mh-nav ul li > span {
	display: block;
	padding: 8px 14px;
	font-size: 0.9rem;
	font-weight: 500;
	color: #57624E;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

/* Hover Menu */
.mh-nav ul li a:hover {
	background: #d3e1dc;
	color: #3B783F;
}

/* Active Menu */
.mh-nav ul li.current-menu-item > a {
	color: #3B783F;
	font-weight: 600;
}

/* Caret for items with a submenu */
.mh-nav li.menu-item-has-children > a {
	padding-right: 30px;
}

.mh-nav li.menu-item-has-children > a::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-65%) rotate(45deg);
	transition: transform 0.25s ease;
	pointer-events: none;
}

.mh-nav li.menu-item-has-children:hover > a::after,
.mh-nav li.menu-item-has-children:focus-within > a::after {
	transform: translateY(-35%) rotate(-135deg);
}

/* Dropdown panel (shown on hover/focus of its parent item) */
/* !important overrides required: Elementor's own nav-menu CSS also targets
   .sub-menu / .menu-item-has-children and loads after this stylesheet */
.mh-nav .sub-menu {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	display: block !important;
	min-width: 260px;
	background: #fff;
	border: 1px solid rgba(20, 30, 20, 0.06);
	border-radius: 14px;
	box-shadow: 0 20px 45px rgba(20, 40, 25, 0.16);
	padding: 10px;
	margin: 14px 0 0;
	list-style: none !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(6px) scale(0.98);
	transform-origin: top left;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 100;
}

/* Invisible bridge over the visual gap so :hover never drops while the
   pointer travels from the trigger link down into the panel */
.mh-nav .sub-menu::before {
	content: '';
	position: absolute;
	top: -14px;
	left: 0;
	right: 0;
	height: 14px;
}

/* Small notch that visually connects the panel to its top-level trigger.
   Hidden on wide (grid) panels below, since those are viewport-centered and
   no longer sit directly under their trigger. */
.mh-nav > .mh-menu-list > li.menu-item-has-children > .sub-menu::after {
	content: '';
	position: absolute;
	top: -6px;
	left: 20px;
	width: 12px;
	height: 12px;
	background: #fff;
	border-left: 1px solid rgba(20, 30, 20, 0.06);
	border-top: 1px solid rgba(20, 30, 20, 0.06);
	border-radius: 3px 0 0 0;
	transform: rotate(45deg);
	display: none;
}

.mh-nav li.menu-item-has-children:hover > .sub-menu,
.mh-nav li.menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

/* Keep dropdowns collapsed inside the Elementor editor canvas — clicking
   around to edit the page can leave a submenu link focused/hovered, which
   would otherwise leave it stuck open while editing. */
body.elementor-editor-active .mh-nav .sub-menu {
	display: none !important;
}

.mh-nav .sub-menu li {
	position: relative;
	list-style: none !important;
}

.mh-nav .sub-menu li::marker {
	content: none;
}

/* Kill a stray current-item indicator pseudo injected by a plugin (not ours —
   our own icon lives in the .dashicons span, this targets the <li> itself) */
.mh-nav li::before,
.mh-nav li::after {
	content: none !important;
	display: none !important;
}

.mh-mobile-drawer li::before,
.mh-mobile-drawer li::after {
	content: none !important;
	display: none !important;
}

.mh-nav .sub-menu li + li {
	margin-top: 2px;
}

.mh-nav .sub-menu li a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	border-radius: 9px;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mh-nav .sub-menu li a:hover {
	background: #eef4ec;
	color: #3B783F;
	transform: translateX(2px);
}

/* Icon slot for submenu items — see functions.php for how to assign one.
   Colors come from --icon-color/--icon-bg (defaults set on the low-specificity
   .menu-item-icon rule below) so a single "icon-color-*" class (added in
   Appearance → Menus → CSS Classes) can re-theme any icon. */
.mh-nav .sub-menu .menu-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--icon-bg);
	color: var(--icon-color);
	font-size: 15px;
	transition: background 0.2s ease, color 0.2s ease;
}

.mh-nav .sub-menu li a:hover .menu-item-icon {
	background: var(--icon-color);
	color: #fff;
}

/* Third-level submenus flyout to the side instead of stacking below */
.mh-nav .sub-menu .sub-menu {
	top: -10px;
	left: 100%;
	margin-top: 0;
	transform: scale(0.98);
}

.mh-nav .sub-menu .sub-menu::after {
	display: none;
}

.mh-nav .sub-menu li.menu-item-has-children:hover > .sub-menu,
.mh-nav .sub-menu li.menu-item-has-children:focus-within > .sub-menu {
	transform: scale(1);
}

/* Top-level dropdowns fill a 4-item-per-row grid, left to right, before
   wrapping to the next row. Desktop only — the mobile drawer keeps its
   accordion, and nested (third-level) submenus keep their flyout style.

   These panels are wide enough that positioning them under whatever trigger
   happens to be hovered (the default .mh-nav .sub-menu left:0 rule) can push
   them past the right edge of the screen, so instead they're pinned relative
   to the viewport and centered under the header regardless of which item
   opened them. */
.mh-nav > .mh-menu-list > li.menu-item-has-children > .sub-menu {
	min-width: 640px;
	width: max-content;
	max-width: calc(100vw - 32px);
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px 20px;
	position: fixed !important;
	top: 70px !important;
	left: 50% !important;
	transform: translateX(-50%) translateY(6px) scale(0.98);
	transform-origin: top center;
}

.mh-nav > .mh-menu-list > li.menu-item-has-children:hover > .sub-menu,
.mh-nav > .mh-menu-list > li.menu-item-has-children:focus-within > .sub-menu {
	transform: translateX(-50%) translateY(0) scale(1);
}

/* Static header injected by Hello_Child_Nav_Walker; spans the full grid. */
.mh-nav .sub-menu > .mh-submenu-header {
	grid-column: 1 / -1;
	padding: 6px 14px 10px;
	margin: 0 0 4px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #8a9484;
	border-bottom: 1px solid #eae7e1;
}

.mh-mobile-drawer .mh-submenu-header {
	display: none;
}

/* ----- Right actions ----- */
.mh-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

/* Social icons */
.mh-social {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mh-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	color: #57624E;
	transition: background 0.2s, color 0.2s;
	text-decoration: none;
}

.mh-social a:hover {
	background: #f5f4f0;
	color: #3B783F;
}

.mh-social svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Login button */
.mh-login-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 20px;
	background-color: #3B783F; 
	color: #fff !important;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 50px;
	text-decoration: none !important;
	transition: opacity 0.2s, box-shadow 0.2s;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(36, 90, 66, 0.45);
}

.mh-login-btn:hover {
	opacity: 0.9;
	box-shadow: 0 6px 18px rgba(87, 98, 78, 0.45);
}

/* Logged-in user greeting */
.mh-user-greeting {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: #57624E;
}

.mh-user-greeting a {
	color: #3B783F;
	text-decoration: none;
	font-weight: 600;
}

/* ----- Hamburger ----- */
.mh-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: background 0.2s;
}

.mh-hamburger:hover {
	background: #f5f4f0;
}

.mh-hamburger span {
	display: block;
	height: 2px;
	background: #57624E;
	border-radius: 2px;
	transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger open state */
.mh-hamburger.is-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mh-hamburger.is-open span:nth-child(2) {
	opacity: 0;
}

.mh-hamburger.is-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ----- Mobile drawer ----- */
.mh-mobile-drawer {
	display: none;
	flex-direction: column;
	gap: 0;
	background: #fff;
	border-top: 1px solid #eee;
	padding: 12px 24px 20px;
}

.mh-mobile-drawer.is-open {
	display: flex;
	/* Header is sticky, so once stuck its own overflow is clipped by the
	   viewport and page scroll can't reveal more of it — scroll internally
	   instead so items below an expanded submenu stay reachable. */
	max-height: calc(100vh - 70px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.mh-mobile-drawer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mh-mobile-drawer li {
	list-style: none !important;
}

.mh-mobile-drawer li::marker {
	content: none;
}

.mh-mobile-drawer ul li a {
	display: flex;
	align-items: center;
	padding: 11px 0;
	font-size: 1rem;
	font-weight: 500;
	color: #57624E;
	text-decoration: none;
	border-bottom: 1px solid #eae7e1;
	transition: color 0.2s;
}

.mh-mobile-drawer ul li:last-child a {
	border-bottom: none;
}

.mh-mobile-drawer ul li a:hover {
	color: #3B783F;
}

/* Accordion-style submenus inside the mobile drawer */
.mh-mobile-drawer li.menu-item-has-children {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid #eae7e1;
}

.mh-mobile-drawer li.menu-item-has-children:last-child {
	border-bottom: none;
}

.mh-mobile-drawer li.menu-item-has-children > a {
	flex: 1;
	border-bottom: none;
}

/* Custom class name (not "submenu-toggle") to avoid colliding with
   Elementor's own mobile-menu toggle button styles */
.mh-mobile-drawer .mh-submenu-toggle {
	flex-shrink: 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	margin: 0 !important;
	background: none !important;
	border: none !important;
	border-radius: 8px;
	padding: 0 !important;
	color: #57624E !important;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.mh-mobile-drawer .mh-submenu-toggle:hover,
.mh-mobile-drawer .mh-submenu-toggle:focus-visible {
	background: #eef4ec !important;
	color: #3B783F !important;
}

.mh-mobile-drawer .mh-submenu-toggle svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	transition: transform 0.3s ease;
}

.mh-mobile-drawer li.menu-item-has-children.is-open > .mh-submenu-toggle svg {
	transform: rotate(180deg);
}

.mh-mobile-drawer .sub-menu {
	flex-basis: 100%;
	list-style: none;
	margin: 0;
	padding: 0 0 0 16px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.mh-mobile-drawer li.menu-item-has-children.is-open > .sub-menu {
	max-height: 1000px;
}

.mh-mobile-drawer .sub-menu li a {
	font-size: 0.925rem;
	color: #6b7a63;
	padding: 10px 0;
}

/* Icon slot for menu items — see functions.php for how to assign one */
.mh-mobile-drawer .menu-item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--icon-bg);
	color: var(--icon-color);
	font-size: 14px;
	margin-right: 10px;
}

/* Low-specificity default so any "icon-color-*" modifier below can win */
.menu-item-icon {
	--icon-color: #3B783F;
	--icon-bg: #eef4ec;
}

/* Color palette for menu item icons — add one of these classes alongside the
   "dashicons-*" class in Appearance → Menus → (item) → CSS Classes */
.menu-item-icon.icon-color-green {
	--icon-color: #3B783F;
	--icon-bg: #eef4ec;
}

.menu-item-icon.icon-color-blue {
	--icon-color: #3367d6;
	--icon-bg: #e8f0fe;
}

.menu-item-icon.icon-color-red {
	--icon-color: #c3442b;
	--icon-bg: #fdeceb;
}

.menu-item-icon.icon-color-orange {
	--icon-color: #d97218;
	--icon-bg: #fff3e0;
}

.menu-item-icon.icon-color-purple {
	--icon-color: #8430ce;
	--icon-bg: #f3e8fd;
}

.menu-item-icon.icon-color-yellow {
	--icon-color: #b58500;
	--icon-bg: #fef7e0;
}

.menu-item-icon.icon-color-teal {
	--icon-color: #12a4a4;
	--icon-bg: #e0f7f7;
}

.menu-item-icon.icon-color-pink {
	--icon-color: #d6336c;
	--icon-bg: #fde8ef;
}

/* End of Menu Color classess */

.mh-mobile-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
}

.mh-mobile-actions .mh-social {
	gap: 12px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
	.mh-nav {
		display: none;
	}

	.mh-actions {
		display: none;
	}

	.mh-hamburger {
		display: flex;
	}
}

@media (max-width: 480px) {
	.mh-inner {
		padding: 0 16px;
	}
}

/* =========================================================
   404 PAGE
   ========================================================= */

.page-404 {
	min-height: calc(100vh - 70px - 200px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 24px;
}

.container-404 {
	max-width: 600px;
	text-align: center;
	animation: fadeIn 0.6s ease-in;
}

.owl-404 {
	width: 200px;
	height: 200px;
	margin: 0 auto 40px;
	animation: bounce 3s ease-in-out infinite;
}

.owl-404 svg {
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 8px 16px rgba(87, 98, 78, 0.15));
}

.error-404-content {
	animation: slideUp 0.8s ease-out 0.2s both;
}

.error-404-title {
	font-size: 5rem;
	font-weight: 900;
	color: #3B783F;
	margin: 0 0 10px;
	letter-spacing: -2px;
}

.error-404-subtitle {
	font-size: 2rem;
	color: #57624E;
	margin: 0 0 20px;
	font-weight: 600;
}

.error-404-description {
	font-size: 1.1rem;
	color: #555;
	margin: 20px 0 40px;
	line-height: 1.6;
}

.error-404-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

.btn-404-home {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 12px 28px;
	border-radius: 50px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.btn-404-home {
	background: linear-gradient(135deg, #57624E 0%, #3B783F 100%);
	color: #fff;
	box-shadow: 0 4px 14px rgba(87, 98, 78, 0.35);
}

.btn-404-home:hover {
	color: #fff;
	opacity: 0.9;
	box-shadow: 0 6px 20px rgba(87, 98, 78, 0.45);
	transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-20px);
	}
}

/* Mobile adjustments */
@media (max-width: 768px) {
	.page-404 {
		min-height: calc(100vh - 70px - 100px);
		padding: 40px 20px;
	}

	.owl-404 {
		width: 150px;
		height: 150px;
		margin-bottom: 30px;
	}

	.error-404-title {
		font-size: 3.5rem;
	}

	.error-404-subtitle {
		font-size: 1.5rem;
	}

	.error-404-actions {
		flex-direction: column;
	}

	.btn-404-home,
	.btn-404-blog {
		width: 100%;
		justify-content: center;
	}
}
