/*
==============================================
PLEY — HEADER CSS
Contiene: header-blur, navegación desktop,
navegación mobile, botones del header.
==============================================
*/

/* ============================================
   HEADER — Contenedor principal
   ============================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}

.header-blur {
  backdrop-filter: blur(20px);
  background-color: #0d0220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

/* ============================================
   LOGO
   ============================================ */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo img {
  height: 3rem;
  width: auto;
  object-fit: contain;
}

/* ============================================
   NAVEGACIÓN DESKTOP
   ============================================ */
.header-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.35rem;
  transition: color 0.3s ease;
}

.header-nav a:hover,
.header-nav a.active {
  color: #dd00ff;
}

/* Línea animada bajo los links de nav */
.header-nav a .nav-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #dd00ff;
  transition: width 0.3s ease;
}

.header-nav a:hover .nav-underline,
.header-nav a.active .nav-underline {
  width: 100%;
}

/* ============================================
   CTA BUTTONS DEL HEADER
   ============================================ */
.header-cta {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.header-btn-secondary {
  padding: 0.5rem 1rem !important;
  min-height: 40px;
  font-size: 0.875rem;
}

.header-cta .header-btn-secondary {
  width: auto;
  min-width: 0;
  min-height: 40px;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* El CTA del header se mantiene plano, sin halo ni sombra. */
.header-cta .gradient-btn,
.header-cta .gradient-btn:hover,
.mobile-nav-cta .gradient-btn,
.mobile-nav-cta .gradient-btn:hover {
  box-shadow: none !important;
}

/* ============================================
   BOTÓN HAMBURGUESA — MOBILE
   ============================================ */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
}

/* ============================================
   MENÚ MOBILE
   ============================================ */
.mobile-menu {
  display: none;
}

.mobile-menu-items {
  background: rgba(13, 2, 32, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  max-height: calc(100dvh - var(--site-header-height-mobile, 64px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 1rem 1.5rem;
}

.mobile-nav a {
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.2s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #dd00ff;
}

.mobile-nav a.active {
  border-bottom-color: #dd00ff;
}

.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
}

.mobile-btn-secondary {
  padding: 0.75rem 1.5rem !important;
  min-height: 48px;
  font-size: 1rem;
}

.mobile-nav-cta .mobile-btn-secondary {
  width: auto;
  min-width: 0;
  min-height: 48px;
  padding: 0.75rem 1.5rem !important;
  line-height: 1.2;
  white-space: nowrap;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Desktop: mostrar nav y CTA, ocultar hamburguesa */
@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }

  .header-cta {
    display: flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .header-container {
    padding: 1rem 1rem;
  }

  .header-nav a {
    font-size: 1.125rem;
  }

  .header-logo img {
    height: 4rem;
  }
}

/* Mobile: padding reducido */
@media (max-width: 1024px) {
  .header-blur {
    padding: 0;
  }

  .header-container {
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  .mobile-nav {
    padding: 0.35rem 1rem 0.75rem;
  }

  .mobile-nav a {
    padding: 0.45rem 0;
    font-size: 0.92rem;
  }

  .mobile-nav-cta {
    gap: 0.5rem;
    padding-top: 0.75rem;
  }

  .mobile-nav-cta .mobile-btn-secondary {
    min-height: 40px;
    padding: 0.55rem 1rem !important;
    font-size: 0.9rem;
  }
}
