/* Header Styles */
header.mini-header {
  background: #121520;
  color: #fff;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  font-family: var(--font-system);
}

header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo-link {
  display: inline-block;
  line-height: 0;
}

.logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Navegación Principal */
.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  height: var(--header-height);
}

.main-nav li {
  height: 100%;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: var(--typo-body-weight);
  font-size: var(--typo-body-small-size);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: #FFFFFF;
  color: #121520;
}

.main-nav a:focus {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

/* Menú Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Submenú */
.has-submenu {
  position: static;
}

.submenu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #fff;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  opacity: 1;
  visibility: visible;
}

.submenu-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.submenu-column {
  flex: 0 0 auto;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}

.submenu-column:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e0e0e0;
}

.submenu-column h3 {
  color: #2e2e2e;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  padding-bottom: 0;
  border-bottom: none;
  text-align: left;
  white-space: nowrap;
}

.submenu-link {
  color: #555;
  text-decoration: none;
  font-size: 0.75rem;
  display: block;
  margin-left: 0;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.submenu-link:hover,
.submenu-link:focus {
  color: #2e2e2e;
  outline: none;
}

.submenu-column ul {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0;
  text-align: left;
}

.submenu-column li {
  margin-bottom: 0.5rem;
  text-align: left;
}

.submenu-column a {
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
  display: inline;
  line-height: 1.4;
  text-align: left;
  transition: color 0.3s ease;
}

.submenu-column a:hover,
.submenu-column a:focus {
  color: #121520;
  outline: none;
}

/* Selector de Idioma */
.language-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-selector a {
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.language-selector a:hover,
.language-selector a.active {
  background: #FFFFFF;
  color: #121520;
}

.language-selector a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.language-selector .separator {
  color: #fff;
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #121520;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.active {
    max-height: 100vh;
  }

  .main-nav ul {
    flex-direction: column;
    height: auto;
  }

  .main-nav li {
    height: auto;
  }

  .main-nav a {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    padding: 0;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .has-submenu.active .submenu {
    max-height: 500px;
  }

  .submenu-content {
    flex-direction: column;
    padding: 1rem 2rem;
  }

  .submenu-column::after {
    display: none;
  }
}

@media (max-width: 600px) {
  header.mini-header {
    padding: 0.5rem 0;
  }

  header .wrap {
    padding: 0 1rem;
  }

  .logo {
    height: 42px;
  }
}
