/* ============================================================
   NAV.CSS — Header + Navegación
   Colores principales: #5B2C6F (morado oscuro), #8E44AD (morado)
   ============================================================ */

/* 1. RESET */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 2. HEADER */
.main-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #3d1a57 0%, #5B2C6F 45%, #8E44AD 100%);
  box-shadow: 0 4px 16px rgba(91, 44, 111, 0.45);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 3. TÍTULO */
.title-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  object-fit: cover;
  transition: transform 0.3s ease;
}
.logo-icon:hover { transform: rotate(8deg) scale(1.1); }

.event-title {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}
.event-title span { font-weight: 300; color: #f0c0ff; }
.event-title:hover { color: #ffd700; }

/* 4. NAVEGACIÓN (escritorio) */
#menu-toggle { display: none; }

.menu-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.menu-toggle-label span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.main-nav a:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-1px);
}
.main-nav a.btn-back {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255,215,0,0.3);
  color: #ffd700;
}
.main-nav a.btn-back:hover {
  background: rgba(255,215,0,0.3);
}

/* 5. INFO DE USUARIO (pantalla de votación) */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0.5rem 1.2rem;
}
.user-info .user-name {
  font-weight: 700;
  color: #ffd700;
  font-size: 0.95rem;
  text-shadow: 0 0 8px rgba(255,215,0,0.5);
}
.user-info .logout-button {
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 8px rgba(231,76,60,0.4);
  white-space: nowrap;
}
.user-info .logout-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 14px rgba(231,76,60,0.5);
}

/* 6. RESPONSIVE */
@media (max-width: 768px) {
  .main-header {
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
  }

  .menu-toggle-label { display: flex; }

  .main-nav {
    display: none;
    width: 100%;
    margin-top: 0.8rem;
  }
  #menu-toggle:checked ~ .main-nav { display: block; }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .main-nav a {
    display: block;
    text-align: center;
    padding: 0.7rem 1rem;
  }

  .user-info {
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.6rem 1rem;
  }
  .event-title { font-size: 1.2rem; }
}
