/* mini reset */
.nav,
.nav a,
.nav form,
.nav input,
.nav li,
.nav ul {
  border: none;
  margin: 0;
  padding: 0;
}
.nav a {
  text-decoration: none;
}
.nav li {
  list-style: none;
}

/* menu container */
.nav,
input {
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.nav {
  cursor: default;
  display: inline-block;
  position: relative;
  z-index: 99999;
}

/* Enhanced main menu wrapper */
.main-menu-wrapper {
  background: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

.main-menu-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 35px,
    rgba(255,255,255,.02) 35px,
    rgba(255,255,255,.02) 70px
  );
  pointer-events: none;
}

/* menu list */
.nav > li {
  float: left;
  position: relative;
}

/* Enhanced menu links */
.nav > li > a {
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.5;
  padding: 14px 24px;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 510;
}

/* Hover effect with slide-in background */
.nav > li > a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.nav > li > a:focus::before,
.nav > li:hover > a::before {
  transform: scaleX(1);
}

.nav > li > a:focus,
.nav > li:hover > a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Active menu item */
.nav > li.active > a {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 -3px 0 0 #ffc107;
}

.nav > li:first-child > a {
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px 0 0 4px;
}

.nav > li:last-child > a {
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 4px 4px 0;
}

/* Icon support */
.nav > li > a i {
  margin-right: 6px;
  font-size: 14px;
  opacity: 0.9;
}

/* search form */
.nav-search > form {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  height: 3.5em;
  position: relative;
  width: inherit;
  z-index: 510;
}
.nav-search input[type="text"] {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: block;
  float: left;
  font-weight: 600;
  line-height: 1.5;
  padding: 1em 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all .3s ease 1s;
  width: 0;
  border: 1px solid transparent;
  border-radius: 4px 0 0 4px;
}
.nav-search input[type="text"]:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}
.nav-search input[type="text"]:focus,
.nav-search:hover input[type="text"] {
  padding: 1em 1.25em;
  transition: all .3s ease .1s;
  width: 6.875em;
}
.nav-search input[type="submit"] {
  background: rgba(255, 255, 255, 0.1) url(../img/search-icon.png) no-repeat center center;
  background: rgba(255, 255, 255, 0.1) url(../img/search-icon.svg) no-repeat center center;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  display: block;
  float: left;
  height: 3.5em;
  padding: 0 1.25em;
  transition: all .3s ease;
  border: 1px solid transparent;
}
.nav-search input:focus,
.nav-search input[type="submit"]:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced mega menu dropdown */
.mega-menu {
  background: #ffffff;
  border: none;
  border-radius: 0 0 8px 8px;
  opacity: 0;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  width: max-content;
  max-width: none;
  overflow: visible;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  top: 100%;
  left: 0;
  margin-top: 0;
  transform: translateY(-10px);
}

li:hover > .mega-menu {
  opacity: 1;
  overflow: visible;
  visibility: visible;
  transform: translateY(0);
}

/* Mega menu narrow variant */
.mega-menu-narrow {
  min-width: 250px;
}

/* menu content columns */
.nav-column {
  float: left;
  padding: 12px 16px;
  width: auto;
  min-width: auto;
  border-right: 1px solid #e9ecef;
}

.nav-column:last-child {
  border-right: none;
}

.nav-column ul {
  padding: 8px 0;
}

.nav-column li {
  transition: all 0.2s ease;
}

/* Enhanced mega menu links */
.nav-column a {
  color: #495057;
  display: block;
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-column a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  transition: height 0.2s ease;
  transform: translateY(-50%);
}

.nav-column a:hover::before {
  height: 60%;
}

.nav-column a:hover {
  background: linear-gradient(135deg, #e7f1ff 0%, #cfe2ff 100%);
  color: #0d6efd;
  transform: translateX(8px);
  padding-left: 24px;
}

/* Add icons to mega menu items */
.nav-column a i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  opacity: 0.7;
}

.nav-column a:hover i {
  opacity: 1;
}

h3 {
  color: #0d6efd;
  font-size: 0.95em;
  font-weight: 700;
  line-height: 1.15;
  margin: 1.25em 0 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px;
  position: relative;
}

h3::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 16px;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #0d6efd, transparent);
  border-radius: 2px;
}

.highlight {
  color: #0d6efd;
  font-weight: 600;
}

/* Badge support for menu items */
.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: #dc3545;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* Dropdown indicator */
.nav > li.has-dropdown > a::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 6px;
  font-size: 11px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav > li.has-dropdown:hover > a::after {
  transform: rotate(180deg);
}

/* Scrollbar styling for mega menu */
.mega-menu::-webkit-scrollbar {
  height: 8px;
}

.mega-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.mega-menu::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 4px;
}

.mega-menu::-webkit-scrollbar-thumb:hover {
  background: #0a58ca;
}

/******IPAD ONLY*****/
@media only screen and (max-width: 1024px) and (min-width: 768px) {
  .nav > li > a {
    padding: 12px 20px;
    font-size: 12px;
  }

  .nav-column {
    min-width: 220px;
  }
}

/******MOBILE ADJUSTMENTS*****/
@media only screen and (max-width: 767px) {
  .main-menu-wrapper {
    padding: 8px 0;
  }
}

/* Animation on page load */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav {
  animation: slideInDown 0.6s ease-out;
}

/* Accessibility improvements */
.nav > li > a:focus {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

.nav-column a:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
  background: #e7f1ff;
}

/* Print styles */
@media print {
  .main-menu-wrapper {
    display: none;
  }
}

