/* Mega Menu Navigation Styles */

.nav-menu-bar {
  background: linear-gradient(90deg, #113c20 0%, #1b6b3a 50%, #113c20 100%);
  position: sticky;
  top: 72px; /* Header height is 72px */
  border-bottom: 2px solid #d97706; /* Golden yellow accent line */
  z-index: 10001; /* Slightly lower than header */
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.menu-bar-inner {
  max-width: 1480px; /* Matching project container width */
  margin: 0 auto;
  display: flex;
  justify-content: center; /* Centered layout for listing site */
  gap: 15px; /* Refined spacing between tabs */
  align-items: center;
  padding: 0 16px; /* 16px padding matching container layout */
  overflow: visible;
  height: 48px;
}

.menu-bar-inner::-webkit-scrollbar {
  display: none;
}

.menu-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'Hind Siliguri', sans-serif;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  border-radius: 30px; /* Pill layout on hover */
}

.menu-trigger::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #fbbf24;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateX(-50%);
  border-radius: 3px;
}

.menu-trigger:hover,
.menu-item:hover .menu-trigger {
  background: rgba(255, 255, 255, 0.1); /* Soft glassy highlight */
  color: #ffffff;
}

.menu-trigger:hover::after,
.menu-item:hover .menu-trigger::after {
  width: 60%;
}

.menu-trigger .icon { 
  font-size: 15px; 
}

.menu-trigger .arrow {
  margin-left: 2px;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 0.8;
  font-size: 10px;
}

.menu-item:hover .menu-trigger .arrow { 
  transform: rotate(180deg); 
  color: #fbbf24;
}

/* ── DROPDOWN MEGA ── */
.mega-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px); /* Float dropdown slightly below menu bar */
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 16px; /* Smooth rounded corners */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 9999 !important;
  min-width: 680px; /* Refined layout width */
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 3px solid #d97706; /* Golden top header line */
  animation: dropIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

/* Upward indicator caret arrow */
.mega-dropdown::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #d97706 transparent;
  pointer-events: none;
}

/* Pseudo-element to bridge hover gap */
.mega-dropdown::after {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 15px;
  background: transparent;
}

/* Specific alignments for menus on the edges to prevent boundary cutoff */
.menu-item:nth-child(n+5) .mega-dropdown { 
  left: auto;
  right: 0;
  transform: none;
}
.menu-item:nth-child(n+5) .mega-dropdown::before {
  left: auto;
  right: 40px;
  transform: none;
}

.menu-item:first-child .mega-dropdown {
  left: 0;
  transform: none;
}
.menu-item:first-child .mega-dropdown::before {
  left: 40px;
  transform: none;
}

@keyframes dropIn {
  from { 
    opacity: 0; 
    transform: translate(-50%, 10px) scale(0.96); 
  }
  to   { 
    opacity: 1; 
    transform: translate(-50%, 0) scale(1); 
  }
}

/* Adjust dropIn keyframe override for edge-aligned dropdowns */
.menu-item:nth-child(n+5):hover .mega-dropdown {
  animation: dropInRight 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-item:first-child:hover .mega-dropdown {
  animation: dropInLeft 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropInRight {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dropInLeft {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-item:hover .mega-dropdown { 
  display: block; 
}

/* Simple dropdown style */
.simple-dropdown {
  min-width: 320px;
}

.mega-header {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
  font-weight: 700;
}

.mega-cols {
  display: grid;
  gap: 20px;
}

.mega-cols.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mega-cols.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mega-cols.cols-4 { grid-template-columns: repeat(4, 1fr); }

.mega-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(27, 107, 58, 0.1);
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--mid);
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  line-height: 1.4;
  border-radius: 6px;
}

.sub-link:hover {
  color: var(--green);
  background-color: rgba(27, 107, 58, 0.05);
  transform: translateX(4px);
}

.sub-link .dot {
  width: 5px; 
  height: 5px;
  background: #cbd5e1; /* Soft gray slate */
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.sub-link:hover .dot {
  background: var(--yp);
  transform: scale(1.3);
}

/* Tags */
.tag-new {
  font-size: 8.5px;
  background: var(--red);
  color: white;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 5px;
}

.tag-hot {
  font-size: 8.5px;
  background: #d97706;
  color: white;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 5px;
}

.mega-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: flex-end;
}

.see-all {
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.see-all:hover { 
  color: #113c20;
  transform: translateX(2px);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
  .nav-menu-bar {
    top: 64px; /* Updated header height on mobile */
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
  }
  .nav-menu-bar::-webkit-scrollbar {
    height: 3px;
  }
  .nav-menu-bar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
  }
  .menu-bar-inner {
    max-width: none;
    padding: 0 10px;
    justify-content: flex-start;
    gap: 0;
    overflow: visible !important;
    height: 44px;
  }
  .menu-item {
    flex: 0 0 auto;
  }
  .menu-trigger {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .mega-dropdown {
    min-width: 300px;
    position: fixed;
    left: 5%;
    right: 5%;
    top: auto;
    max-height: 80vh;
    overflow-y: auto;
    transform: none !important;
  }
  .mega-dropdown::before, .mega-dropdown::after {
    display: none !important;
  }
  .mega-cols.cols-3, .mega-cols.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mega-cols.cols-2, .mega-cols.cols-3, .mega-cols.cols-4 {
    grid-template-columns: 1fr;
  }
}
