/**
 * Mega menu (ACF shortcode inside Divi Code module / Theme Builder).
 * Sticky/fixed header and section padding: set in Divi Theme Builder (section/row/module).
 * Top bar id: #scrs-mega-menu-top-bar.
 *
 * !important notes: Divi injects inline styles for section padding, background, borders,
 * and column widths — those are the only cases where !important is warranted here.
 */

#scrs-mega-menu-header-root {
	background-color: #ffffff;
	border-bottom: 1px solid rgba(0,49,129,0.21);
	height: 105px;
}

/* Divi injects inline padding, border, box-shadow on .et_pb_section — override those only */
#scrs-mega-menu-top-bar {
	padding-top: 15px !important;
	padding-bottom: 15px !important;
	max-width: 92%;
	margin-left: auto;
	margin-right: auto;
	border: none !important;
	box-shadow: none !important;
}

/* Two IDs + three classes — no border on the section, border lives on the header root */
#scrs-mega-menu-header-root #scrs-mega-menu-top-bar.et_pb_section.et_pb_with_border {
	border: none;
	box-shadow: none;
}

/* Divi Code module wrapper: preserve the header root bottom border */
body.et-db #et-boc .et_pb_code_inner header#scrs-mega-menu-header-root,
body #et-boc .et_pb_code_inner header#scrs-mega-menu-header-root {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow: visible;
	border-top: none;
	border-left: none;
	border-right: none;
	border-bottom: 1px solid rgba(0,49,129,0.21);
	box-shadow: none !important;
	background-color: #ffffff !important;
}

@media (min-width: 1001px) {
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar {
		background-color: #ffffff !important;
		position: relative;
		z-index: 100;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .mega_menu_nav_row {
		justify-content: space-between;
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column {
		margin: 0 !important;
		max-width: 178px !important;
        max-height: 75px;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column a {
		display: block;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .nav_column {
		display: flex;
		justify-content: flex-end;
		margin: 0 !important;
		width: 87% !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .et_pb_widget_area {
		align-items: center;
		display: flex;
		justify-content: flex-end;
		margin-bottom: 0 !important;
		margin-right: 0;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .widget_nav_menu,
	#scrs-mega-menu-header-root .mega-menu .widget_nav_menu {
		margin: 0 !important;
		width: 100% !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu {
		align-items: center;
		display: flex;
		min-width: 0;
		max-width: 100%;
		justify-content: flex-end;
		flex-wrap: wrap;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li {
		margin-bottom: 0;
		margin-left: 1.75vw;
		list-style: none;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li a {
		background-image: none;
		display: block;
		font-size: 16px;
		line-height: 1.35em;
		padding: 0 15px 0 0;
		color: #005481 !important;
		font-weight: 500 !important;
		transition: color 0.35s ease-in-out;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li a:hover,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li a:focus {
		color: #2ea3f2 !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.menu-item-has-mega a,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li[class*="mega-menu-"] a {
		background-image: url(images/nav-arrow-down-blue.svg);
		background-repeat: no-repeat;
		background-position: right 8px;
		background-size: 10px;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.menu-item-has-mega a:hover,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li[class*="mega-menu-"] a:hover {
		background-image: url(images/nav-arrow-down-blue.svg);
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li a[aria-expanded="true"] {
		color: #005481 !important;
		font-weight: 600 !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.cta a {
		background-color: #003181;
		background-image: none;
		border-radius: 4px;
		color: #ffffff !important;
		padding: 15px 25px;
		transition: background-color 0.35s ease-in-out;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.cta a:hover {
		background-color: #d405bf;
		color: #ffffff !important;
	}

	#scrs-mega-menu-header-root .mega-menu .et_pb_widget li a {
		transition: color 0.35s ease-in-out;
	}

	#scrs-mega-menu-header-root .mega-menu .et_pb_widget li a:hover {
		color: #efbe79 !important;
	}

	#scrs-mega-menu-header-root .mega-menu {
		left: 0;
		right: 0;
		top: 100%;
		max-width: 100vw;
		box-sizing: border-box;
		background-color: #ffffff !important;
	}
}

/* -------------------------------------------------------------------------
   Mega panel inner layout (all breakpoints)
   ------------------------------------------------------------------------- */

/* Inner row matches 92% top bar width; Divi sets row max-width inline so !important needed */
#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row {
	max-width: 92% !important;
	width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	box-sizing: border-box;
	display: flex !important;
	flex-wrap: nowrap !important;
}

/* Columns: fluid between 21.25% (min) and 100% (max); gap handles spacing */
#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column {
	flex: 1 1 21.25% !important;
	min-width: 21.25% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 20px !important;
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
}

/* Reset Divi column_inner padding */
#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .et_pb_column_inner,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .et_pb_column_inner {
	padding: 0 !important;
	width: 100% !important;
	box-sizing: border-box;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column:not(.et-last-child),
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column:not(.et-last-child) {
	border-right: 1px solid rgba(0,49,129,0.21);
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row:not(.et-last-child) .et_pb_column {
	border-bottom: 1px solid rgba(0,49,129,0.21) !important;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column > .et_pb_module.et_pb_text,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column > .et_pb_module.et_pb_text {
	width: 100% !important;
	max-width: 100%;
	margin: 0 !important;
	padding-bottom: 0;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .et_pb_text_inner,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .et_pb_text_inner {
	text-align: left;
}

/* Tight gap under copy before CTA buttons */
#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .dipi_button_grid,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .dipi_button_grid {
	margin-top: auto !important;
	width: 100% !important;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .dipi-button-grid-container,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .dipi-button-grid-container {
	margin-top: 15px;
	width: 100% !important;
	max-width: 100%;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .dipi_button_grid_child {
	flex: 0 0 auto;
	max-width: none;
	margin: 0 !important;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-button {
	text-align: left;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-link:only-child {
	margin-left: auto;
}

/* Typography overrides (Divi/theme sets link color and font via stylesheet — !important needed) */
#scrs-mega-menu-header-root .mega-menu .et_pb_text_inner p,
#scrs-mega-menu-header-root .mega-menu .et_pb_text_inner p a {
	font-size: 0.9375rem !important;
	line-height: 1.35 !important;
	color: #333333 !important;
	text-decoration: none;
}

#scrs-mega-menu-header-root .mega-menu .et_pb_text_inner h4 {
	font-weight: 600 !important;
	font-size: 1.125rem !important;
	line-height: 1.25;
	color: #000000;
	margin: 0.2em 0 0.25em !important;
}

#scrs-mega-menu-header-root .mega-menu .et_pb_text_inner p {
	margin-top: 0 !important;
	margin-bottom: 0.35em;
}

#scrs-mega-menu-header-root .mega-menu .et_pb_text_inner p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Mega panel show/hide + positioning
   ------------------------------------------------------------------------- */

body:not(.wp-admin) #scrs-mega-menu-header-root .mega-menu:not(.open) {
	opacity: 0;
	visibility: hidden;
}

#scrs-mega-menu-header-root .mega-menu {
	position: absolute !important;
	z-index: 99;
	transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out;
	width: 100% !important;
	max-width: 100vw;
	box-sizing: border-box;
	border-bottom: 1px solid rgba(0,49,129,0.21);
	margin-top: 1px;
	padding-top: 30px;
	padding-bottom: 30px;
}

#scrs-mega-menu-header-root .mega-menu.open {
	opacity: 1;
	visibility: visible;
	overflow: auto;
	max-height: 90vh;
}

#scrs-mega-menu-header-root .mega-menu .close {
	align-items: center;
	cursor: pointer;
	display: flex;
	height: 50px;
	justify-content: center;
	position: absolute;
	right: 50px;
	top: 15px;
	width: 40px;
	z-index: 100000;
}

#scrs-mega-menu-header-root .mega-menu button.close_icon {
	background-color: transparent;
	background-image: url(images/icon-close-x-blue.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	border: none;
	cursor: pointer;
	display: block;
	height: 25px;
	position: absolute;
	right: 4%;
	top: 1.25rem;
	width: 25px;
	z-index: 100000;
}

#scrs-mega-menu-header-root #scrs-mega-menu-top-bar button.burger {
	background-color: transparent;
	background-image: url(images/burger-blue.svg);
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	border: none;
	cursor: pointer;
	display: none;
	height: 20px;
	position: absolute;
	right: 25px;
	top: 45px;
	width: 20px;
	z-index: 100000;
}

#scrs-mega-menu-header-root #scrs-mega-menu-top-bar button.burger.open {
	background-image: url(images/icon-close-bar-blue.svg);
}

/* -------------------------------------------------------------------------
   Tablet
   ------------------------------------------------------------------------- */

@media (max-width: 1000px) {
	#scrs-mega-menu-header-root {
		left: 0;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar {
		background-color: #ffffff !important;
		position: relative;
		z-index: 100;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .mega_menu_nav_row {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-start !important;
		max-width: 100% !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column {
		float: none !important;
		margin: 0 !important;
		margin-right: auto !important;
		width: auto !important;
		flex: 0 0 auto !important;
		text-align: left !important;
		align-self: center !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column .et_pb_image_wrap,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column .et_pb_module {
		display: block !important;
		text-align: left !important;
		margin-left: 0 !important;
		margin-right: auto !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .logo_column img {
		height: 60px !important;
		width: auto !important;
		max-width: none !important;
		display: block !important;
		margin-left: 0 !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .nav_column {
		background-color: #fff;
		left: 0;
		right: 0;
		width: 100% !important;
		opacity: 0;
		padding: 15px 20px;
		position: fixed !important;
		top: 95px;
		transition: opacity 0.35s ease-in-out, visibility 0.35s ease-in-out;
		visibility: hidden;
		z-index: 200;
		box-sizing: border-box;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .nav_column.open {
		opacity: 1;
		visibility: visible;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar button.burger {
		display: block !important;
		position: absolute;
		right: 20px;
		top: 50%;
		transform: translateY(-50%);
	}

	#scrs-mega-menu-header-root .mega-menu button.close_icon {
		right: 23px;
		top: 20px;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar ul.menu li.menu-item,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar ul.menu li.menu-item > a,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .widget_nav_menu,
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar .menu-mega-menu-top-menu-container {
		display: block !important;
		width: 100% !important;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li {
		margin: 0;
	}
	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li a {
		border-bottom: 1px solid rgba(0, 0, 0, 0.09);
		color: #005481;
		display: block;
		font-size: 14px;
		font-weight: 500;
		margin: 0;
		padding: 10px 0;
		text-transform: uppercase;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.menu-item-has-mega a {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	#scrs-mega-menu-header-root #scrs-mega-menu-top-bar #menu-mega-menu-top-menu li.menu-item-has-mega a::after {
		content: '›';
		font-size: 20px;
		font-weight: 300;
		line-height: 1;
		flex-shrink: 0;
		margin-left: 10px;
		position: relative;
		top: 1px;
	}

	.widget_nav_menu {
		margin-bottom: 0 !important;
	}

	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row {
		flex-wrap: wrap !important;
	}

	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4 {
		flex: 0 0 50% !important;
		min-width: 50% !important;
		max-width: 50% !important;
	}

	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4:nth-child(2n) {
		border-right-width: 0 !important;
	}

	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4,
	#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column_1_4 {
		border-top: 1px solid rgba(0, 49, 129, 0.21);
	}

	#scrs-mega-menu-header-root .mega-menu > .mega_menu_nav_row:nth-child(2n) .et_pb_column_1_4:nth-child(-n+2) {
		border-top-width: 0 !important;
	}

	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row,
	#scrs-mega-menu-header-root .mega-menu > .et_pb_row,
	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4,
	#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column_1_4,
	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row:not(.et-last-child) .et_pb_column {
		border-bottom: none !important;
	}

	#scrs-mega-menu-header-root .mega-menu {
		position: absolute !important;
		z-index: 999;
		top: 70px;
	}

	#scrs-mega-menu-header-root .mega-menu.open {
		opacity: 1;
		visibility: visible;
	}
}

@media (max-width: 782px) {
	#scrs-mega-menu-header-root .mega-menu {
		top: 90px;
	}
}

@media (max-width: 767px) {
	#scrs-mega-menu-header-root .mega-menu .et_pb_image {
		display: none !important;
	}
}

@media (max-width: 479px) {
	#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4,
	#scrs-mega-menu-header-root .mega-menu > .mega_menu_nav_row:nth-child(2n) .et_pb_column_1_4:nth-child(-n+2) {
		flex: 0 0 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		border-right-width: 0 !important;
		border-top: 1px solid rgba(0, 49, 129, 0.21) !important;
		padding: 20px 0 30px !important;
	}

	#scrs-mega-menu-header-root .mega-menu > .mega_menu_nav_row:nth-child(2n) .et_pb_column_1_4:nth-child(-n+1) {
		border-top-width: 0 !important;
	}
}

/* -------------------------------------------------------------------------
   Images + Dipi buttons inside mega panels (override Divi/Dipi defaults)
   ------------------------------------------------------------------------- */

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .et_pb_module.et_pb_image,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .et_pb_module.et_pb_image {
	text-align: left;
	margin: 0;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .et_pb_image,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .et_pb_image {
	margin-bottom: 10px!important;
}

#scrs-mega-menu-header-root .mega-menu .dipi_button_grid_child .et_pb_module_inner {
	padding: 0 !important;
}

#scrs-mega-menu-header-root .mega-menu.open .et_pb_column {
	overflow: visible;
}

#scrs-mega-menu-header-root .mega-menu.open .et_pb_module.et_pb_image,
#scrs-mega-menu-header-root .mega-menu.open .et_pb_image_wrap,
#scrs-mega-menu-header-root .mega-menu.open .et_pb_image_wrap img {
	opacity: 1;
	visibility: visible;
}

#scrs-mega-menu-header-root .mega-menu.open .et_pb_image_wrap img {
	display: block;
	max-width: 100%;
	width: auto;
	height: auto;
}

/* Summit logos: equal height, left-aligned */
#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column .et_pb_module.et_pb_image .et_pb_image_wrap,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column .et_pb_module.et_pb_image .et_pb_image_wrap {
	height: 96px;
	max-height: 96px;
	min-height: 0;
	display: flex !important;
	align-items: center;
	justify-content: flex-start;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	align-self: stretch;
	margin-left: 0;
	margin-right: auto;
	text-align: left;
}

#scrs-mega-menu-header-root .mega-menu .mega_menu_nav_row .et_pb_column_1_4 .et_pb_module.et_pb_image .et_pb_image_wrap img,
#scrs-mega-menu-header-root .mega-menu > .et_pb_row .et_pb_column_1_4 .et_pb_module.et_pb_image .et_pb_image_wrap img {
	max-height: 96px !important;
	width: auto;
	height: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
	display: block !important;
	margin-left: 0;
	margin-right: auto;
}

/* -------------------------------------------------------------------------
   CTA buttons (Dipi plugin sets inline styles — !important needed for colors/border/padding)
   ------------------------------------------------------------------------- */

/* Suppress Divi's hover arrow on all mega menu buttons */
#scrs-mega-menu-header-root .mega-menu .et_pb_button.dipi-button-wrap::after {
	display: none !important;
}

/* CTA button (.scrs-mm-cta-button) */
#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-button .et_pb_button.dipi-button-wrap {
	background-color: #00b5e2 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 3px;
	padding: 10px 22px !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	line-height: 1.2;
	text-align: center;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-button .et_pb_button.dipi-button-wrap:hover {
	background-color: #f58220 !important;
}

/* CTA link (.scrs-mm-cta-link) */
#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-link .et_pb_button.dipi-button-wrap {
	background-color: transparent !important;
	color: #f58220 !important;
	border: none !important;
	border-radius: 0;
	padding: 8px 0 !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	line-height: 1.25;
	text-align: left;
	text-decoration: none;
}

#scrs-mega-menu-header-root .mega-menu .dipi-button-grid-container .scrs-mm-cta-link .et_pb_button.dipi-button-wrap:hover {
	background-color: transparent !important;
	color: #00b5e2 !important;
	text-decoration: none;
}
