/*Begin Standard Navigation*/
.c-site-header__standard-navigation .menu[data-depth="1"] button.menu__link span.text {
	font-weight: var(--tme-fw-bold) !important;
}

/*Remove cursor on button hover*/
.c-site-header__standard-navigation .menu[data-depth="1"] button.menu__link:hover {
    cursor: default;
    text-decoration: none !important;
}

/*Top Arrow for 2nd level menus*/
.c-site-header__standard-navigation .menu[data-depth="1"].open {
    top: calc(100% + 2rem);
}

/*Display dropdown menus vertically*/
.c-site-header__standard-navigation .menu[data-depth="1"] {
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  left: auto;
}


/*Equal columns*/
.c-site-header__standard-navigation 
.menu[data-depth="1"]:has(button.menu__link) > .menu__item {
  flex: 1 1 0;
}

/*Vertical menu widths.*/
.c-site-header__standard-navigation .menu[data-depth="1"]:not(:has(button.menu__link)) {
  width: max-content;
  min-width: 260px;
}

/*This keeps it so that columns still work with the vertical menus.*/
.c-site-header__standard-navigation 
.menu[data-depth="1"]:has(button.menu__link) {
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
}


@media (min-width: 1310px) {
	.c-site-header__standard-navigation .region__name--navigation-standard, .c-site-header__standard-navigation .site-header__navigation, .c-site-header__standard-navigation .site-header__menu-main, .c-site-header__standard-navigation .c-menu--navigation, .c-site-header__standard-navigation .menu--main[data-depth="0"], .c-site-header__standard-navigation .menu__item, .c-site-header__standard-navigation button.menu__link {
	 height: auto;
	}
}

/*Spacing for menu*/
.c-site-header__standard-navigation .menu[data-depth="2"] {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
}

/*Menu Font Weight*/
.c-site-header__standard-navigation .menu[data-depth="1"] > .menu__item > [tabindex="0"] > .text {
    font-weight: normal;
    margin-bottom: 0;
}

/*No Underline on Menu Hover*/
.c-site-header__standard-navigation a.menu__link:hover, .c-site-header__standard-navigation button.menu__link:hover, .c-site-header__standard-navigation a.menu__link, .c-site-header__standard-navigation button.menu__link {
    text-decoration: none;
}

/*Top level and column headers text weight*/
.c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > button.menu__link > .text, .c-mega-menu .menu[data-depth="0"] > .menu__item > button.menu__link, .c-site-header__standard-navigation .menu[data-depth="1"] button.menu__link, .c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > .menu__link > .text {
    font-weight: var(--tme-fw-bold);
    font-family: var(--tme-ff-body);
}

/*Column Title Underline*/
.c-site-header__standard-navigation .menu[data-depth="1"] button.menu__link {
    border-bottom: 3px solid var(--tme-color-primary-1);
    width: 100%;
    text-align: left;
}

/*Underline on Hover*/
.c-site-header__standard-navigation a.menu__link, .c-site-header__standard-navigation button.menu__link {
  position: relative;
}

/* Underline attached to the text width */
.c-site-header__standard-navigation a.menu__link:not(.is-active)::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--tme-color-primary-1);
    transition: width 0.5s ease-in-out;
}

/*Hover effect for top level menu items*/
.c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > a.menu__link:hover::before, .c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > button.menu__link:hover::before {
    width: 100%;
}
.c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > a.menu__link::before, .c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item > button.menu__link::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--tme-color-primary-1);
    border-radius: 0;
    transition: width 0.5s ease-in-out;
}

/* Prevent hover underline on active menu items */
.c-site-header__standard-navigation  a.menu__link.is-active::before, .c-site-header__standard-navigation  .menu__item--active-trail > a.menu__link::before, .c-site-header__standard-navigation .menu__item--active-trail > button.menu__link::before {
  width: 0 !important;
}

/* Animate on hover/focus */
.c-site-header__standard-navigation a.menu__link:hover::before, .c-site-header__standard-navigation a.menu__link:focus-visible::before, .c-site-header__standard-navigation button.menu__link:hover::before {
  width: 100%;
}

/*Background color for active pages on 2nd level menus*/
.c-site-header__standard-navigation .menu[data-depth="1"] a.menu__link.is-active {
  background-color: var(--tme-color-primary-1);
  color: #ffffff;
  padding: 5px;
  width: 100%;
}

/*Border bottom for active pages on top level menu*/
.c-site-header__standard-navigation .menu[data-depth="0"] a.menu__link.is-active {
  border-bottom: 3px solid var(--tme-color-primary-1);
  width: 100%;
}

/*Background color for hovering pages*/
.c-site-header__standard-navigation a.menu__link:hover, .c-site-header__standard-navigation a.menu__link:focus-visible {
  background-color: var(--tme-color-silver);
  width: 100%;
  color: #000000;
}

/*Top-level menu underline when a sub-page is active */
.c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item.menu__item--active-trail > button.menu__link {
	border-bottom: 3px solid var(--tme-color-primary-1);
}

/* Allow standard navigation dropdowns to extend over page content */
@media (min-width: 1310px) {
	/* Allow navigation dropdowns to extend beyond the header */
	.c-site-header__masthead {
	    position: relative;
	    z-index: auto;
	    overflow: visible !important;
	}
	
	/* Prevent navigation containers from clipping dropdowns */
	.c-site-header__masthead .c-site-header__inner,
	.c-site-header__standard-navigation,
	.c-site-header__standard-navigation .site-navigation,
	.c-site-header__standard-navigation .site-header__navigation,
	.c-site-header__standard-navigation .site-header__menu-main,
	.c-site-header__standard-navigation .c-menu--navigation,
	.c-site-header__standard-navigation .menu[data-depth="0"],
	.c-site-header__standard-navigation .menu[data-depth="0"] > .menu__item {
	    overflow: visible !important;
	}
	
	/* Keep the expanded dropdown above other header elements */
	.c-site-header__standard-navigation .menu[data-depth="1"].open {
	    z-index: 20;
	    overflow: visible !important;
	}
}

/*End Standard Navigation*/


/*Start Mega Menu Navigation*/

/* Keep mega menus centered */
.c-site-header__standard-navigation 
.menu[data-depth="1"]:has(button.menu__link) {
  left: 50%;
  transform: translateX(-50%);
}

/*Tablet Bottom Padding*/
.c-mega-menu {
    padding-bottom: 24px;
}

/* Tab list styling */
.c-mega-menu .tab-list {
    justify-content: space-evenly;
    border: none;
}

/*Remove underlines on hover*/
.c-mega-menu a.menu__link, .c-mega-menu button.menu__link, .c-mega-menu a.menu__link:hover, .c-mega-menu button.menu__link:hover {
    text-decoration: none;
}

/*Font styling for headers*/
.c-mega-menu li.tab-item, .c-mega-menu .tab-list .menu__link, .c-mega-menu .menu[data-depth="1"] button.menu__link{
  font-size: var(--tme-fs-body-18);
  line-height: var(--tme-lh-body-18);
	font-family: var(--tme-ff-body);
  font-weight: var(--tme-fw-bold);
}

/*Font styling for menu items*/
.c-mega-menu .menu__link {
  font-size: var(--tme-fs-body-18) !important;
  line-height: var(--tme-lh-body-18) !important;
	font-family: var(--tme-ff-body) !important;
  color: var(--tme-color-gray-700) !important;
}

/*Column Title Underline*/
.c-mega-menu .menu[data-depth="1"] button.menu__link {
	border-bottom: 3px solid var(--tme-color-primary-1);
	width: 100%;
}

/*Menu item top spacing*/
.c-mega-menu .menu[data-depth="2"] {
  margin-top: 8px;
}

/*Mobile menu sub menu indent*/
@media(max-width: 767px){
.c-mega-menu .menu[data-depth="2"] {
  padding-left: 1rem;
	}
}

/*This is the tablet view so the non column menus go veritically.*/
.c-mega-menu .menu[data-depth="1"]:not(:has(button.menu__link)) {
	gap: 8px;
	flex-direction: column;
  align-items: flex-start;
  padding-left: 1rem;
}

/*Link hover effect*/
.c-mega-menu a.menu__link, .c-site-header__standard-navigation button.menu__link {
    position: relative;
}
.c-mega-menu .menu__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0 !important;
    width: 0;
    background-color: var(--tme-color-primary-1) !important;
    border-radius: 0;
    transition: width 0.5s ease-in-out;
}

/* Background color for active page*/
.c-mega-menu .menu__link.is-active {
  background-color: #eeeeee;
  padding: 5px !important;
  width: 100%;
}

/* Allow tablet mega menu to extend over page content */
@media (min-width: 768px) and (max-width: 1309px) {
  /* Avoid clipping the expanded mega menu */
  .c-site-header:has(.c-site-header__navigation.mega[aria-hidden="false"]) {
      overflow: visible !important;
  }

  /* Keep expanded mega menu above neighboring header sections */
  .c-site-header__navigation.mega[aria-hidden="false"] {
      z-index: 20;
      overflow: visible !important;
  }

  /* Prevent menu containers from clipping menu items */
  .c-site-header__navigation.mega .c-site-header__inner,
  .c-site-header__navigation.mega .region__name--navigation-mega,
  .c-site-header__navigation.mega .site-header__menu-main,
  .c-site-header__navigation.mega .c-mega-menu {
      overflow: visible !important;
  }
}

/*End Mega Menu Navigation*/


/*Begin Header & Admin Menu Stacking*/

/* Default header sits above ordinary page content. */
.c-site-header {
    position: relative;
    z-index: 10;
}

/* Leave Drupal's main toolbar and Gin's secondary toolbar
   at their native z-index values. Do not override
   #toolbar-administration or #toolbar-administration-secondary. */

/* Do not clip contextual links inside the site header. */
.c-site-header .contextual-region {
    overflow: visible !important;
}

/* Elevate the header when one of its contextual edit menus is open. */
.c-site-header:has(.contextual.open) {
    z-index: 1000 !important;
}

/* Elevate only the containers that hold an open contextual menu. */
.c-site-header__masthead:has(.contextual.open),
.c-site-header__inner:has(.contextual.open),
.c-site-header .contextual-region:has(.contextual.open) {
    position: relative;
    z-index: 100 !important;
    overflow: visible !important;
}

.c-site-header .contextual.open {
    z-index: 101 !important;
}

/* On desktop, raise the entire header only while a dropdown is open. */
@media (min-width: 1310px) {
    .c-site-header:has(
        .c-site-header__standard-navigation .menu[data-depth="1"].open
    ) {
        z-index: 1000 !important;
    }
}

/* On tablet and mobile, raise the header only when mega navigation is open. */
@media (max-width: 1309px) {
    .c-site-header:has(
        .c-site-header__navigation.mega[aria-hidden="false"]
    ) {
        z-index: 1000 !important;
    }
}

/* Give the expanded mobile mega menu a viewport-sized scroll area
   so longer lists don't vanish where the footer begins. */
@media (max-width: 767px) {
    .c-site-header__navigation.mega[aria-hidden="false"] {
        z-index: 20;
        height: auto !important;
        max-height: calc(100dvh - 10rem);
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
    }
}


/* Keep Drupal and Gin administrative menus above the website header.
   Preserve their native fixed/sticky positioning: do NOT add position: relative. */
#toolbar-administration {
    z-index: 2000 !important;
}

.gin-secondary-toolbar,
.gin-secondary-toolbar--frontend {
    z-index: 1900 !important;
}

/*End Header & Admin Menu Stacking*/
