/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.4s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(15px);

}

header.hide {
  transform: translateY(-100%);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 30px;
  max-width: 100%;
  padding: 0 16px;
  margin: 0 auto;
}

nav ul li a {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--color-primary);
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--color-accent);
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  color: #4a2f1a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

li {
  transition: transform 0.3s ease;
}

li:hover {
  transform: scale(1.15);
}

/* Resto */
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo {
  width: 280px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  margin: 5% 5%;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contacto */
.cta {
  background: #8b5e34;
  color: #fff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(139, 94, 52, 0.25);
  transition: all 0.3s ease;
}

.cta:hover {
  background: #a7744c;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 94, 52, 0.35);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: transparent;
  flex-direction: row;
  border: 0;
  font-size: 1.5rem;
  color: #4a2f1a;
}

@media (max-width: 768px) {
  .logo {
    width: 160px;
    height: auto;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  nav ul {
    width: 100%;
    text-align: center;
  }
}


@media (max-width: 820px) {
  header {
    height: 120px;
  }

  .logo {
    width: 160px;
    height: auto;
  }

  /* Menu para movil */
  .menu-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--color-accent);
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
  }

  nav ul {
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    position: fixed;
    top: 120px;
    right: -100%;
    width: 60%;
    height: 50vh;
    padding-top: 140px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 999;
    transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), visibility 0.5s;
    padding: 40px;
    visibility: hidden;
  }

  nav ul.open {
    right: 0;
    visibility: visible;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  nav ul.open li {
    opacity: 1;
    transform: translateY(0);
  }

  nav ul.open li:nth-child(1) {
    transition-delay: 0.2s;
  }

  nav ul.open li:nth-child(2) {
    transition-delay: 0.3s;
  }

  nav ul.open li:nth-child(3) {
    transition-delay: 0.4s;
  }

  nav ul li a {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    color: #5a3921;
    text-decoration: none;
    letter-spacing: 1px;
    display: block;
    padding: 10px;
  }

  nav ul li a.cta {
    background: var(--color-accent);
    color: white;
    border-radius: 50px;
    margin-top: 20px;
    display: inline-block;
  }
}