* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.navbar-brand {
  font-size: clamp(18px, 5vw, 28px);
  padding-left: 5%;
  font-weight: 500;
}

.navbar {
  position: relative;
  width: 100%;
  z-index: 999;
  transition: background-color 0.3s ease;
  background-color: #cecece !important;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar .navbar-toggler {
  margin: 0 auto;
}
#navbarNav {
  margin-right: 4%;
}
.navbar-nav .nav-item {
  margin: 0 10px;
}

.navbar-nav .nav-link {
  font-size: clamp(14px, 2vw, 16px);
  margin: 0 5%;
  font-weight: 500;
  color: #616161 !important;
  text-decoration: none !important;
  position: relative;
  transition: all 0.25s ease-in-out;
}

/* General link appearance and hover styles */
.navbar-nav .nav-link:hover {
  color: #d42324 !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
}

/* Ensure the active link has the required red color */
.navbar-nav .nav-link.active {
  color: #d42324 !important; /* Forces the red color for the active link */
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
}
/* .nav-item span {
  color: black;
  font-weight: 500;
} */
/* .navbar-nav .nav-link {
  position: relative;
  transition: color 250ms ease;
} */

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 55%;
  bottom: -5px;
  transform: translateX(-50%) translateY(6px) scale(0.85);
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #d42324;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}
.navbar-nav .nav-link:hover::after {
  transform: translateX(-50%) translateY(0) scale(0.95);
  opacity: 0.6;
}

.navbar-nav .nav-link.active::after {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

@media (max-width: 991.98px) {
  .nav-item span {
    display: none !important;
  }
  .navbar-collapse {
    text-align: center;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: center;
  }

  .navbar-nav .nav-item {
    margin: 10px 0;
  }
}
