/**
 * Mega Navigation Styles
 * Desktop: Full-width mega menu with cards
 * Mobile: Slide-in drawer
 */

/* ============================================
   SHARED STYLES
   ============================================ */

.mega-navigation-wrapper {
  position: relative;
  color: white;
  margin-left: auto !important;
}
/* Reset default list styles */
.mega-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-nav a {
  text-decoration: none;
  color: inherit;
}


/* ============================================
   COMPANY DROPDOWN (Single Column Variant)
   ============================================ */

/* Add a modifier class for single-column menus */
.mega-menu--single-column .mega-menu__container {
  grid-template-columns: 1fr; /* Single column instead of 2 */
  max-width: 400px; /* Narrower than Services */
  gap: 0; /* No gap between items for tighter spacing */
}

.mega-menu--single-column .mega-menu__card {
  padding: 12px 16px;   gap: 12px;  border-right: none; 
}

.mega-menu--single-column .mega-menu__card:hover {
  background: #f9fafb;
}

.mega-menu--single-column .mega-menu__title {
  margin: 0;
}

.mega-menu--single-column .mega-menu__description {
  display: none;
}

.mega-menu--single-column .mega-menu__icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

.mega-menu--single-column .mega-menu__icon svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */

.mega-nav--desktop {
  display: none;
}

@media (min-width: 1024px) {
  .mega-nav--desktop {
    display: block;
  }

  .mega-nav--mobile {
    display: none;
  }
}

.mega-nav__container {
  max-width: 1400px;
  margin: 0 auto;
}

.mega-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mega-nav__item {
  position: relative;
  list-style: none;
}

.mega-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  transition: color 0.2s ease;
  cursor: pointer;
}





/* Chevron icon */
.mega-nav__chevron {
  transition: transform 0.2s ease;
}

.mega-nav__item.is-open .mega-nav__chevron {
  transform: rotate(180deg);
}

/* ============================================
   ACTIVE/CURRENT PAGE STATES
   ============================================ */

/* Desktop active navigation item */
.mega-nav__item.current-menu-item > .mega-nav__link {
  color: #000000;
  background: #ffffff;
  border-radius: 999px;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Mobile active navigation item */
.mobile-menu__item.current-menu-item > .mobile-menu__link {
  color: #000000;
  background: #ffffff;
  border-radius: 999px;
  padding-left: 1rem;
  padding-right: 1rem;
  font-weight: 600;
}
/* ============================================
   MEGA MENU DROPDOWN (Full Width)
   ============================================ */


.mega-menu.is-visible {
  display: block; /* show menu */
  visibility: visible;
  position: fixed;
  opacity: 1; /* animate fade in */
  background: #ffffff;
  margin: 0 auto 0 auto;
  max-width: 1280px;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);

}

/* .mega-menu__container {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  position: relative;
} */

.mega-menu__container::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px; /* thickness */
  background-color: #D2D7DC; /* your custom color */
  transform: translateX(-50%);
}


.mega-menu__card:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.mega-menu__content {
  flex: 1;
}

.mega-menu__title {
  margin: 0 0 0.5rem;
  font-size: 20px;
  font-weight: 700;
  color: #4b5563;
}

.mega-menu__description {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}
.mega-menu_heading {
  font-size: 3rem;
  font-family: var(--wp--preset--font-family--acumin-pro-extracondensed);
   color: var(--wp--preset--color--font-secondary-lighter);
}
/* ============================================
   MOBILE NAVIGATION
   ============================================ */

.mega-nav--mobile {
  display: block;
}

@media (min-width: 1024px) {
  .mega-nav--mobile {
    display: none;
  }
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.mobile-toggle:hover,
.mobile-toggle:focus {
  color: #0066cc;
}

.mobile-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 24px;
}

.mobile-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.mobile-toggle.is-active .mobile-toggle__line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.is-active .mobile-toggle__line:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.is-active .mobile-toggle__line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 400px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  right: 0;
}

.mobile-drawer__header {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.mobile-drawer__close:hover,
.mobile-drawer__close:focus {
  background: #f3f4f6;
  color: #1a1a1a;
}

.mobile-drawer__content {
  padding: 1rem;
}

/* Mobile Menu Items */
.wp-block-group ul.mobile-menu {
  padding-left: 0 !important;
}
.mobile-menu__item {
  position: relative;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-menu__item:last-child {
  border-bottom: none;
}

.mobile-menu__link {
  display: block;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a !important;
  transition: color 0.2s ease;
}

.mobile-menu__link:hover,
.mobile-menu__link:focus {
  color: #0066cc;
}

/* Submenu Toggle Button */
/* .mobile-menu__item.has-children {
  display: flex;
  align-items: center;
  justify-content: space-between;
} */

.mobile-menu__toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
  position: absolute;
  right: 0;
    top: 8px;
}

.mobile-menu__toggle:hover,
.mobile-menu__toggle:focus {
  background: #f3f4f6;
  color: #1a1a1a;
}

.mobile-menu__item.is-open .mobile-menu__toggle {
  transform: rotate(180deg);
}

/* Mobile Submenu (Accordion) */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-submenu__item {
  border-top: 1px solid #f3f4f6;
}

.mobile-submenu__link {
  display: flex;
  gap: 1rem;
  padding: 1rem 0 1rem 1rem;
  transition: background 0.2s ease;
}

.mobile-submenu__link:hover,
.mobile-submenu__link:focus {
  background: #f9fafb;
}

.mobile-submenu__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 8px;
  color: #0066cc;
}

.mobile-submenu__icon svg {
  width: 20px;
  height: 20px;
}

.mobile-submenu__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-submenu__title {
  font-size: 0.938rem;
  font-weight: 500;
  color: #1a1a1a;
}

.mobile-submenu__description {
  font-size: 0.813rem;
  line-height: 1.4;
  color: #6b7280;
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 9999;
}

.mobile-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   EDITOR PLACEHOLDER
   ============================================ */

.mega-nav-placeholder {
  padding: 2rem;
  background: #f3f4f6;
  border: 2px dashed #9ca3af;
  border-radius: 8px;
  text-align: center;
}

.mega-nav-placeholder p {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.mega-nav-placeholder small {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus visible styles */
.mega-nav__link:focus-visible,
.mega-menu__card:focus-visible,
.mobile-toggle:focus-visible,
.mobile-drawer__close:focus-visible,
.mobile-menu__link:focus-visible,
.mobile-menu__toggle:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

/* Skip to content (if needed) */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0066cc;
  color: #ffffff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
}

.skip-to-content:focus {
  top: 0;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .mobile-drawer {
    width: 50%;
    max-width: 500px;
  }
}

/* Large desktop adjustments */
@media (min-width: 1400px) {
  .mega-menu__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
