/* Alborz Chillers — modern glass header (desktop + mobile)
   Transparent state: dark glass + white text (readable on any hero image).
   Scrolled state (body.alb-hdr-scrolled): solid white + graphite text. */

:root {
	--alb-ink: #2B2D42;
	--alb-red: #D90429;
	--alb-glass: rgba(27, 29, 44, 0.74);
	--alb-line: rgba(255, 255, 255, 0.10);
}

/* ---------- Bar ---------- */
#masthead .main-header-bar,
#masthead .ast-primary-header-bar,
#masthead .ast-mobile-header-wrap .main-header-bar {
	background: var(--alb-glass) !important;
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid var(--alb-line) !important;
	transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}

#masthead .site-logo-img img,
#masthead .custom-logo {
	border-radius: 8px;
	transition: transform .25s ease;
}

/* ---------- Desktop menu ---------- */
@media (min-width: 922px) {
	#masthead .main-header-menu > .menu-item > .menu-link {
		position: relative;
		color: #fff !important;
		font-size: 15px;
		line-height: 1.4;
		padding: 10px 14px;
		letter-spacing: 0;
		text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
		transition: color .2s ease;
	}
	#masthead .main-header-menu > .menu-item > .menu-link::after {
		content: "";
		position: absolute;
		inset-inline: 14px;
		bottom: 2px;
		height: 2px;
		border-radius: 2px;
		background: var(--alb-red);
		transform: scaleX(0);
		transform-origin: center;
		transition: transform .25s ease;
	}
	#masthead .main-header-menu > .menu-item:hover > .menu-link::after,
	#masthead .main-header-menu > .menu-item.current-menu-item > .menu-link::after,
	#masthead .main-header-menu > .menu-item.current-menu-ancestor > .menu-link::after {
		transform: scaleX(1);
	}
	#masthead .main-header-menu > .menu-item:hover > .menu-link,
	#masthead .main-header-menu > .menu-item.current-menu-item > .menu-link {
		color: #fff !important;
	}
	/* Small chevron on parents only */
	#masthead .main-header-menu > .menu-item > .menu-link .ast-icon { display: none; }
	#masthead .main-header-menu > .menu-item-has-children > .menu-link .sub-arrow { opacity: .7; }

	/* Dropdown */
	#masthead .main-header-menu .sub-menu {
		background: #fff !important;
		border: 0 !important;
		border-radius: 14px;
		box-shadow: 0 18px 44px rgba(20, 22, 40, .22);
		padding: 8px;
		margin-top: 8px;
		overflow: hidden;
	}
	#masthead .main-header-menu .sub-menu .menu-link {
		color: var(--alb-ink) !important;
		border: 0 !important;
		border-radius: 10px;
		padding: 10px 14px;
		font-size: 14px;
		text-shadow: none;
		transition: background-color .15s ease, color .15s ease;
	}
	#masthead .main-header-menu .sub-menu .menu-item:hover > .menu-link,
	#masthead .main-header-menu .sub-menu .current-menu-item > .menu-link {
		background: #f4f5f8 !important;
		color: var(--alb-red) !important;
	}
}

/* ---------- Scrolled / sticky state ---------- */
body.alb-hdr-scrolled #masthead .main-header-bar,
body.alb-hdr-scrolled #masthead .ast-primary-header-bar,
.ast-header-sticked #masthead .main-header-bar {
	background: rgba(255, 255, 255, .96) !important;
	border-bottom-color: rgba(43, 45, 66, .08) !important;
	box-shadow: 0 6px 24px rgba(20, 22, 40, .08);
}
@media (min-width: 922px) {
	body.alb-hdr-scrolled #masthead .main-header-menu > .menu-item > .menu-link,
	body.alb-hdr-scrolled #masthead .main-header-menu > .menu-item:hover > .menu-link,
	body.alb-hdr-scrolled #masthead .main-header-menu > .menu-item.current-menu-item > .menu-link {
		color: var(--alb-ink) !important;
		text-shadow: none;
	}
	body.alb-hdr-scrolled #masthead .main-header-menu > .menu-item:hover > .menu-link,
	body.alb-hdr-scrolled #masthead .main-header-menu > .menu-item.current-menu-item > .menu-link {
		color: var(--alb-red) !important;
	}
}

/* ---------- Mobile / tablet ---------- */
@media (max-width: 921px) {
	#masthead .menu-toggle.main-header-menu-toggle,
	#masthead .ast-mobile-menu-trigger-fill {
		background: var(--alb-red) !important;
		color: #fff !important;
		border: 0 !important;
		border-radius: 12px;
		padding: 8px 10px;
		box-shadow: 0 6px 16px rgba(217, 4, 41, .35);
	}
	#masthead .menu-toggle .ast-mobile-svg { fill: #fff; color: #fff; }

	/* Dropdown panel: white card with readable graphite links */
	#masthead .ast-mobile-header-content,
	#masthead .main-header-bar-navigation {
		background: #fff !important;
		border-radius: 0 0 18px 18px;
		box-shadow: 0 22px 44px rgba(20, 22, 40, .25);
		overflow: hidden;
	}
	#masthead .main-header-menu { background: transparent !important; border: 0 !important; }
	#masthead .main-header-menu .menu-item { border: 0 !important; }
	#masthead .main-header-menu .menu-link,
	#masthead .main-header-menu .sub-menu .menu-link {
		color: var(--alb-ink) !important;
		font-size: 15px;
		padding: 14px 22px !important;
		border: 0 !important;
		border-bottom: 1px solid #eef0f4 !important;
		text-shadow: none;
		background: transparent !important;
	}
	#masthead .main-header-menu .current-menu-item > .menu-link,
	#masthead .main-header-menu .menu-link:hover,
	#masthead .main-header-menu .menu-link:focus {
		color: var(--alb-red) !important;
		background: #f7f8fa !important;
	}
	#masthead .main-header-menu .sub-menu { box-shadow: none; padding: 0; margin: 0; background: #fafbfc !important; }
	#masthead .main-header-menu .sub-menu .menu-link { padding-inline-start: 38px !important; font-size: 14px; }
	#masthead .site-logo-img img, #masthead .custom-logo { max-height: 46px; width: auto; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
	#masthead * { transition: none !important; }
}
