/* Navigation styling for professional healthcare/pharmacy aesthetic */
.navbar {
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0;
}

.navbar .container-fluid {
  display: flex;
  align-items: center;
  position: relative;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: #056029 !important;
  flex-shrink: 0;
  margin-right: 1rem;
}

.navbar-toggler {
  order: 3;
}

.navbar-collapse {
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 0 60px;
}

.nav-link {
  color: #666 !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: #056029 !important;
}

/* Megamenu container styling */
.megamenu {
  position: static !important;
}

.megamenu .dropdown-menu {
  position: absolute !important;
  width: 100vw;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  border: none;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 2rem;
  margin-top: 0;
  display: none;
}

/* Show dropdown on hover and when Bootstrap shows it */
.megamenu:hover .dropdown-menu,
.megamenu .dropdown-menu.show {
  display: block !important;
  animation: slideDown 0.3s ease;
}

/* Megamenu content grid with 5 columns */
.megamenu-content {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 1rem;
}

/* Custom scrollbar styling */
.megamenu-content::-webkit-scrollbar {
  width: 8px;
}

.megamenu-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.megamenu-content::-webkit-scrollbar-thumb {
  background: #056029;
  border-radius: 10px;
}

.megamenu-content::-webkit-scrollbar-thumb:hover {
  background: #00441a;
}

/* Individual column styling */
.megamenu-column {
  flex-shrink: 0;
}

.megamenu-header {
  color: #056029;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  padding: 0;
}

/* Megamenu items with hover effects */
.megamenu-item {
  display: block;
  padding: 0.65rem 0;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.megamenu-item:hover {
  color: #056029;
  padding-left: 0.35rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Hero section styling */
.hero-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  padding: 4rem 0;
}

/* Navigation scroll wrapper */
.navbar-nav-wrapper {
  width: 100%;
  overflow: visible;
  position: relative;
}

.navbar-nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  margin-right: 50px !important;
  margin-left: 25px !important;
}

.navbar-nav::-webkit-scrollbar {
  display: none;
}

.navbar-nav .nav-item {
  flex-shrink: 0;
}

.nav-scroll-btn {
  background: linear-gradient(135deg, #056029, #00441a);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
}

.nav-scroll-left {
  left: 5px;
  margin-right: 15px;
}

.nav-scroll-right {
  right: 190px;
  margin-left: 15px;
}

@media (min-width: 992px) {
  .nav-scroll-btn {
    display: flex;
  }

  .navbar-collapse.show .nav-scroll-btn,
  .navbar-collapse.collapsing .nav-scroll-btn {
    display: flex;
  }
}

.nav-scroll-btn:hover {
  background: linear-gradient(135deg, #00441a, #003d7a);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.nav-scroll-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-scroll-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-scroll-btn svg {
  display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .megamenu-content {
    grid-template-columns: repeat(3, 1fr);
    max-height: 350px;
  }

  .megamenu .dropdown-menu {
    padding: 1.5rem;
  }
}

@media (max-width: 991px) {
  .nav-scroll-btn {
    display: none !important;
  }

  .navbar-collapse {
    padding: 0;
  }

  .navbar-nav {
    flex-direction: column;
    overflow-x: visible;
  }

  .megamenu-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .megamenu .dropdown-menu {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .megamenu-content {
    grid-template-columns: 1fr;
    max-height: 350px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .nav-link {
    margin: 0.25rem 0;
  }

  .megamenu-header {
    font-size: 0.85rem;
  }

  .megamenu-item {
    font-size: 0.85rem;
  }
}