:root {
  --navbar-height: 90px;
  --navbar-height-scrolled: 80px;
  --navbar-logo-height: 75px;
  --navbar-logo-height-scrolled: 68px;

  /*colors*/
  --navbar-color: rgba(239, 240, 242);
  --item-color: var(--dark-color);
  --item-color-hover: var(--primary-color);
  --mobile-navbar-bg: rgba(18, 26, 35, 0.98);
}

/* Desktop navbar */
.navbar-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--navbar-color);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  padding: 0 3%;
  width: 100%;
  height: var(--navbar-height);
  position: fixed;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}

.navbar-desktop.scrolled {
  background-color: var(--navbar-color);
  height: var(--navbar-height-scrolled);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.navbar-logo {
  display: flex;
  align-items: center;
  height: 100%;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: translateY(-2px);
}

.navbar-logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-logo img.logo {
  height: var(--navbar-logo-height);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: height 0.3s ease;
}

.navbar-desktop.scrolled .navbar-logo img.logo {
  height: var(--navbar-logo-height-scrolled);
}

.navbar-desktop ul {
  display: flex;
  list-style-type: none;
  align-items: center;
  gap: 5px;
}

.navbar-item {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.navbar-link {
  display: flex;
  align-items: center;
  color: var(--item-color);
  text-decoration: none;
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  height: 100%;
  padding: 0 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--item-color-hover, #4a8cca);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 5px;
  opacity: 0;
}

.navbar-link:hover {
  color: var(--item-color-hover, #4a8cca);
  transform: translateY(-2px);
}

.navbar-link:hover::after {
  width: 70%;
  opacity: 1;
}

.navbar-item.active .navbar-link {
  color: var(--primary-color, #4a8cca);
}

.navbar-item.active .navbar-link::after {
  width: 70%;
  opacity: 1;
}

/* Tablet styles for desktop navbar */
@media (min-width: 801px) and (max-width: 1024px) {
  .navbar-desktop {
    padding: 0 2%;
  }

  .navbar-link {
    padding: 0 1rem;
    font-size: 1rem;
  }

  .navbar-logo img.logo {
    height: calc(var(--navbar-logo-height) * 0.9);
  }

  .navbar-desktop.scrolled .navbar-logo img.logo {
    height: calc(var(--navbar-logo-height-scrolled) * 0.9);
  }
}

/* Mobile navbar - completely separate version */
.navbar-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--navbar-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 5%;
  position: relative;
}

.mobile-logo img {
  height: 45px;
  width: auto;
}

.mobile-menu-toggle {
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  z-index: 20;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--item-color);
  border-radius: 3px;
  transition: all 0.3s ease;
  position: absolute;
}

.mobile-menu-toggle span:nth-child(1) {
  top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
  top: 10px;
}

.mobile-menu-toggle span:nth-child(3) {
  top: 20px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
  background-color: #fff;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
  background-color: #fff;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--mobile-navbar-bg);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

.mobile-nav-panel.active {
  transform: translateY(0);
}

.mobile-nav-links {
  list-style-type: none;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: center;
}

.mobile-nav-item {
  margin: 1.5rem 0;
}

.mobile-nav-link {
  font-size: 1.8rem;
  color: #fff;
  text-decoration: none;
  font-weight: 300;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.5rem 2rem;
  position: relative;
}

.mobile-nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--primary-color);
}

.mobile-nav-link:hover::after {
  width: 50%;
}

.mobile-social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.mobile-social-link {
  color: #fff;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.mobile-social-link:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Switch between desktop and mobile navbar */
@media (max-width: 800px) {
  .navbar-desktop {
    display: none;
  }

  .navbar-mobile {
    display: block;
  }
}
