/* ==============================================
   NAVEGACIÓN
   ============================================== */

/* Variables de color de acento (reemplazadas por tonos gris/plateado) */
:root {
  --gold-primary: #B0B7BD; /* plateado primario */
  --gold-light: #D8DCE0;   /* plateado claro */
  --gold-dark: #8D9398;    /* gris oscuro */
  --gold-accent: #C4C8CC;  /* plateado acento */
} 

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(135deg, #1a1f2e 0%, #252b3b 50%, #2a3142 100%);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(201, 169, 97, 0.15);
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(176, 183, 189, 0.25);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  position: relative;
  min-height: 90px;
  gap: var(--space-lg);
  transition: padding var(--transition-base), min-height var(--transition-base);
}

.header.scrolled .header__container {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  min-height: 64px;
}

/* Logo centrado */
.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.header__logo-image {
  height: 48px;
  width: auto;
  object-fit: contain;
  backface-visibility: hidden;
  transition: height var(--transition-base);
}

.header.scrolled .header__logo-image {
  height: 36px;
}

@media (min-width: 1024px) {
  .header__logo-image {
    height: 56px;
  }

  .header.scrolled .header__logo-image {
    height: 42px;
  }
}

/* Navegación desktop */
.nav {
  display: none;
  position: relative;
  z-index: 5;
}

.nav--left {
  margin-right: auto;
}

.nav--right {
  margin-left: auto;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
  }
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f5f5f5;
  text-decoration: none;
  padding: 0.75rem 1rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--gold-primary);
  background: rgba(176, 183, 189, 0.08);
  transform: translateY(-1px);
}

.nav__link.active {
  color: var(--gold-primary);
  background: rgba(176, 183, 189, 0.12);
  font-weight: 600;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.nav__link:hover::after {
  width: 70%;
  opacity: 1;
}

.nav__link.active::after {
  width: 70%;
  opacity: 1;
  background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
}

/* Menú móvil toggle (hamburguesa) */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(176, 183, 189, 0.1);
  border: 1px solid rgba(176, 183, 189, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  z-index: 5;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-menu-toggle:hover {
  background: rgba(176, 183, 189, 0.2);
  border-color: var(--gold-primary);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Ajustes responsive */
@media (max-width: 1023px) {
  .header__logo-image {
    height: 44px;
  }

  /* Aseguramos que el toggle quede siempre a la derecha */
  .mobile-menu-toggle {
    margin-left: auto;
  }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 767px) {
  .header__logo-image {
    height: 40px;
  }
}


.mobile-menu-toggle__bar {
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 3px 0;
  border-radius: 2px;
}

.mobile-menu-toggle:hover .mobile-menu-toggle__bar {
  background: linear-gradient(90deg, var(--gold-light), var(--gold-accent));
  box-shadow: 0 0 8px rgba(176, 183, 189, 0.4);
}

.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg) !important;
  background: linear-gradient(90deg, var(--gold-accent), var(--gold-light)) !important;
}

.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(2) {
  opacity: 0 !important;
}

.mobile-menu-toggle.active .mobile-menu-toggle__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg) !important;
  background: linear-gradient(90deg, var(--gold-accent), var(--gold-light)) !important;
}

/* Menú móvil */
.mobile-menu {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100vh !important;
  background: linear-gradient(135deg, #1a1f2e 0%, #252b3b 100%) !important;
  z-index: 1030 !important;
  padding: 5rem 2rem 2rem !important;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow-y: auto !important;
}

/* Botón de cierre (X) dentro del menú móvil */
.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(176, 183, 189, 0.1);
  border: 1px solid rgba(176, 183, 189, 0.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  z-index: 1040;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(176, 183, 189, 0.2);
  border-color: var(--gold-primary);
  transform: rotate(90deg);
}

.mobile-menu-close__bar {
  position: absolute;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-close__bar:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-menu-close__bar:nth-child(2) {
  transform: rotate(-45deg);
}

.mobile-menu-close:hover .mobile-menu-close__bar {
  background: linear-gradient(90deg, var(--gold-light), var(--gold-accent));
  box-shadow: 0 0 8px rgba(176, 183, 189, 0.4);
}

.mobile-menu.active {
  left: 0 !important;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none;
  }
}

.mobile-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu__item {
  border-bottom: 1px solid rgba(201, 169, 97, 0.15);
}

.mobile-menu__link {
  display: block;
  padding: 1.25rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #f5f5f5;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-menu__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), transparent);
  transition: width 0.3s ease;
}

.mobile-menu__link:hover,
.mobile-menu__link.active {
  color: var(--gold-primary);
  padding-left: 1.5rem;
}

.mobile-menu__link:hover::before,
.mobile-menu__link.active::before {
  width: 1rem;
}

.mobile-menu__link.active {
  font-weight: 600;
  color: var(--gold-accent);
}

.mobile-menu__cta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201, 169, 97, 0.2);
}

.mobile-menu__cta .btn {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 100%);
  border: 1px solid var(--gold-accent);
  box-shadow: 0 4px 15px rgba(176, 183, 189, 0.3);
}
