/* Mobile: hide mega links & panels; show sidebar menu icon */
@media (max-width: 1023px) {
	.nebra-mega-panel,
	.has-nebra-mega .nebra-mega-panel {
		display: none !important;
	}

	.nebra-hb-mega-nav__links {
		display: none !important;
	}

	.nebra-hb-mega-nav__mobile-btn {
		display: flex;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega > a::after {
		display: none;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega > .nebra-mega-top-trigger::after {
		display: none;
	}
}

@media (min-width: 1024px) {
	.nebra-hb-mega-nav__mobile-btn {
		display: none !important;
	}

	.nebra-hb-mega-nav__links {
		display: block;
	}

	.nebra-header-builder__main.nebra-hb-main-slots {
		position: relative;
	}

	.nebra-header-builder__nav-row.has-nebra-mega-menu {
		position: relative;
	}

	.header-menu-col.has-nebra-mega-menu > ul {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 4px 28px;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.nebra-hb-mega-nav .header-menu-col.has-nebra-mega-menu > ul {
		justify-content: flex-start;
		gap: 4px 20px;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li {
		position: static;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li > a,
	.header-menu-col.has-nebra-mega-menu > ul > li > .nebra-mega-top-trigger {
		display: inline-block;
		padding: 10px 0;
		text-decoration: none;
		color: inherit;
		font-size: 14px;
		letter-spacing: 0.02em;
		border-bottom: 2px solid transparent;
		transition: border-color 0.2s ease, color 0.2s ease;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li > .nebra-mega-top-trigger {
		background: none;
		border-top: none;
		border-left: none;
		border-right: none;
		font: inherit;
		cursor: pointer;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega > a::after,
	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega > .nebra-mega-top-trigger::after {
		content: '';
		display: inline-block;
		width: 0;
		height: 0;
		margin-left: 6px;
		vertical-align: middle;
		border-left: 4px solid transparent;
		border-right: 4px solid transparent;
		border-top: 5px solid currentColor;
		opacity: 0.45;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li.is-mega-open > a,
	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega:hover > a,
	.header-menu-col.has-nebra-mega-menu > ul > li.is-mega-open > .nebra-mega-top-trigger,
	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega:hover > .nebra-mega-top-trigger {
		border-bottom-color: var(--primary_color, #111);
	}

	.nebra-mega-panel {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 10050;
		background: #fff;
		border-top: 1px solid color-mix(in srgb, var(--primary_color, #111) 10%, transparent);
		box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(8px);
		transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
	}

	.header-menu-col.has-nebra-mega-menu > ul > li.is-mega-open .nebra-mega-panel,
	.header-menu-col.has-nebra-mega-menu > ul > li.has-nebra-mega:hover .nebra-mega-panel {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	.nebra-mega-panel__inner {
		display: flex;
		align-items: stretch;
		gap: 32px;
		max-width: var(--max_width);
		margin: 0 auto;
		padding: 32px 0;
	}

	.nebra-mega-panel__columns {
		flex: 1 1 auto;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
		gap: 24px 32px;
	}

	.nebra-mega-panel__col-title {
		margin: 0 0 14px;
		font-size: 13px;
		font-weight: 700;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--primary_color, #111);
	}

	.nebra-mega-panel__col-links {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.nebra-mega-panel__col-links li {
		margin: 0 0 10px;
	}

	.nebra-mega-panel__col-links a {
		text-decoration: none;
		color: #4b5563;
		font-size: 14px;
		line-height: 1.4;
		transition: color 0.15s ease;
	}

	.nebra-mega-panel__col-links a:hover {
		color: var(--primary_color, #111);
	}

	.nebra-mega-panel__feature {
		position: relative;
		display: block;
		overflow: hidden;
		border-radius: 2px;
		min-height: 220px;
		text-decoration: none;
		color: #fff;
	}

	.nebra-mega-panel__feature img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		min-height: 220px;
	}

	.nebra-mega-panel__feature-caption {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 20px;
		background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
	}

	.nebra-mega-panel__feature-title {
		display: block;
		font-family: Georgia, 'Times New Roman', serif;
		font-style: italic;
		font-size: 22px;
		line-height: 1.2;
		margin-bottom: 8px;
	}

	.nebra-mega-panel__feature-cta {
		display: inline-block;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		border-bottom: 1px solid currentColor;
		padding-bottom: 2px;
	}
}
