/* ==========================================
   HEADER - YACHAY
   ========================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  z-index: var(--z-fixed);
  transition: var(--transition);
  border-bottom: 1px solid rgba(2, 132, 199, 0.1);
}

.header.scrolled {
  box-shadow: var(--shadow-lg);
  background: var(--header-scrolled-bg);
  backdrop-filter: blur(10px);
}

.header-container {
  padding: 25px var(--spacing-lg) 25px 50px;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 100px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-family: var(--font-secondary);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary-600);
  text-decoration: none;
  transition: var(--transition);
  justify-self: start;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: var(--text-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

[data-theme="dark"] .logo-icon {
  color: #ffffff;
}

.logo-text {
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navegación */
.nav {
  display: flex;
  align-items: center;
  justify-self: center;
}



.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-base);
  padding: var(--spacing-sm) 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-600), var(--secondary-600));
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--primary-600);
}

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

.nav-link.active {
  color: var(--primary-600);
  font-weight: 600;
}

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

/* Botones de Acción */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  justify-self: end;
}

/* Responsive para mobile */
@media (max-width: 1382px) {
  .header-container {
    justify-content: space-between;
    padding: 15px var(--spacing-md);
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
  }

  .logo {
    font-size: var(--text-lg);
    gap: var(--spacing-sm);
  }

  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: flex-start;
    padding: 100px var(--spacing-xl) var(--spacing-xl);
    box-shadow: var(--shadow-2xl);
    transition: var(--transition);
    z-index: var(--z-fixed);
    transform: none;
    overflow-y: auto;
  }

  .nav.active {
    left: 0;
  }

  .header-container > .nav-actions {
    display: none;
  }

  .nav .nav-actions {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    margin-top: var(--spacing-2xl);
    gap: var(--spacing-md);
  }

  .menu-toggle {
    display: flex;
  }
}

/* Botón de Menú Móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  z-index: calc(var(--z-fixed) + 10);
}.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--primary-600);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

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

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

/* Search Bar (opcional) */
.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  padding: var(--spacing-sm) var(--spacing-lg);
  padding-left: var(--spacing-3xl);
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  transition: var(--transition);
  width: 200px;
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-600);
  width: 250px;
}

.header-search i {
  position: absolute;
  left: var(--spacing-md);
  color: var(--text-tertiary);
}

/* Desktop - nav visible y centrado */
@media (min-width: 1383px) {
  .nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    background: transparent;
    flex-direction: row;
    padding: 0;
    box-shadow: none;
    z-index: auto;
  }

  .nav-menu {
    display: flex;
    gap: var(--spacing-xl);
  }

  .menu-toggle {
    display: none;
  }

  .nav .nav-actions {
    display: none !important;
  }

  .header-container > .nav-actions {
    display: flex !important;
  }
}

/* ===========================================
   ESTILOS PARA ELEMENTOS SIN INLINE CSS
   =========================================== */

/* Botón de tema */
.theme-toggle-btn {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 2px solid var(--primary-200);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle-btn i {
  color: var(--text-primary);
  font-size: var(--text-lg);
}

/* User menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Botones con espaciado */
.btn-preguntas,
.btn-rechazados,
.btn-admin {
  margin-right: var(--spacing-sm);
}

/* Enlace de perfil */
.perfil-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-full);
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

/* Avatar */
.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-icon {
  font-size: 1.5rem;
}

/* Formulario de logout */
.logout-form {
  margin: 0;
}

.logout-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}
