.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--navbar-bg);
  height: var(--navbar-height);
  z-index: 1000;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
  font-family: 'Nunito Sans', sans-serif;
  height: 60px;
}

/* Estado Fixed (aparece al scrollear) */
.navbar--fixed {
  position: fixed;
  animation: fadeIn var(--transition-speed) ease;
}

/* Estado Hidden (cuando desaparece al scrollear) */
.navbar--hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Container */
.navbar__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  z-index: 1002;
}

.navbar__logo img {
  display: block;
  height: 30px;
  width: auto;
}

/* Menu (Mobile - cerrado por defecto) */
.navbar__menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100vh;
  background-color: var(--navbar-bg);
  list-style: none;
  margin: 0;
  padding: 100px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  transform: translateX(100%);
  transition: transform var(--transition-speed) ease;
  z-index: 1001;
}

/* Menu abierto */
.navbar__menu--open {
  transform: translateX(0);
}

/* Items del menú */
.navbar__item {
  list-style: none;
}

/* Links del menú */
.navbar__link {
  color: var(--navbar-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: opacity 0.2s ease;
}

.navbar__link:hover {
  opacity: 0.7;
}

/* Botón Contacto (oculto en mobile) */
.navbar__item--desktop-only {
  display: none;
}

.navbar__button {
  display: inline-block;
  padding: 12px 28px;
  background-color: var(--button-bg);
  color: var(--navbar-text);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  transition: opacity 0.2s ease;
}

.navbar__button:hover {
  opacity: 0.9;
}

/* Hamburger Button */
.navbar__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  transition: transform var(--transition-speed) ease;
}

.navbar__hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--navbar-text);
  transition: all var(--transition-speed) ease;
  transform-origin: center;
}

/* Hamburger a X */
.navbar__hamburger--active .navbar__hamburger-line:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.navbar__hamburger--active .navbar__hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger--active .navbar__hamburger-line:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

/* Overlay */
.navbar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--overlay-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
  z-index: 999;
}

.navbar__overlay--visible {
  opacity: 1;
  pointer-events: all;
}

/* Desktop Styles */
@media (min-width: 768px) {
  /* Menu en horizontal */
  .navbar__menu {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 40px;
    transform: none;
    background-color: transparent;
  }

  /* Mostrar botón Contacto */
  .navbar__item--desktop-only {
    display: block;
  }

  /* Ocultar hamburger */
  .navbar__hamburger {
    display: none;
  }

  /* Overlay no necesario */
  .navbar__overlay {
    display: none;
  }

  /* Links desktop */
  .navbar__link {
    font-size: 16px;
  }
}