/**
 * Stylesheet: Header Multi-Level Services Mega Dropdown
 * Location: /mansi/assets/css/header_megamenu.css
 * Project: soulguidedbymansi | Inner Light Healing
 * Timezone: Asia/Kolkata (Indian Standard Time)
 */

/* Nav Dropdown Parent Position */
.nav-services-dropdown-parent {
  position: relative;
  display: inline-block;
}

/* Mega Menu Container */
.services-mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-35%);
  width: 680px;
  background: #ffffff;
  border: 1px solid #ebd9bf;
  border-top: 3px solid #b47a18;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(60, 36, 14, 0.22);
  z-index: 9999;
  overflow: hidden;
  animation: megaMenuFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes megaMenuFadeIn {
  from {
    opacity: 0;
    transform: translateX(-35%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-35%) translateY(0);
  }
}

/* Hover trigger for desktop */
.nav-services-dropdown-parent:hover .services-mega-menu,
.nav-services-dropdown-parent:focus-within .services-mega-menu {
  display: block;
}

/* Mega Menu Split Layout: Left Categories + Right Services */
.mega-menu-body {
  display: flex;
  min-height: 290px;
  max-height: 420px;
}

/* Left Column: Categories List */
.mega-categories-column {
  width: 270px;
  background: #fdfaf6;
  border-right: 1px solid #ebd9bf;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}

.mega-categories-header {
  padding: 8px 18px 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #b47a18;
  border-bottom: 1px dashed #ebd9bf;
  margin-bottom: 4px;
}

.mega-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  color: #3b2814;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border-left: 3px solid transparent;
}

.mega-cat-item:hover,
.mega-cat-item.active {
  background: #f4e8d3;
  color: #2e1d0c;
  border-left-color: #b47a18;
}

.mega-cat-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-cat-icon {
  font-size: 16px;
}

.mega-cat-count {
  background: rgba(180, 122, 24, 0.14);
  color: #7b4d17;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.mega-cat-arrow {
  color: #b47a18;
  font-size: 14px;
  transition: transform 0.18s ease;
}

.mega-cat-item:hover .mega-cat-arrow,
.mega-cat-item.active .mega-cat-arrow {
  transform: translateX(3px);
}

/* Right Column: Services Panels */
.mega-services-column {
  flex: 1;
  background: #ffffff;
  padding: 14px 18px;
  overflow-y: auto;
}

.mega-services-panel {
  display: none;
  animation: panelFade 0.2s ease;
}

.mega-services-panel.active {
  display: block;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #f0e4d2;
}

.mega-panel-title {
  font-family: Georgia, serif;
  font-size: 15px;
  color: #2e1d0c;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mega-view-cat-link {
  font-size: 11.5px;
  color: #b47a18;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s;
}

.mega-view-cat-link:hover {
  color: #7b4d17;
  text-decoration: underline;
}

.mega-services-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #fdfbf7;
  border: 1px solid #ebd9bf;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mega-service-link:hover {
  background: #faf3e5;
  border-color: #b47a18;
  transform: translateX(3px);
  box-shadow: 0 3px 8px rgba(180, 122, 24, 0.1);
}

.mega-svc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.mega-svc-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #faf3e6 0%, #f4e4c7 100%);
  border: 1px solid #ecc98a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #7b4d17;
  flex-shrink: 0;
}

.mega-svc-text {
  display: flex;
  flex-direction: column;
}

.mega-svc-title {
  font-size: 13px;
  font-weight: 600;
  color: #2e1d0c;
  line-height: 1.2;
}

.mega-svc-meta {
  font-size: 11px;
  color: #7b4d17;
  margin-top: 2px;
}

.mega-svc-arrow {
  color: #b47a18;
  font-size: 12px;
  font-weight: bold;
}

/* Mega Menu Bottom Bar */
.mega-menu-footer {
  background: #faf5ed;
  border-top: 1px solid #ebd9bf;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mega-footer-link {
  font-size: 12px;
  font-weight: 700;
  color: #7b4d17;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mega-footer-link:hover {
  color: #b47a18;
  text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .services-mega-menu {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
  .mega-menu-body {
    flex-direction: column;
    max-height: none;
  }
  .mega-categories-column {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ebd9bf;
  }
  .mega-services-column {
    width: 100%;
    padding: 10px;
  }
}
