/* ================================
   NAVIGATION STYLES
   ================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  position: relative;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  max-width: 220px;
  width: 100%;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1.1);
  transition: filter 0.3s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.5rem;
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 16px;
  position: relative;
  padding: 8px 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  right: -8px;
  bottom: 0;
  background: rgba(var(--primary-color), 0.1);
  border-radius: 8px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: scaleX(1);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.whatsapp-contact {
  flex-shrink: 1;
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-left: 1rem;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.btn-whatsapp:hover::before {
  left: 100%;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #128c7e, #075e54);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  color: white;
}

.btn-whatsapp i {
  font-size: 18px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Enhanced Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

.hamburger:hover {
  background: rgba(var(--primary-color), 0.1);
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 2px;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: var(--primary-color);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background: var(--primary-color);
}

/* Loading indicator for active nav link */
.nav-link.loading::after {
  animation: loading 1s infinite;
}

@keyframes loading {
  0% {
    width: 0;
  }
  50% {
    width: 100%;
  }
  100% {
    width: 0;
  }
}

@media (max-width: 626px) {
  .whatsapp-contact {
    display: none;
  }
}

/* Navigation Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
    height: 70px;
  }

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

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding: 2rem 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 90%;
    text-align: center;
    margin: 0.5rem 0;
  }

  .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 18px;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nav-link::before {
    left: 0;
    right: 0;
  }

  .whatsapp-contact {
    margin: 1rem 0;
    margin-left: 0;
  }

  .btn-whatsapp {
    padding: 15px 25px;
    font-size: 16px;
  }
}

/* Menu open state */
body.menu-open {
  overflow: hidden;
}
