/* Navigation Styles - Optimized for Performance */

/* Desktop Navigation */
header .menu {
  display: grid; 
  grid-template-columns: auto 1fr; 
  align-items: center; 
  font-size: 110%;
}

header .menu, 
header .menu a {
  color: var(--black); 
  font-weight: 600;
}

header .menu .links {
  display: inline-flex;
  justify-content: end;
  align-items: center;;
}

header .menu .links .first-level {
  display: inline-block; 
  position: relative; 
  cursor: pointer; 
  padding: .5em .75em;
}

header .menu .links .first-level.icon {
  display: inline-flex;
  justify-content: center;
  align-content: center;
}

header .menu .links .first-level.icon a {
  display: flex;
}


/* Dropdown Menus */
header .menu .links .first-level .second-level {
  position: absolute; 
  visibility: hidden; 
  background: white; 
  box-shadow: var(--box-shadow-xl); 
  text-align: center; 
  line-height: 1.2; 
  z-index: 10; 
  transition: all ease 0.1s; 
  top: 40px; 
  left: 50%; 
  transform: translate(-50%); 
  opacity: 0; 
  font-weight: 400; 
  color: #555; 
  width: 230px; 
  border-radius: var(--rounded-box); 
  overflow: hidden;
}

header .menu .links .first-level.more .second-level {
  right: 1em; 
  left: -3em;
}

header .menu .links .first-level .second-level a {
  display: block; 
  padding: .5em .5em;
  font-size: 90%; 
  font-weight: 600; 
  transition: all .25s ease; 
  max-width: 100%; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  border-radius: var(--rounded-box);
}

header .menu .links .first-level:hover .second-level {
  visibility: visible; 
  opacity: 1;
}

/* Groups Dropdown */
header .menu .links .first-level.groups .second-level { 
  width: 740px; 
  display: grid; 
  grid-template-columns: 1.5fr 1.75fr 3fr; 
  text-align: left; 
  grid-gap: 10px; 
  padding: 0; 
  border-radius: var(--rounded-box); 
  box-sizing: border-box;
}

header .menu .links .first-level.groups .second-level .column {
  padding: .25em 0 .25em 1.5em; 
  display: grid; 
  align-content: baseline;
}

header .menu .links .first-level.groups .second-level .column.classes {
  margin-right: 1em;
}

header .menu .links .first-level.groups .second-level .column h3 {
  margin-top: 1.5em;
}

header .menu .links .first-level .second-level .column.light-gray-100-bg a.hover-nav:hover {
  background-color: var(--light-gray-400);
}

header .menu .groups .column .class-wrap { 
  display: grid; 
}

header .menu .groups .column .class-wrap a { 
  display: grid; 
  grid-template-columns: 24px 1fr; 
  padding: 1em 1em 1.5em 1em; 
  grid-gap: 20px; 
  align-items: center;
}

header .menu .groups .column .class-wrap a .class-wrap--icon svg {
  width: 100%; 
  height: auto;
}

.class-wrap--icon, 
.class-wrap--text {
  display: grid; 
  white-space: normal; 
  overflow: visible; 
  text-overflow: initial;
}

header .menu .column a.maps {
  display: inline-flex !important; 
  align-items: center; 
  width: auto; 
  max-width: fit-content !important; 
  padding-right: 1.5em !important;
}

header .menu .column .maps svg {
  width: 20px; 
  margin-right: 5px;
}

/* Sermons Dropdown */
header .menu .links .first-level.sermons .second-level { 
  width: 600px; 
  display: grid; 
  grid-template-columns: 3fr 4fr; 
  text-align: left; 
  grid-gap: 10px; 
  padding: 0; 
  border-radius: var(--rounded-box); 
  box-sizing: border-box;
}

header .menu .links .first-level.sermons .second-level .column {
  padding: .25em 0 .25em 1.5em; 
  display: grid; 
  align-content: end;
}

header .menu .links .first-level.sermons .second-level .latest-sermon.column a {
  height: 100%; 
  display: grid; 
  white-space: normal; 
  overflow: visible; 
  text-overflow: initial;
}

/* Events Dropdown */
header .menu .links .first-level.events .second-level { 
  width: 400px; 
  display: grid; 
  grid-template-columns: 1fr; 
  text-align: left; 
  grid-gap: 10px; 
  padding: 0; 
  border-radius: var(--rounded-box); 
  box-sizing: border-box;
}

header .menu .links .first-level.events .second-level .column {
  padding: 0; 
  display: grid; 
  align-content: baseline;
}

header .menu .events .column .event-wrap { 
  display: grid; 
  border-bottom: 1px solid #EAEAEA;
}

header .menu .events .column .event-wrap:last-child { 
  border-bottom: 0;
}

header .menu .events .column .event-wrap:nth-child(n+7) {
  display: none;
}

header .menu .events .column .event-wrap a { 
  display: grid; 
  grid-template-columns: auto 1fr auto; 
  padding: 1em; 
  grid-gap: 10px; 
  align-items: center;
}

header .menu .events .column .event-wrap a .event-wrap--img img {
  width: 100%; 
  height: auto;
}

header .menu .events .column .event-wrap a .event-wrap--text {
  display: grid; 
  white-space: normal; 
  overflow: visible; 
  text-overflow: initial;
}  

header .menu .events .column .event-wrap a .event-wrap--icon svg {
  width: 30px; 
  color: var(--dark-gray);
}

/* Mobile Navigation */
header.mobile .menu {
  display: grid; 
  grid-template-columns: auto 1fr auto; 
  padding: 0; 
  border-bottom: var(--light-border);
}

header.mobile .menu .hamburger {
  padding-left: 1em;
  display: flex; 
  align-content: center; 
  cursor: pointer;
}

header.mobile .menu .logo {}

header.mobile .menu .logo a {
  height: 100%;
  display: inline-block;
  padding: 1em 1em 0; 
  text-align: center; 
  width: 100%;
}

header.mobile .menu .logo img {
  width: 184px;
}

header.mobile .menu .hamburger svg {
  width: 40px;
}

header.mobile .menu .action {
  padding-right: 1em; 
  display: flex; 
  align-content: center;
}

header.mobile .menu .action svg {
  width: 40px;
}

/* Mobile Menu Reveal */
header.mobile #menuRevealed { 
  opacity: 0; 
  transition: ease all 0.1s; 
}

header.mobile #menuRevealed.reveal-menu.active { 
  opacity: 1;
}

header.mobile .reveal-menu {
  height: 0; 
  overflow: hidden; 
  position: fixed; 
  width: 100%;  
  top: 0; 
  left: 0; 
  bottom: 0; 
  z-index: 50;
}

header.mobile .reveal-menu.active {
  height: 100%; 
  min-height: 100vw;
}

header.mobile .reveal-menu .background {
  position: absolute; 
  top: 0; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  background: rgba(0,0,0,.5); 
  backdrop-filter: blur(30px); 
  width: 100%; 
  min-height: 100vw; 
  z-index: 40;
}

header.mobile .reveal-menu .menu-wrap {
  left: -300px; 
  transition: all ease 0.1s;
}

header.mobile .reveal-menu.active .menu-wrap {
  left: 0; 
  transition: all ease 0.1s;
  background: white; 
  z-index: 50; 
  position: absolute; 
  top: 0; 
  min-height: 100vw; 
  bottom: 0; 
  max-width: 85%; 
  min-width: 85%;
}

header.mobile .reveal-menu .close {
  position: absolute; 
  top: 1em; 
  right: 1em; 
  cursor: pointer;
}

header.mobile .reveal-menu .links {
  padding: 50px 50px 0; 
  font-size: 140%; 
  color: var(--black); 
  font-weight: 800;
}

header.mobile .reveal-menu .links a {
  color: var(--black);
}

header.mobile .reveal-menu .links .second-level {
  display: none;
}

header.mobile .reveal-menu .sub.links {
  padding: 25px 0 0 50px; 
  font-size: 120%; 
  color: var(--black); 
  font-weight: 800;
}

/* Responsive Breakpoints */
@media only screen and (max-width: 1150px) { 
  header.mobile {
    display: block;
  }
  header.desktop {
    display: none;
  }
} 

@media only screen and (min-width: 1151px) {
  header.mobile {
    display: none;
  }
  header.desktop {
    display: block;
  }
} 

@media only screen and (max-width: 1500px) { 
  #wpadminbar { 
    position: fixed!important; 
    display: none;
  } 
}
