/**
 * Congressional School — Max Mega Menu (header) custom overrides
 *
 * Extracted verbatim from WP Customizer → Additional CSS (the "Press Foundry
 * rebuild styles") so the menu's custom styling is version-controlled and
 * survives Max Mega Menu plugin updates and production pulls.
 *
 * Loaded AFTER Max Mega Menu's generated stylesheet (handle: `megamenu`,
 * wp-content/uploads/maxmegamenu/style.css) — see functions.php
 * (cs_child_enqueue_styles), which declares `megamenu` as a dependency so the
 * cascade order is guaranteed.
 *
 * Scope: ONLY Max Mega Menu selectors (#mega-menu-wrap-header / #mega-menu-header
 * / .mega-* / .pf-mega-menu-*). Site-wide CSS stays in the Customizer.
 *
 * The base look of the menu (colours, fonts, spacing) is defined by the MMM
 * theme "custom_theme_1" (Mega Menu → Menu Themes), which is stored in the
 * database and edited in wp-admin — not here. This file only holds the
 * hand-written overrides that previously lived in the Customizer.
 */

/* ============================================================
 * Desktop — MMM horizontal bar active (>767px)
 * ============================================================ */
@media (min-width: 768px) {
	ul#mega-menu-header {
		padding-block: 20px !important;
	}

	ul.mega-sub-menu {
		top: 100% !important;
	}

	.mega-menu-column {
		padding-block: 50px !important;
	}

	.pf-mega-menu-container > ul.mega-sub-menu {
		display: flex !important;
		align-items: start;
		gap: 80px;
	}

	.pf-mega-menu-description > ul {
		display: flex !important;
		gap: 50px;
	}

	.mega-sub-menu .mega-menu-item {
		padding: 0 !important;
	}

	.mega-sub-menu .mega-menu-item:first-child a {
		margin-top: 0 !important;
	}

	.mega-sub-menu .mega-menu-item a {
		margin-top: 20px !important;
	}

	.mega-menu-item.widget_text {
		padding-top: 0 !important;
		font-size: 16px !important;
		line-height: 24px !important;
	}

	.mega-sub-menu .mega-menu-item.mega-menu-item-type-post_type a.mega-menu-link {
		font-size: 20px !important;
		font-weight: 500 !important;
		font-family: 'century-gothic' !important;
	}

	.mega-sub-menu .mega-menu-item.mega-menu-item-type-post_type a.mega-menu-link:hover {
		color: #fff !important;
		text-decoration: underline !important;
	}

	.mega-sub-menu {
		padding-inline: 15px !important;
	}
}

/* ============================================================
 * Tablet — 768px to 1100px
 * ============================================================ */
@media (min-width: 768px) and (max-width: 1100px) {
	#mega-menu-wrap-header #mega-menu-header li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator {
		margin-left: 0;
	}

	.pf-mega-menu-description {
		width: 0% !important;
		display: none !important;
	}

	.mega-menu-columns-3-of-12 {
		width: 50% !important;
	}
}

/* ============================================================
 * Tablet — 768px to 1200px: tighten top-level link padding
 * ============================================================ */
@media (min-width: 768px) and (max-width: 1200px) {
	#mega-menu-wrap-header #mega-menu-header > li.mega-menu-item > a.mega-menu-link {
		padding-inline: 5px;
	}
}

/* ============================================================
 * Mobile — up to 768px: collapse mega panel to a simple list
 * ============================================================ */
@media (max-width: 768px) {
	#mega-menu-wrap-header {
		width: 100vw;
	}

	.pf-mega-menu-description {
		display: none !important;
	}

	.mega-menu-item-type-widget.widget_text {
		display: none !important;
	}

	.mega-menu-item-object-page,
	.mega-menu-item-object-custom {
		padding: 5px 15px !important;
	}
}
