/* ============================================================
         CONFIGURACIÓN GENERAL del header
      ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ============================================================
         HEADER PRINCIPAL
      ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 1000;
  background: transparent;
  transition:
    background 0.4s ease,
    height 0.4s ease,
    box-shadow 0.4s ease;
}

.header.scrolled {
  height: 82px;
  background: rgba(12, 14, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}

.header-container {
  width: min(1500px, 92%);
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

/* ============================================================
         MARCA / LOGO
      ============================================================ */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: max-content;
}

.brand-logo {
  width: 59px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #fff;
}

.brand-subtitle {
  margin-top: 7px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 3.4px;
  color: rgba(255, 255, 255, 0.72);
}

/* ============================================================
         NAVEGACIÓN DESKTOP & SUBMENÚS
      ============================================================ */
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2.5vw, 45px);
  margin-left: auto;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.86);
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

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

/* Estilos Dropdown Desktop */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: rgba(12, 14, 16, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.nav-item.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ============================================================
         BOTONES HEADER
      ============================================================ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.header-button:hover {
  background: #fff;
  color: #111;
  transform: translateY(-2px);
}

/* ============================================================
         BOTÓN HAMBURGUESA
      ============================================================ */
.menu-toggle {
  display: none;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 5px;
  background: rgba(15, 15, 15, 0.75);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: #fff;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
         MENÚ MOBILE
      ============================================================ */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  padding: 0 6%;
  background: rgba(12, 14, 16, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow-y: auto;
  opacity: 0;
  transition:
    max-height 0.45s ease,
    opacity 0.35s ease,
    padding 0.45s ease;
}

.mobile-menu.active {
  max-height: 80vh;
  opacity: 1;
  padding-top: 20px;
  padding-bottom: 30px;
}

.mobile-link {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-dropdown {
  display: none;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.2);
  padding-left: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-dropdown.active {
  display: flex;
}

.mobile-sublink {
  padding: 12px 0;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-button {
  margin-top: 15px;
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
}

/* ============================================================
         BREAKPOINTS
      ============================================================ */
@media (max-width: 1150px) {
  .desktop-nav {
    gap: 20px;
  }

  .nav-link {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .header-button {
    min-width: 100px;
    font-size: 9px;
    padding: 0 10px;
  }
}

@media (max-width: 850px) {
  .header {
    height: 84px;
  }

  .header.scrolled {
    height: 74px;
  }

  .header-container {
    width: calc(100% - 38px);
  }

  .desktop-nav,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 45px;
    height: 45px;
  }

  .brand-name {
    font-size: 17px;
    letter-spacing: 4px;
  }

  .brand-subtitle {
    margin-top: 5px;
    font-size: 6.5px;
    letter-spacing: 2.6px;
  }
}
