/* Reset navbar link styles to prevent inheritance from style.css */
.navbar li {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
}

/* Override base style.css with higher specificity */
nav.navbar {
  overflow: visible !important;
}

nav.navbar a {
  float: none !important;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  font-size: 13px;
  gap: 6px;
  margin: 0;
  padding: 8px 20px;
  background-color: #efe9df;
  border-bottom: 1px solid #d5dde5;
  color: #5d6d7e;
}

.breadcrumb a {
  text-decoration: none;
  color: #1a6fb5;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: #c0392b;
}

/*------------------------------------------------------------------------------------------*/
/* Top Navigation Bar                                                                        */
/*------------------------------------------------------------------------------------------*/
.navbar {
  background: linear-gradient(135deg, #1a5276 0%, #1a6fb5 50%, #2180c7 100%);
  border-bottom: 3px solid #c0392b;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  position: sticky;
  top: 0;
  z-index: 9999;
  overflow: visible !important;
  width: 1200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar > ul {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar > ul > li {
  position: relative;
}

.navbar a {
  display: block;
  padding: 14px 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease;
}

/* Hover on top-level items */
.navbar > ul > li:hover > a {
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Active indicator line under nav items */
.navbar > ul > li:hover > a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #faf6f0;
}

/*------------------------------------------------------------------------------------------*/
/* Regular Dropdown Menu (for Toxins, Lab Tests)                                             */
/*------------------------------------------------------------------------------------------*/
.navbar .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #faf6f0;
  min-width: 240px;
  width: auto;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 10000;
  border: 1px solid #d5dde5;
  border-top: 3px solid #1a6fb5;
  border-radius: 0 0 6px 6px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Show dropdown on hover */
.navbar > ul > li:hover > .dropdown {
  display: block !important;
}

.navbar .dropdown li {
  margin: 0;
  padding: 0;
  display: block;
  width: auto;
  position: relative;
}

.navbar .dropdown li a {
  padding: 9px 28px 9px 16px;
  font-size: 14px;
  text-align: left !important;
  white-space: nowrap;
  display: block;
  color: #2c3e50;
  position: relative;
  z-index: 1;
  font-weight: 400;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .dropdown li a:hover {
  background-color: #efe9df;
  color: #1a5276;
}

/*------------------------------------------------------------------------------------------*/
/* Mega Menu                                                                                 */
/*------------------------------------------------------------------------------------------*/
.mega-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #faf6f0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  border: 1px solid #d5dde5;
  border-top: 3px solid #1a6fb5;
  border-radius: 0 0 8px 8px;
  padding: 20px 24px;
  animation: slideDown 0.2s ease-out;
}

/* Show mega menu on hover */
.navbar > ul > li:hover > .mega-menu {
  display: flex !important;
}

/* Mega menu sizing per group */
.mega-menu-diseases {
  width: 560px;
  left: 0;
}

.mega-menu-supplements {
  width: 960px;
  left: 0;
}

.mega-menu-herbs {
  width: 850px;
  left: 0;
}

.mega-menu-natural {
  width: 520px;
  left: 0;
}

.mega-menu-food {
  width: 1000px;
  left: 0;
}

.mega-menu-toxins {
  width: 750px;
  right: 0;
  left: auto;
}

.mega-menu-labtests {
  width: 780px;
  right: 0;
  left: auto;
}

/* Mega menu columns */
.mega-col {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid #e8edf2;
}

.mega-col:first-child {
  padding-left: 0;
}

.mega-col:last-child {
  padding-right: 0;
  border-right: none;
}

/* Column header */
.mega-col-header {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a5276;
  padding: 0 0 8px 0;
  margin-bottom: 8px;
  border-bottom: 2px solid #1a6fb5;
  text-decoration: none !important;
  white-space: nowrap;
}

a.mega-col-header {
  color: #1a5276 !important;
  padding: 0 0 8px 0 !important;
  font-size: 13px !important;
}

a.mega-col-header:hover {
  color: #c0392b !important;
  background-color: transparent !important;
}

/* Mega menu list */
.mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-col ul li {
  margin: 0;
  padding: 0;
}

.mega-col ul li a {
  display: block;
  padding: 5px 8px;
  font-size: 13.5px;
  color: #2c3e50;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  font-weight: 400;
}

.mega-col ul li a:hover {
  background-color: #efe9df;
  color: #1a5276;
}

/* Mega menu "View All" link at bottom of column */
.mega-col-viewall {
  display: block;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e8edf2;
  font-size: 12.5px;
  font-weight: 600;
  color: #1a6fb5;
  text-decoration: none;
}

a.mega-col-viewall {
  color: #1a6fb5 !important;
  font-size: 12.5px !important;
  padding: 4px 8px !important;
}

a.mega-col-viewall:hover {
  color: #c0392b !important;
  background-color: transparent !important;
}

/* Sub-section label within a mega column */
.mega-col-sublabel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #95a5a6;
  padding: 8px 8px 2px 8px;
  font-weight: 600;
  cursor: default;
}

/*------------------------------------------------------------------------------------------*/
/* Animations                                                                                 */
/*------------------------------------------------------------------------------------------*/
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown {
  animation: slideDown 0.2s ease-out;
}

/* Override animation for centered mega menus (need to keep transform) */
.mega-menu-diseases,
.mega-menu-supplements,
.mega-menu-herbs,
.mega-menu-natural,
.mega-menu-food,
.mega-menu-toxins,
.mega-menu-labtests {
  animation: megaSlideDown 0.2s ease-out;
}

@keyframes megaSlideDown {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/*------------------------------------------------------------------------------------------*/
/* Scrollbar Styling                                                                          */
/*------------------------------------------------------------------------------------------*/
.dropdown::-webkit-scrollbar {
  width: 6px;
}

.dropdown::-webkit-scrollbar-track {
  background: #f0ebe3;
}

.dropdown::-webkit-scrollbar-thumb {
  background: #bdc3c7;
  border-radius: 4px;
}

.dropdown::-webkit-scrollbar-thumb:hover {
  background: #95a5a6;
}

/*------------------------------------------------------------------------------------------*/
/* Search Icon                                                                              */
/*------------------------------------------------------------------------------------------*/
.nav-search {
  margin-left: auto !important;
}

.nav-search a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  height: 100%;
  box-sizing: border-box;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.nav-search a:hover {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-search svg {
  display: block;
}

/* Proper stacking context */
.navbar,
.navbar * {
  transform: translateZ(0);
}

/* Fix overflow */
body {
  overflow-x: visible !important;
}
