/* === RESET GENERAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f7f8fa;
  color: #333;
}

/* === HEADER GENERAL === */
.main-header {
  background: linear-gradient(135deg, black);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  transition: all 0.3s ease;
}

.container-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* === LOGO === */
.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease;
}

.logo img {
  height: 70px;          /* tamaño razonable */
  width: auto;
  margin-right: 10px;
  border-radius: 8px;
  object-fit: contain;
}

.logo a:hover {
  transform: scale(1.05);
}


/* === NAV LINKS === */
.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #fff;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 0.85;
}

/* === USER ACTIONS === */
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.saludo {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

/* --- Botones individuales --- */
.btn-login {
  background: #fff;
  color: #0057b8;
}

.btn-login:hover {
  background: #eaf2ff;
  transform: translateY(-1px);
}

.btn-perfil {
  background: #00d27f;
  color: #fff;
}

.btn-perfil:hover {
  background: #00b76c;
  transform: translateY(-1px);
}

.btn-logout {
  background: #ff4b4b;
  color: #fff;
}

.btn-logout:hover {
  background: #e03e3e;
  transform: translateY(-1px);
}

/* === MENÚ HAMBURGUESA === */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: all 0.4s ease;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .menu-toggle {
    display: flex;
  }

  .user-actions {
    display: none;
  }

  .logo img {
    height: 60px;
  }
}

/* === MODAL LOGIN === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

.modal-box {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 25px;
  cursor: pointer;
  color: #333;
}

.modal-box h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.modal-box input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.modal-box button {
  width: 100%;
  background: #3498db;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.modal-box button:hover {
  background: #2980b9;
}
/* Efecto de parpadeo/resaltado del formulario */
.highlight-form {
  animation: flashBorder 1.5s ease;
}

@keyframes flashBorder {
  0%, 100% { box-shadow: 0 0 0px rgba(0, 123, 255, 0); }
  50% { box-shadow: 0 0 20px rgba(0, 123, 255, 0.8); }
}
