/* Mega Menu Navigation Styles */

.nav-menu-bar {
  background: var(--green); /* Using project's green */
  position: sticky;
  top: 72px; /* Header height is 72px */
  border-bottom: 2px solid var(--yp);
  z-index: 10001; /* Slightly lower than header */
  overflow: visible;
}

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

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

.menu-item {
  position: relative;
  flex: 0 0 auto;
  display: flex;
}

/* Dual line separator between mega menu categories */
.menu-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -19px; /* Centered in the 35px gap */
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  border-right: 3px double rgba(255,255,255,0.25);
  pointer-events: none;
}

.menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  padding: 12px 10px;
  color: rgba(255,255,255,0.95);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'Hind Siliguri', sans-serif;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.menu-trigger::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.menu-item:first-child .menu-trigger {
  padding-left: 0;
}

.menu-item:last-child .menu-trigger {
  padding-right: 0;
}

.menu-trigger:hover,
.menu-item:hover .menu-trigger {
  background: var(--red);
  color: #fff;
}

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

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

.menu-trigger .arrow {
  font-size: 10px;
  margin-left: 2px;
  transition: transform 0.2s;
  opacity: 0.7;
}

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

/* ── DROPDOWN MEGA ── */
.mega-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 9999 !important;
  min-width: 650px; /* Slightly wider for better layout */
  padding: 30px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--yp);
  animation: dropIn 0.25s ease-out;
  pointer-events: auto;
}

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

/* Special alignment for items further right to prevent overflow */
.menu-item:nth-child(n+5) .mega-dropdown { 
    left: auto; 
    right: 0; 
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

.mega-header {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 15px;
  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: 5px;
  border-bottom: 2px solid var(--yp-light);
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--dark);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.4;
}

.sub-link:hover {
  color: var(--green);
  transform: translateX(4px);
}

.sub-link .dot {
  width: 5px; 
  height: 5px;
  background: var(--yp);
  border-radius: 50%;
  flex-shrink: 0;
}

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

.tag-hot {
  font-size: 9px;
  background: var(--yp);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 5px;
}

.mega-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  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;
}

.see-all:hover { 
    text-decoration: underline; 
}

/* 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;
    }
    .menu-item {
        flex: 0 0 auto;
    }
    .menu-trigger {
        padding: 12px 15px;
        font-size: 13px;
    }
    .mega-dropdown {
        min-width: 300px;
        position: fixed;
        left: 5%;
        right: 5%;
        top: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    .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;
    }
}
