/* ===== ESTRUCTURA BASE DEL HEADER ===== */
.header-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 10vh;
  padding: 0 20px;
  background-color: var(--blue1);
  z-index: 1000;
  display: flex;
  overflow: visible;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 5px 10px -5px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

/* ===== LOGO TEXTO ===== */
.header-logo { text-decoration: none; }

.kamzilu-logo-text {
  font-family: var(--font3);
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  text-transform: uppercase;
  font-size: 4rem;
  color: var(--white);
  letter-spacing: 0.05em;
  display: inline-block;
  transition: transform 0.3s ease-out;
}

.kamzilu-logo-text:hover { animation: bounce-logo 0.3s ease-out forwards; }

@keyframes bounce-logo {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  70% { transform: scale(1.03); }
  100% { transform: scale(1.06); }
}

/* ===== NAVEGACIÓN DESKTOP ===== */
.header-nav-desktop {
  display: flex;
}

.header-nav-desktop a,
.header-dropdown > a,
.header-dropdown > span.nav-link {
  font-family: var(--font3);
  color: var(--white);
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 400;
  margin-left: 2rem;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
  cursor: default;
}

.header-nav-desktop a:hover,
.header-dropdown > a:hover,
.header-dropdown > span.nav-link:hover {
  color: var(--accent1);
}

/* Dropdown y submenú */
.header-dropdown {
  position: relative;
}

.header-submenu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: rgba(39, 47, 65, 0.95);
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 1001;
  flex-direction: column;
  overflow: visible;
  border-radius: 20px;
}

.header-submenu a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1.6rem;
  color: var(--white);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px);
  animation: dropdownFade 0.3s ease forwards;
  transition: transform 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.header-submenu a:hover {
  transform: translateY(-10px);
  color: var(--accent1);
}

.header-dropdown:hover > .header-submenu {
  display: flex;
}

@keyframes dropdownFade {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Alineación del último submenú (Xbox) */
.header-dropdown:last-child .header-submenu {
  right: 0;
  left: auto;
}

/* ===== NAVEGACIÓN MÓVIL ===== */
.header-nav-mobile {
  position: fixed;
  top: 15vh;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  padding: 1rem 2rem;
  z-index: 99999;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s ease, opacity 0.3s ease;
  overflow-y: auto;
}

.header-nav-mobile.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.header-nav-mobile a {
  padding: 1rem 0;
  border-bottom: 1px solid var(--dark-grey);
  color: var(--white);
  text-decoration: none;
  font-size: 1.8rem;
}

.header-nav-mobile a:last-child { border-bottom: none; }

/* Dropdown móvil */
.header-mobile-dropdown {
  display: flex;
  border-bottom: 1px solid #333;
  flex-direction: column;
  width: 100%;
}

.header-mobile-parent {
  font-family: var(--font1);
  font-size: 1.8rem;
  font-weight: 500;
  background: none;
  color: var(--light-grey);
  border: none;
  text-align: left;
  padding: 1rem 0;
  cursor: pointer;
  position: relative;
}

.header-mobile-parent::after {
  content: '◂';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.header-mobile-parent.open::after {
  transform: translateY(-50%) rotate(-90deg);
}

.header-mobile-submenu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
}

.header-mobile-submenu a {
  padding: 0.5rem 0;
  border: none;
  font-size: 1.6rem;
}

.header-mobile-submenu.show {
  max-height: 500px;
  opacity: 1;
}

/* ===== BOTÓN BURGER (MÓVIL) ===== */
.burger-toggler { display: none; }

.burger-animated-icon {
  width: 30px;
  height: 20px;
  position: relative;
  transition: 0.5s ease-in-out;
}

.burger-animated-icon span {
  position: absolute;
  height: 3px;
  width: 100%;
  border-radius: 9px;
  background: white;
  left: 0;
  transition: 0.25s ease-in-out;
}

.burger-animated-icon span:nth-child(1) { top: 0; }
.burger-animated-icon span:nth-child(2) { top: 10px; }
.burger-animated-icon span:nth-child(3) { top: 20px; }

.burger-animated-icon.open span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.burger-animated-icon.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.burger-animated-icon.open span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-nav-desktop { display: none; }
  .burger-toggler {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }
}
