.navbar {
  padding: 0;
  border: none;
  border-radius: 0px;
  margin-bottom: 0px;
}

.navbar-light .navbar-brand {
  color: var(--color-white);
}

.main-nav {
  display: flex;
  background-color: var(--color-primary);
  height: 60px;
  color: var(--color-white);
  padding: 0;
}

.container.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  position: relative;
}

/* Add this to your header.css file */
@media (max-width: 992px) {
  .main-nav {
    /* Ensure consistent height on mobile */
    height: 60px;
    display: flex;
    align-items: center;
  }

  .container.navbar {
    /* Reset any potential positioning issues */
    position: relative;
    top: -5px;
    display: flex;
    align-items: center;
  }

  /* Adjust spacing for mobile view */
  .nav-tabs {
    gap: 20px;
  }
}

/* Mobile responsiveness updates */
@media (max-width: 767px) {
  /* Increase navbar height to accommodate two rows */
  .main-nav {
    height: 100px; /* Increased height for two rows */
    flex-direction: column;
    padding: 0;
  }

  /* Adjust layout for mobile */
  .container.navbar {
    padding: 0 15px;
    justify-content: space-between;
    height: 60px; /* Height of the top row */
    width: 100%;
    top: -20px;
  }

  /* Move logo to left on mobile */
  .nav-logo {
    position: static !important;
    transform: none !important;
    display: flex;
    align-items: center;
  }

  .navbar-brand img {
    height: 20px; /* Adjust logo size for mobile */
    width: auto;
  }

  /* Style the tabs to be on second row */
  .nav-tabs {
    position: absolute;
    top: 45px; /* Position below the top row */
    left: 0;
    display: flex;
    justify-content: space-around;
    background-color: var(--primary-color);
    padding: 0 15px;
    height: 55px; /* Height of the bottom row */
    margin: 0;
  }

  /* Style individual tabs */
  .nav-tab {
    padding: 25px 0 !important;
    flex: 1;
    text-align: center;
    font-size: 13px !important;
  }

  /* Adjust active tab indicator */
  .nav-tab.active::after {
    bottom: 0;
    width: 100%; /* Full width of the tab */
    height: 3px; /* Slightly smaller indicator */
  }

  /* Move icons to the right */
  .nav-icons {
    gap: 15px;
    margin-left: auto;
  }

  /* Make sure dropdown menu appears correctly on mobile */
  .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 150px;
    margin-top: 5px;
  }
}

/* Left side tabs */
.nav-tabs {
  display: flex;
  gap: 40px;
  margin-right: auto;
  border: none !important;
}

.nav-tab {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  padding: 20px 0;
  position: relative;
}

.nav-tab:hover {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  padding: 20px 0;
  position: relative;
}

.nav-tab.active {
  color: var(--color-white);
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-bold);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 4px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  background-color: var(--color-white);
}

/* Center logo */
.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-brand {
  color: var(--color-white) !important;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 0 !important;
  padding: 0;
  min-width: 130px;
  height: auto;
}

/* Right side icons */
.nav-icons {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: 10px;
}

/* Style for both button and link icons */
.nav-icon {
  color: var(--color-white) !important;
  text-decoration: none;
  font-size: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-icon:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

#mobileSearchIcon {
  display: block;
  background-color: transparent;
  color: #fff;
  font-size: 18px;
  margin: 0;
}

.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  display: inline-block;
}

.search-icon .icon {
  width: 1.5em;
  height: 1.4em;
}

/* Original classes that have JS functionality */
.btn-link {
  color: var(--color-white);
  padding: 0;
}

.btn-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.btn-link:after {
  color: rgba(255, 255, 255, 0.8);
  border: none;
}

.nav-icons .dropdown-toggle {
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  font-weight: 600;
  font-size: 18px;
  padding: 0;
  background: none;
  border: none;
}

.nav-icons .dropdown-toggle::after {
  display: none; /* Hide the default dropdown caret */
}

.nav-icons .dropdown-toggle:focus{
  box-shadow: none !important;
  border: none;
  color: #fff;
}

/* Dropdown menu styling */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  padding: 8px 0;
  min-width: 120px;
  z-index: 1000;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

/* Search overlay */
.overlay {
  height: 0;
  width: 100%;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
  overflow-y: hidden;
  transition: 0.5s;
  display: none;
}

.overlay-content {
  position: relative;
  width: 80%;
  max-width: 800px;
  margin: auto;
  margin-top: 30px;
}

.overlay .form-control,
.overlay .form-select,
.overlay .btn {
  height: 45px;
  border-radius: 0;
}

#overlaySearchForm .input-group {
  box-shadow: none;
  border-radius: var(--button-radius);
  overflow: hidden;
  background-color: var(--color-light);
  height: 50px;
}

#overlaySearchForm .search-input {
  border: none;
  padding: 0.75rem 0.5rem 0.75rem 0.5rem;
  font-size: 14px;
  background-color: var(--search-box-bg);
  font-family: var(--font-family-base);
  height: 50px;
}

#overlaySearchForm .search-input:focus {
  box-shadow: none;
  outline: none;
}

#overlaySearchForm .form-control {
  border-radius: var(--button-radius);
}

.overlay .search_button {
  background-color: var(--color-primary);
  border: none;
}

.overlay .search_button:hover {
  background-color: var(--color-primary);
  border: none;
}

/* Making sure d-lg-none functions correctly */
@media (min-width: 992px) {
  .d-lg-none {
    display: none !important;
  }
}

#SignUpIcon {
    border: 1px solid white;
    border-radius: var(--button-radius);
    background: none;
}

/* Authentication link styling */
.auth-link {
  color: var(--color-white) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
}

.auth-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
}

/* Profile dropdown styling */
#profileDropdown {
  color: var(--color-white) !important;
  background: none;
  border: none;
  padding: 0;
  font-size: 20px;
  cursor: pointer;
}

#profileDropdown:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

#profileDropdown::after {
  display: none; /* Hide the default dropdown caret */
}

#profileDropdown:focus {
  box-shadow: none !important;
  border: none;
  color: var(--color-white) !important;
}

/* Dropdown menu positioning and styling */
.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* Update existing dropdown menu styles for consistency */
.nav-icons .dropdown-menu {
  position: absolute;
  right: 0;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  padding: 8px 0;
  min-width: 140px;
  z-index: 1000;
  border: 1px solid #e0e0e0;
  margin-top: 5px;
}

.nav-icons .dropdown-item {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: var(--font-weight-regular);
}

/* Mobile responsiveness for auth elements */
@media (max-width: 767px) {
  .auth-link {
    font-size: 12px;
  }

  .nav-icons {
    gap: 15px;
  }

  #profileDropdown {
    font-size: 18px;
  }

  .nav-icons .dropdown-menu {
    min-width: 120px;
    right: 0;
    left: auto;
  }
}

/* Mobile responsiveness for auth elements */
@media (max-width: 340px) {
  .nav-icons {
    gap: 5px;
    margin-right: 0px;
  }

  .nav-logo {
    max-width: 100px;
  }
}

/* App Waitlist Banner */
.app-banner {
  background: linear-gradient(90deg, var(--color-secondary), var(--color-highlight), var(--color-secondary));
  background-size: 200% 100%;
  animation: gradientShift 3s ease-in-out infinite;
  color: var(--color-white);
  text-align: center;
  padding: 12px 15px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  z-index: 1400; /* Higher than mainNav's 1300 */
  display: block;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
}

.app-banner:hover {
  animation-duration: 1.5s;
}

.banner-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.banner-text {
  flex: 1;
  text-align: center;
}

.banner-close {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.banner-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Adjust mainNav position when banner is visible */
body:not(.banner-dismissed) #mainNav {
  top: 44px; /* Height of banner + padding */
}

/* Mobile responsiveness for banner */
@media (max-width: 767px) {
  .app-banner {
    font-size: 12px;
    padding: 10px 15px;
  }

  .banner-text {
    padding-right: 30px; /* Make room for close button */
  }

  /* Adjust mainNav position on mobile when banner is visible */
  body:not(.banner-dismissed) #mainNav {
    top: 37px; /* Smaller height for mobile */
  }

  /* Adjust padding on main body on mobile when banner is visible */
  body:not(.banner-dismissed) .search-hero {
    padding: 120px 0 60px !important;
  }

  /* Adjust padding on main container when banner is visible */
  body:not(.banner-dismissed) #search-filter-container {
    top: 135px !important;
  }

  body:not(.banner-dismissed) #search-heading-container {
    margin-top: 90px !important;
  }

  body:not(.banner-dismissed) .overlay {
    margin-top: 90px;
  }

  body:not(.banner-dismissed) .background-image-signup-login {
    margin-top: 50px;
  }

  body:not(.banner-dismissed) .detailed-results {
    margin-top: 160px;
  }

  body:not(.banner-dismissed) #skeleton-filter-container {
    margin-top: 135px !important;
  }

  body:not(.banner-dismissed) .club-landing-container {
    margin-top: 155px !important;
  }
}

/* Mobile responsiveness for banner */
@media (max-width: 503px) {
  /* Adjust mainNav position on mobile when banner is visible */
  body:not(.banner-dismissed) #mainNav {
    top: 55px; /* Smaller height for mobile */
  }

  /* Adjust padding on main body on mobile when banner is visible */
  body:not(.banner-dismissed) .search-hero {
    padding: 150px 0 60px !important;
  }

  /* Adjust padding on main container when banner is visible */
  body:not(.banner-dismissed) #search-filter-container {
    top: 155px !important;
  }

  body:not(.banner-dismissed) #search-heading-container {
    margin-top: 105px !important;
  }

  body:not(.banner-dismissed) .overlay {
    margin-top: 100px !important;
  }

  body:not(.banner-dismissed) .background-image-signup-login {
    margin-top: 50px;
  }

  body:not(.banner-dismissed) .detailed-results {
    margin-top: 180px;
  }

  body:not(.banner-dismissed) #skeleton-filter-container {
    margin-top: 155px !important;
  }

  body:not(.banner-dismissed) .club-landing-container {
    margin-top: 175px !important;
  }
}

/* Mobile responsiveness for banner */
@media (min-width: 768px) {
  /* Adjust padding on main container when banner is visible */
  body:not(.banner-dismissed) #search-filter-container {
    top: 100px !important;
  }

  /* Adjust padding on main container when banner is visible */
  body:not(.banner-dismissed) #search-heading-container {
    margin-top: 55px !important;
  }

  body:not(.banner-dismissed) .detailed-results {
    margin-top: 120px;
  }

  body:not(.banner-dismissed) #skeleton-filter-container {
    margin-top: 100px !important;
  }

  body:not(.banner-dismissed) .club-landing-container {
    margin-top: 120px !important;
  }
}

/* When banner is dismissed, reset mainNav position */
body.banner-dismissed #mainNav {
  top: 0;
}

/* Adjust padding on main body when banner is visible */
body:not(.banner-dismissed) .search-hero {
  padding: 120px 0 60px;
}

/* Adjust padding on main container when banner is visible */
body:not(.banner-dismissed) .masthead .container {
  margin-top: 150px;
}

body:not(.banner-dismissed) .overlay {
  margin-top: 90px;
}

/* Hide banner when dismissed */
.app-banner.hidden {
  display: none;
}