.header {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(7, 40, 80, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  backdrop-filter: blur(10px);
  will-change: transform, opacity;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px 0 50px; /* Más espacio a ambos lados para separar logo y menú */
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-container {
  flex-shrink: 0;
  margin-right: 40px; /* Espacio entre el logo y los enlaces de navegación */
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 55px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
  transform: scale(1.05);
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-family: 'NeoTech Bold', 'Arial Black', Arial, sans-serif;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 8px 0;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  will-change: transform;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary-orange);
  transition: width 0.25s ease, left 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%);
  border-radius: 2px;
  will-change: width, left, transform;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-orange);
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
  transform: translateX(0);
}

.admin-panel-link {
  background: linear-gradient(135deg, var(--primary-orange), #ff8c42) !important;
  color: var(--white) !important;
  padding: 6px 14px !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(240, 111, 12, 0.25);
  position: relative;
  overflow: hidden;
}

.admin-panel-link::after {
  display: none;
}

.admin-panel-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.admin-panel-link:hover::before {
  width: 300px;
  height: 300px;
}

.admin-panel-link:hover {
  background: linear-gradient(135deg, #e0650a, #ff7b29) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 111, 12, 0.35);
}

.admin-panel-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(240, 111, 12, 0.3);
}

.logout-btn {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'DeoTech Bold', Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.logout-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.logout-btn:hover::before {
  width: 300px;
  height: 300px;
}

.logout-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.admin-link {
  color: var(--primary-blue);
  font-family: 'DeoTech Bold', Arial, sans-serif;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid var(--primary-blue);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-link::after {
  display: none;
}

.admin-link:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(7, 40, 80, 0.2);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--primary-blue);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 24px;
  /* Mejoras para móviles */
  -webkit-tap-highlight-color: rgba(7, 40, 80, 0.1);
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0; /* Sin margen negativo para más espacio */
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(7, 40, 80, 0.15);
  padding: 20px 30px; /* Más padding horizontal para evitar que se corte "Contacto" */
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--primary-orange);
  animation: slideDownMenu 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden; /* Evitar scroll horizontal */
  word-wrap: break-word; /* Permitir que el texto se ajuste */
}

@keyframes slideDownMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-item {
  display: block;
  padding: 15px 0;
  color: var(--primary-blue);
  text-decoration: none;
  font-family: 'DeoTech Bold', Arial, sans-serif;
  font-weight: 500;
  border-bottom: 1px solid var(--blue-very-light);
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  /* Mejoras para móviles */
  -webkit-tap-highlight-color: rgba(7, 40, 80, 0.1);
  touch-action: manipulation;
  min-height: 44px;
  display: flex;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap; /* Evitar que el texto se corte */
  overflow: visible; /* Asegurar que el texto completo sea visible */
}

.mobile-menu-item:hover {
  color: var(--primary-orange);
  background: var(--blue-very-light);
  padding-left: 12px;
  transform: translateX(4px);
}

.admin-panel-mobile {
  background: linear-gradient(135deg, var(--primary-orange), #ff8c42) !important;
  color: var(--white) !important;
  border-radius: 8px;
  margin: 8px 0;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px !important;
  border: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(240, 111, 12, 0.25);
}

.admin-panel-mobile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 111, 12, 0.35);
}

.logout-mobile {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  color: var(--white) !important;
  border-radius: 8px;
  margin: 8px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px !important;
  border: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.logout-mobile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    margin-right: -10px; /* Más espacio a la derecha en móviles */
  }

  .nav-content {
    height: 70px;
  }

  .logo-img {
    height: 45px;
  }

  .nav-container {
    padding: 0 50px 0 40px; /* Más espacio a ambos lados en móviles */
  }

  .logo-container {
    margin-right: 20px; /* Espacio entre logo y menú en móviles */
  }
}

/* ===== ADMIN LOGIN MODAL ===== */
.admin-login-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-login-modal-content {
  background-color: white;
  border-radius: 16px;
  padding: 0;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.admin-login-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0a3d6e 100%);
  color: white;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-login-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'DeoTech Bold', Arial, sans-serif;
}

.admin-login-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}

.admin-login-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.admin-login-form-group {
  margin-bottom: 20px;
  padding: 0 24px;
}

.admin-login-form-group:first-of-type {
  margin-top: 24px;
}

.admin-login-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--primary-blue);
  font-size: 0.95rem;
  font-family: 'DeoTech Bold', Arial, sans-serif;
}

.admin-login-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.admin-login-form-group input:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(240, 111, 12, 0.1);
}

.admin-login-error {
  background: #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 24px 20px;
  font-size: 0.9rem;
  border: 1px solid #fecaca;
}

.admin-login-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 20px 24px 24px;
  border-top: 2px solid #e5e7eb;
  margin-top: 8px;
}

.admin-login-cancel-btn,
.admin-login-submit-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'DeoTech Bold', Arial, sans-serif;
}

.admin-login-cancel-btn {
  background: #f3f4f6;
  color: #666;
}

.admin-login-cancel-btn:hover {
  background: #e5e7eb;
}

.admin-login-submit-btn {
  background: linear-gradient(135deg, var(--primary-orange), #ff8c42);
  color: white;
  box-shadow: 0 4px 12px rgba(240, 111, 12, 0.3);
}

.admin-login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e0650a, #ff7b29);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(240, 111, 12, 0.4);
}

.admin-login-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive para modal */
@media (max-width: 480px) {
  .admin-login-modal-content {
    width: 95%;
  }

  .admin-login-actions {
    flex-direction: column;
  }

  .admin-login-cancel-btn,
  .admin-login-submit-btn {
    width: 100%;
  }
}

