/* ==========================================================
   EASY HOMES MEGA MENU - STYLES
   Edit colors/fonts here to match brand exactly if needed.
   ========================================================== */

:root {
	--ehmm-green: #6fbf3f;       /* pill button green - adjust to match exact brand green */
	--ehmm-green-hover: #5fa934;
	--ehmm-text-dark: #2b2b2b;
	--ehmm-text-muted: #6a6a6a;
	--ehmm-border: #e7e7e7;
	--ehmm-panel-bg: #ffffff;
}

/* ---------- Top level nav ---------- */
.ehmm-nav {
	position: relative;
	width: 100%;
}

.ehmm-menu {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 28px;
}

.ehmm-top-item {
	position: relative;
}

.ehmm-top-link {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	color: var(--ehmm-text-dark);
	padding: 26px 4px;
	text-transform: uppercase;
}

.ehmm-caret {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -3px;
	transition: transform 0.2s ease;
}

.ehmm-top-item.has-dropdown.ehmm-js-open .ehmm-caret {
	transform: rotate(225deg);
	margin-top: 3px;
}

/* ---------- Dropdown panel (full width) ---------- */
.ehmm-dropdown {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	top: var(--ehmm-header-height, 90px); /* JS sets this dynamically to match real header height */
	width: 100vw;
	background: var(--ehmm-panel-bg);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
	border-top: 1px solid var(--ehmm-border);
	z-index: 999;
}

.ehmm-top-item.has-dropdown.ehmm-js-open .ehmm-dropdown,
.ehmm-top-item.has-dropdown.ehmm-open .ehmm-dropdown {
	display: block;
}

.ehmm-dropdown-inner {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	align-items: stretch;
	min-height: 380px;
	padding: 40px 60px;
	gap: 50px;
}

/* ---------- Columns wrapper (left side, can hold 1+ column blocks) ---------- */
.ehmm-columns {
	flex: 0 0 auto;
	display: flex;
	gap: 50px;
	min-width: 460px;
}

.ehmm-column {
	min-width: 200px;
}

.ehmm-column-heading {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ehmm-text-muted);
	text-decoration: none;
	margin-bottom: 4px;
}

.ehmm-column-heading:hover {
	color: var(--ehmm-text-dark);
}

.ehmm-column-subheading {
	font-size: 13px;
	color: var(--ehmm-text-muted);
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ehmm-border);
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
}

/* Applied via PHP when a column has no subheading, so the divider still shows
   right under the heading text. */
.ehmm-column-heading.ehmm-heading-divider {
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ehmm-border);
	margin-bottom: 16px;
}

/* ---------- FLAT layout variant (e.g. "Allgemeine Informationen") ----------
   Applied when a top-level item's children have no children of their own -
   single simple list of links, no column headings, no pills/size labels needed
   (though they'll still show if you happen to set them via ACF). */
.ehmm-top-item.ehmm-layout-flat .ehmm-columns {
	min-width: 280px; /* narrower than the columns layout's 460px - just one list */
}

.ehmm-top-item.ehmm-layout-flat .ehmm-flat-column {
	min-width: 240px;
}

.ehmm-top-item.ehmm-layout-flat .ehmm-sub-item {
	border-bottom: none;
	padding: 0;
	border-radius: 4px;
	transition: background 0.15s ease;
}

.ehmm-top-item.ehmm-layout-flat .ehmm-sub-link {
	padding: 12px 14px;
}

.ehmm-top-item.ehmm-layout-flat .ehmm-sub-item:hover {
	background: #f4f4f4;
}

.ehmm-top-item.ehmm-layout-flat .ehmm-sub-title {
	font-weight: 500;
}

.ehmm-sublist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	row-gap: 14px;
}

.ehmm-sub-item {
	border-bottom: 1px solid var(--ehmm-border);
	padding-bottom: 12px;
}

.ehmm-sub-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-decoration: none;
	color: var(--ehmm-text-dark);
}

.ehmm-sub-link:hover .ehmm-sub-title {
	color: var(--ehmm-green-hover);
}

.ehmm-sub-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--ehmm-text-dark);
	transition: color 0.15s ease;
}

.ehmm-size-label {
	font-size: 13px;
	color: var(--ehmm-text-muted);
	margin-left: 6px;
	white-space: nowrap;
}

.ehmm-pill {
	margin-left: auto;
	flex-shrink: 0;
	background: var(--ehmm-green);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 20px;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.ehmm-sub-link:hover .ehmm-pill {
	background: var(--ehmm-green-hover);
}

/* ---------- Right image column ---------- */
.ehmm-image-col {
	flex: 1 1 auto;
	position: relative;
	border-radius: 6px;
	overflow: hidden;
	background: #eee; /* shows while image loads / if missing */
	min-height: 320px;
}

.ehmm-active-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ehmm-active-image.is-visible {
	opacity: 1;
}

/* ==========================================================
   MOBILE / TABLET - simple accordion, no images, no pills shown
   as buttons (kept simpler per requirements)
   ========================================================== */
@media (max-width: 991px) {

	.ehmm-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.ehmm-top-link {
		padding: 16px 10px;
		justify-content: space-between;
		border-bottom: 1px solid var(--ehmm-border);
	}

	/* Dropdown becomes a normal static block on mobile, no fixed positioning */
	.ehmm-dropdown {
		position: static;
		width: 100%;
		box-shadow: none;
		border-top: none;
	}

	.ehmm-top-item.has-dropdown.ehmm-open .ehmm-dropdown {
		display: block;
	}

	.ehmm-dropdown-inner {
		flex-direction: column;
		padding: 10px 16px 20px;
		min-height: 0;
		gap: 0;
	}

	.ehmm-columns {
		min-width: 0;
		width: 100%;
		flex-direction: column;
		gap: 6px;
	}

	.ehmm-column {
		min-width: 0;
		width: 100%;
	}

	.ehmm-column-heading {
		font-size: 13px;
		margin: 10px 0 8px;
		padding-bottom: 6px;
	}

	.ehmm-sublist {
		row-gap: 4px;
	}

	.ehmm-sub-item {
		padding: 10px 0;
	}

	/* Hide image panel entirely on mobile per requirement */
	.ehmm-image-col {
		display: none;
	}

	/* Simplify: hide pill + size label on mobile, keep just the link text */
	.ehmm-pill,
	.ehmm-size-label {
		display: none;
	}
}
