:root {
  --primary-color: #0F93FE;
  --text-color: #002633;
  --accent-color: #0F93FE;
  --white: #ffffff;
  --header-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.24);
  ;
  --transition-speed: 0.3s;
  --active-link-color: #0F93FE;
  --button-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.24);
  --border-radius-small: 8px;
}



/* Base header styles */
.header-wrapper {
  width: 100%;
  transition: all var(--transition-speed) ease-out;
  z-index: 999;
  /* Changed from 1000 to allow modals (1050+) to appear above */
  padding: 10px 0;
  position: fixed;
  top: 0;
}

.header-wrapper.sticky {
  background-color: var(--white);
  box-shadow: var(--header-shadow);
}


.navbar {
  padding: 0;
  transition: all var(--transition-speed) ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 999;
  /* Ensure navbar doesn't block modals */
}

/* Logo styles */
.clinic-logo a img {
  height: 36px;
  margin-right: 20px;
}

/* Main navbar content wrapper for equal spacing */
.navbar-collapse {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}

/* Navigation styles - Center the nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  flex: 0 0 auto;
}

.nav-item {
  position: relative;
  margin: 0 5px;
}

.nav-link {
  color: #002633;
  font-weight: 400;
  font-size: 15px;
  transition: all var(--transition-speed) ease;
  text-decoration: none;
  padding: 8px !important;
  position: relative;
  border: none;
  background: none;
}

/* Underline effect */
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--active-link-color);
  transition: all var(--transition-speed) ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
  color: #0F93FE;
}

.navbar .navbar-nav .nav-item.active {
  border-bottom: none !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--active-link-color) !important;
  font-weight: 600;
}

/* Dropdown styles */
.nav-item .dropdown-toggle {
  position: relative;
  padding-right: 25px !important;
}

.dropdown-toggle::after {
  display: none;
}

.dropdown-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.navbar .dropdown-icon {
  margin-right: 5px;
  flex-shrink: 0;
}

.navbar .dropdown-item {
  padding: 8px 12px;
  margin: 1px 0;
  font-size: 13px;
  font-weight: 500;
}

.navbar .dropdown-item:hover {
  color: var(--primary-color);
  background-color: #F2F2F2 !important;
  border-left: 2px solid var(--primary-color);
  border-radius: 0px !important;
  font-weight: 500;

}

.navbar .dropdown-item:hover svg path {
  stroke: var(--primary-color);
}


/* User section - Fixed to the right */
.user-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Shared button styles */
.points-btn,
.login-btn {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border: none;
  border-radius: var(--border-radius-small);
  font-weight: 600;
  box-shadow: var(--button-shadow);
  cursor: pointer;
  text-decoration: none !important;
  font-size: 14px;
  transition: background-color var(--transition-speed) ease;
  padding: 8px;
  gap: 6px;
}

.points-btn {
  color: var(--accent-color);
  border: 0.6px solid #5C788A !important;
  box-shadow: none !important;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sign-btn svg {
  vertical-align: middle;
}

.sign-btn {
  color: #0F93FE;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sign-btn:hover {
  text-decoration: none !important;
  color: #0F93FE !important;
}

.login-btn {
  color: #fff;
  background-color: #0F93FE !important;
}

.login-btn:hover {
  background-color: #f8f9fa;
  color: #ffffff !important;
  text-decoration: none !important;

}

.coin-icon {
  width: 20px;
  height: 20px;
}

/* Mobile toggler */

.navbar-toggler {
  padding: 6px 0;
}

.navbar-toggler-icon {
  color: #002633;
  font-size: 24px;
}

/* Alternative layout for perfectly equal spacing */
.navbar-equal-spacing {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.navbar-equal-spacing .navbar-nav {
  grid-column: 2;
}

.navbar-equal-spacing .user-section {
  grid-column: 3;
  justify-self: end;
  margin-left: 0;
}

/* Mobile responsive styles - FIXED VERSION */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-direction: column;
  }

  .navbar-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }

  .nav-item {
    width: 100%;
    margin: 1px 0;
  }

  .nav-link {
    padding: 10px 12px !important;
    border-radius: var(--border-radius-small);
    margin: 1px 0;
    font-size: 15px;
  }

  .nav-link:hover {
    background-color: rgba(0, 128, 85, 0.1);
  }

  /* FIXED: Dropdown menu styles for mobile */
  .dropdown-menu {
    display: none;
    position: static !important;
    transform: none !important;
    margin-top: 5px;
    margin-left: 10px;
    box-shadow: none;
    background-color: white;
    border-radius: var(--border-radius-small);
    padding: 5px;
    border: none;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-item {
    padding: 8px 12px;
    margin: 1px 0;
    font-size: 13px;
    font-weight: 500;
  }

  /* FIXED: User section responsive */
  .user-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    justify-content: center;
    gap: 12px;
    margin-left: 0;
  }

  /* Disable grid layout on mobile */
  .navbar-equal-spacing {
    display: block;
  }
}

@media (max-width: 575px) {
  .clinic-logo img {
    height: 28px;
  }

  /* FIXED: Further reduce spacing on small screens */
  .navbar-collapse {
    padding: 12px;
  }

  .nav-link {
    padding: 8px 10px !important;
    font-size: 14px;
  }

  .dropdown-item {
    padding: 6px 10px;
    font-size: 13px;
  }

  .user-section {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .points-btn,
  .login-btn {
    width: 100%;
    justify-content: center;
    max-width: 115px;
    font-size: 13px;
    height: 35px;
  }

}


/* second nav bar */
.header-services {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 auto;
  padding: 0 20px;
  background: #0F93FE;
}

.service-item {
  color: #FFF;
  font-size: 14px;
  font-weight: 700;
  padding: 0px 20px;
  text-decoration: none;
  border-right: 1.5px solid #fff;
  white-space: nowrap;
}

.service-item:last-child {
  border-right: none;
}

.service-item:hover {
  text-decoration: none;
  color: #ffffff !important;
}


/* Logout Confirmation Modal */
#logoutConfirmModal .modal-content {
  border-radius: 8px;
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logout-dialog-text {
  color: #002633;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 18px;
}

.btn-cancel {
  color: #00A8E0;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  height: 40px;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  border: 1px solid #00A8E0;
  color: #00A8E0;
  transform: translateY(-1px);
}

.btn-logout-confirm {
  background: #00A8E0;
  color: white;
  border: none;
  padding: 8px 24px !important;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  height: 40px;
  transition: all 0.3s ease;
}

.btn-logout-confirm:hover {
  background: #0093c4;
  color: white;
  transform: translateY(-1px);
}