/* ========================================
   🎨 COMPONENTES GLOBALES - BILLETAXO
   Estilos unificados para header, hero y footer
   Basado en el estilo de recargas-cuba
   ======================================== */

/* 🎯 Variables CSS (si no están definidas en otro lugar) */
:root {
  --primary: #1E3A8A;
  --secondary: #22D3EE;
  --accent: #FACC15;
  --gold: #FACC15; /* Color dorado para H4 en footer */
  --font-elegant: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display-elegant: 'Playfair Display', Georgia, serif;
}

/* ========================================
   📱 HEADER GLOBAL - ESTILO eSIM (GRADIENTE AZUL-CYAN)
   ======================================== */
.header-modern {
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%) !important;
  padding: 1rem 0;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: visible !important; /* 🔒 FIX: Permitir que dropdowns no se corten */
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: -webkit-box; /* Safari fallback */
  display: -webkit-flex; /* Safari fallback */
  display: flex;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  -webkit-box-pack: justify; /* Safari */
  -webkit-justify-content: space-between; /* Safari */
  justify-content: space-between;
  width: 100%;
  -webkit-box-sizing: border-box; /* Safari */
  box-sizing: border-box;
  gap: 1rem; /* Espacio reducido entre logo y navegación */
  /* Fix para Safari: asegurar que flex funcione correctamente */
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  overflow: visible !important; /* 🔒 FIX: Permitir que dropdowns no se corten */
}

/* Logo fijo en esquina superior izquierda - VERSIÓN WEB */
.logo-section {
  display: -webkit-box; /* Safari fallback */
  display: -webkit-flex; /* Safari fallback */
  display: flex;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  gap: 0.5rem;
  -webkit-flex-shrink: 0; /* Safari */
  flex-shrink: 0;
  -webkit-box-ordinal-group: 2; /* Safari */
  -webkit-order: 1; /* Safari */
  order: 1;
  margin-right: 0;
  min-width: -webkit-fit-content; /* Safari */
  min-width: fit-content;
}

/* Navegación principal - VERSIÓN WEB */
.nav-main {
  -webkit-box-ordinal-group: 3; /* Safari */
  -webkit-order: 2; /* Safari */
  order: 2;
  -webkit-box-flex: 1; /* Safari */
  -webkit-flex: 1; /* Safari */
  flex: 1;
  display: -webkit-box; /* Safari fallback */
  display: -webkit-flex; /* Safari fallback */
  display: flex;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  -webkit-box-pack: start; /* Safari */
  -webkit-justify-content: flex-start; /* Safari */
  justify-content: flex-start;
  gap: 0.75rem; /* Espaciado reducido entre botones para que todo quepa */
  min-width: 0;
  overflow: visible; /* Permitir que se vea todo */
}

/* Layout móvil: logo a la izquierda, botón login/registro a la derecha */
@media (max-width: 768px) {
  .header-modern .header-content {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.75rem 1rem !important;
    min-height: auto !important;
    position: relative !important;
  }

  .header-modern .logo-section {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    z-index: 10;
    order: 1 !important;
  }

  .header-modern .nav-main {
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-top: 0 !important;
    position: relative !important;
    order: 2 !important;
  }

  .header-modern .hamburger.btn-menu {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    z-index: 10;
    order: 3 !important;
  }

  .header-modern .header-auth {
    position: static !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
    order: 2 !important;
    z-index: 10;
  }

  .header-modern .nav-links {
    display: none !important; /* Se muestra en menú móvil */
  }
}

.logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  padding: 4px;
}

.logo img {
  height: 38px;
  width: auto;
  max-width: 38px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display-elegant, 'Playfair Display', Georgia, serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-text:hover {
  color: var(--accent);
}

/* Esta regla está duplicada - se maneja arriba en la sección principal */

/* Sección de Autenticación en Header - Estilo Moderno */
.header-auth {
  display: -webkit-box; /* Safari fallback */
  display: -webkit-flex; /* Safari fallback */
  display: flex;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  gap: 0.5rem;
  -webkit-flex-shrink: 0; /* Safari */
  flex-shrink: 0;
  -webkit-box-ordinal-group: 4; /* Safari */
  -webkit-order: 3; /* Safari */
  order: 3; /* Después del nav-main */
  margin-left: 1rem; /* Espacio después del nav-main */
  /* Fix Safari: asegurar que el botón sea clickeable */
  position: relative;
  z-index: 10;
}

/* Botón unificado Login/Registro */
.btn-auth {
  display: -webkit-inline-box; /* Safari fallback */
  display: -webkit-inline-flex; /* Safari fallback */
  display: inline-flex;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(10px); /* Safari */
  backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* Safari: quitar highlight al tocar */
  -webkit-user-select: none; /* Safari: evitar selección de texto */
  user-select: none;
  -webkit-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Safari */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  max-width: 100%;
  /* Fix Safari: asegurar que el botón sea clickeable */
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation; /* Mejorar respuesta táctil en Safari */
}

.btn-auth::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-auth:hover::before {
  left: 100%;
}

.btn-auth:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-auth-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.btn-auth-text {
  font-size: 0.85rem;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  white-space: nowrap;
  /* 🔒 FIX: Forzar color visible para evitar texto invisible en modo invitado */
  color: white !important;
  -webkit-text-fill-color: white !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-auth-text [data-auth-user-name] {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: inherit;
  font-weight: inherit;
}

/* Badge de verificación en botón auth */
.btn-auth .verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.4rem;
  line-height: 1;
  vertical-align: middle;
}

/* Asegurar que el botón sea visible cuando el usuario está logueado */
.btn-auth[data-auth="logged-in"] {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-link {
  color: white;
  text-decoration: none;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.auth-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.auth-link:hover::before {
  left: 100%;
}

.auth-link-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.auth-link-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-link-primary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-link-primary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.auth-link-logout {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.auth-link-logout:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-size: 0.9rem;
}

.auth-user-name {
  color: var(--accent, #FACC15);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.2);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-user-name::before {
  content: '👤';
  font-size: 1rem;
}

.auth-user-name:hover {
  background: rgba(250, 204, 21, 0.2);
  border-color: rgba(250, 204, 21, 0.4);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.3);
}

.auth-user-name span {
  color: inherit;
}

/* Autenticación en menú móvil - Estilo Moderno */
.mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 1rem;
}

.mobile-auth a {
  display: block;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 500;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.mobile-auth a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-auth-user {
  color: var(--accent, #FACC15) !important;
  background: rgba(250, 204, 21, 0.15) !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
  font-weight: 600 !important;
}

.mobile-auth-user:hover {
  background: rgba(250, 204, 21, 0.25) !important;
  border-color: rgba(250, 204, 21, 0.5) !important;
  color: white !important;
}

.mobile-auth-logout {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.mobile-auth-trigger {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  text-align: center;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  font-family: var(--font-elegant, 'Inter', sans-serif);
}

.mobile-auth-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal de Autenticación - SIEMPRE OCULTO POR DEFECTO */
.auth-modal {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  -webkit-box-align: center; /* Safari */
  -webkit-align-items: center; /* Safari */
  align-items: center;
  -webkit-box-pack: center; /* Safari */
  -webkit-justify-content: center; /* Safari */
  justify-content: center;
  opacity: 0 !important;
  -webkit-transition: opacity 0.3s ease, visibility 0.3s ease; /* Safari */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ocultar tabs cuando el usuario está logueado */
.auth-modal[data-auth-state="logged-in"] .auth-tabs[data-auth-tabs="guest"],
.auth-modal[data-auth-state="logged-in"] [data-auth-panel-guest="true"] {
  display: none !important;
}

/* Mostrar panel de usuario cuando está logueado */
.auth-modal[data-auth-state="logged-in"] [data-auth-panel-user="true"] {
  display: block !important;
}

/* Modal oculto por defecto - REGLAS FUERTES */
.auth-modal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.auth-modal[aria-hidden="true"],
.auth-modal[hidden],
.auth-modal:not(.active):not([aria-hidden="false"]) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Asegurar que el modal esté oculto por defecto incluso sin aria-hidden */
.auth-modal:not([aria-hidden="false"]) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Solo mostrar cuando explícitamente está abierto */
.auth-modal[aria-hidden="false"],
.auth-modal.active,
.auth-modal:not([hidden]):not([aria-hidden="true"]) {
  display: -webkit-box !important; /* Safari fallback */
  display: -webkit-flex !important; /* Safari */
  display: flex !important;
  -webkit-box-align: center !important; /* Safari */
  -webkit-align-items: center !important; /* Safari */
  align-items: center !important;
  -webkit-box-pack: center !important; /* Safari */
  -webkit-justify-content: center !important; /* Safari */
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.auth-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  animation: modalSlideIn 0.3s ease;
  padding: 0;
}

/* Tabs del modal */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 2rem;
  border-bottom: 2px solid #E5E7EB;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

/* Panels del modal */
.auth-panel {
  display: none !important; /* Forzar ocultación por defecto */
  padding: 0 2rem 2rem 2rem;
}

.auth-panel.active {
  display: block !important; /* Solo el activo se muestra */
}

.auth-panel-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
  text-align: center;
}

/* Formularios del modal */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-form-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #6B7280;
}

.auth-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #FEF2F2;
  border-radius: 8px;
  border-left: 3px solid #EF4444;
}

.auth-switch {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #6B7280;
}

.auth-switch-link {
  color: #1E3A8A;
  text-decoration: none;
  font-weight: 600;
  /* Color changes don't need transition - no layout impact */
}

.auth-switch-link:hover {
  color: #22D3EE;
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  margin-top: 1rem;
  position: relative;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-submit-text,
.auth-submit-loading {
  display: inline-block;
}

/* Panel de usuario logueado - Estilos mejorados y elegantes */
#auth-panel-user {
  padding: 2.5rem 2rem;
  text-align: center;
}

#auth-panel-user .auth-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1E3A8A;
  margin-bottom: 1.5rem;
  padding: 0;
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-user-info {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  border-radius: 16px;
  border: 2px solid #E0F2FE;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-user-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.12);
  border-color: #22D3EE;
}

.auth-user-info p {
  margin: 0;
  color: #1F2937;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-user-info strong {
  color: #1E3A8A;
  font-weight: 600;
}

.auth-user-info span {
  color: #6B7280;
  font-weight: 400;
}

.auth-user-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.auth-action-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #22D3EE 100%);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
  position: relative;
  overflow: hidden;
}

.auth-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-action-btn:hover::before {
  left: 100%;
}

.auth-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.35);
  background-position: right center;
}

.auth-action-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.auth-logout-btn {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 50%, #B91C1C 100%);
  background-size: 200% 200%;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.auth-logout-btn:hover {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
  background-position: right center;
}

/* Mensaje de éxito en formularios de autenticación */
.auth-success {
  display: none;
  padding: 1rem;
  background: #D1FAE5;
  border-left: 4px solid #10B981;
  color: #065F46;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #6B7280;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
}

.auth-modal-close:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.auth-modal-title {
  margin: 0 0 1.5rem 0;
  padding: 2rem 2rem 0 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
  text-align: center;
}

.auth-modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 2rem;
  border-bottom: 2px solid #E5E7EB;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--font-elegant, 'Inter', sans-serif);
}

.auth-tab:hover {
  color: #1E3A8A;
}

.auth-tab.active {
  color: #1E3A8A;
  border-bottom-color: #1E3A8A;
}

.auth-modal-body {
  padding: 0 2rem 2rem 2rem;
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.auth-form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 1rem;
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.auth-form-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #FEF2F2;
  border-radius: 8px;
  border-left: 3px solid #EF4444;
  display: none;
}

.auth-form-error:not(:empty) {
  display: block;
}

.auth-form-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  margin-top: 1rem;
}

.auth-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.auth-form-submit:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .header-modern .nav-main {
    gap: 0.5rem !important;
  }

  .header-auth {
    display: flex !important;
    position: static !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
    z-index: 10;
    max-width: 120px; /* Limitar ancho para no chocar con hamburger */
    order: 2 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .btn-auth {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.75rem !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    gap: 0.3rem !important;
    max-width: 100%;
    min-width: 0 !important;
    width: auto !important;
  }

  /* Cuando el usuario NO está logueado: mostrar icono + texto */
  .btn-auth[data-auth="logged-out"] .btn-auth-text[data-auth="logged-out"],
  .btn-auth:not([data-auth="logged-in"]) .btn-auth-text[data-auth="logged-out"] {
    display: inline !important;
    font-size: 0.7rem !important;
    color: white !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-auth[data-auth="logged-out"] .btn-auth-icon,
  .btn-auth:not([data-auth="logged-in"]) .btn-auth-icon {
    display: inline !important;
    font-size: 0.9rem !important;
    flex-shrink: 0;
  }

  .btn-auth[data-auth="logged-out"] .btn-auth-text[data-auth="logged-in"],
  .btn-auth:not([data-auth="logged-in"]) .btn-auth-text[data-auth="logged-in"] {
    display: none !important;
  }

  /* Cuando el usuario SÍ está logueado: mostrar solo nombre en blanco */
  .btn-auth[data-auth="logged-in"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .btn-auth[data-auth="logged-in"] .btn-auth-text[data-auth="logged-in"] {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.75rem !important;
    color: white !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.2px !important;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-auth[data-auth="logged-in"] .btn-auth-text[data-auth="logged-in"] [data-auth-user-name] {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: white !important;
    font-weight: 600 !important;
  }



  .btn-auth-text .user-first-name {
    display: inline !important;
  }

  .btn-auth[data-auth="logged-in"] .btn-auth-text[data-auth="logged-out"],
  .btn-auth[data-auth="logged-in"] .btn-auth-icon {
    display: none !important; /* Ocultar icono y texto cuando está logueado */
  }

  .btn-auth-icon {
    font-size: 0.9rem !important;
    margin-right: 0.2rem;
    flex-shrink: 0;
  }

  .auth-buttons {
    gap: 0;
  }

  .auth-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* Asegurar que solo el tab activo se muestre en móvil */
  .auth-tab-content {
    display: none !important;
  }

  .auth-tab-content.active {
    display: block !important;
  }

  /* Ocultar tabs inactivos en móvil - solo mostrar el activo */
  .auth-tab:not(.active) {
    opacity: 0.5;
  }

  /* Asegurar que el botón de submit solo se muestre en el tab activo */
  .auth-tab-content:not(.active) .auth-form-submit {
    display: none !important;
  }

  .auth-tab-content.active .auth-form-submit {
    display: block !important;
  }

  /* Asegurar que el modal tenga el tamaño correcto en móvil */
  .auth-modal-content {
    max-width: 75%;
    width: 75%;
    margin: 1rem;
  }

  .auth-tabs {
    padding: 0 1rem;
    margin-top: 1.5rem;
  }

  .auth-panel {
    padding: 0 1rem 1.5rem 1rem;
  }

  .auth-panel-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .auth-modal-title {
    padding: 1.5rem 1rem 0 1rem;
    font-size: 1.25rem;
  }

  .auth-modal-tabs {
    padding: 0 1rem;
  }

  .auth-modal-body {
    padding: 0 1rem 1.5rem 1rem;
  }

  /* Reducir tamaño del modal de usuario en 40% */
  .auth-user-info {
    margin-bottom: 1.2rem;
    padding: 0.9rem;
    border-radius: 10px;
  }

  .auth-user-info p {
    font-size: 0.6rem;
  }

  .auth-user-actions {
    gap: 0.6rem;
    margin-top: 0.9rem;
  }

  .auth-action-btn {
    padding: 0.6rem 0.9rem;
    border-radius: 7px;
    font-size: 0.6rem;
  }

  #auth-panel-user {
    padding: 1.5rem 1.2rem;
  }

  #auth-panel-user .auth-panel-title {
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.75rem; /* Espaciado reducido entre todos los botones */
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: nowrap;
  overflow: visible;
}

.nav-links li {
  margin: 0;
  padding: 0;
  flex-shrink: 0; /* No permitir que los items se encojan */
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  white-space: nowrap; /* Evitar que el texto se divida */
  display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

/* ========================================
   🌟 HERO GLOBAL - ESTILO eSIM (GRADIENTE AZUL-CYAN)
   ======================================== */
.home-hero {
  background: linear-gradient(135deg, #22D3EE 0%, #1E3A8A 50%, #1E3A8A 100%) !important;
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display-elegant, 'Playfair Display', Georgia, serif);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
  color: white;
  line-height: 1.2;
}

.hero-subtitle {
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  opacity: 0.95;
  position: relative;
  z-index: 2;
  color: white;
  line-height: 1.3;
}

.hero-description {
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  line-height: 1.4;
  margin-bottom: 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
  color: white;
}

/* Animación fade-in */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   📄 FOOTER GLOBAL - ESTILO eSIM (GRADIENTE AZUL-CYAN)
   ======================================== */
.footer-main,
footer {
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%) !important;
  color: white !important;
  padding: 3rem 0 1.5rem !important;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* 🎯 H4 DORADOS EN FOOTER - CRÍTICO (ESTILO eSIM) */
.footer-section h4,
.footer-main .footer-section h4,
footer .footer-section h4 {
  color: #FACC15 !important; /* Color dorado de eSIM */
  font-family: var(--font-display-elegant, 'Playfair Display', Georgia, serif) !important;
  font-size: 1.2rem;
  font-weight: 700 !important;
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
  opacity: 1 !important;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a,
.footer-main .footer-section ul li a,
footer .footer-section ul li a {
  color: white !important;
  font-family: var(--font-elegant, 'Inter', sans-serif) !important;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  font-size: 0.95rem;
  display: inline-block;
  opacity: 1 !important;
}

.footer-section ul li a:hover,
.footer-main .footer-section ul li a:hover,
footer .footer-section ul li a:hover {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: underline;
}

.footer-section p,
.footer-main .footer-section p,
footer .footer-section p {
  color: white !important;
  font-family: var(--font-elegant, 'Inter', sans-serif) !important;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  opacity: 1 !important;
}

.footer-bottom,
.footer-main .footer-bottom,
footer .footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p,
.footer-main .footer-bottom p,
footer .footer-bottom p {
  color: white !important;
  font-size: 0.95rem;
  margin: 0;
  opacity: 1 !important;
}

/* ========================================
   📱 RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .header-content {
    padding: 0 1rem;
  }

  .nav-links {
    display: none; /* Se muestra en menú móvil */
  }

  /* Mostrar botón hamburguesa solo en móvil */
  .hamburger {
    display: flex !important;
  }

  .home-hero {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.3rem);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .footer-main {
    padding: 2rem 0 1rem;
  }
}

/* Asegurar que el botón hamburguesa esté oculto en desktop */
@media (min-width: 769px) {
  .hamburger,
  .btn-menu,
  [data-menu-toggle] {
    display: none !important;
  }
}

/* 🔒 FIX CRÍTICO: Ocultar drawer SIEMPRE en desktop (>=1024px) */
/* Esta regla debe tener máxima especificidad y !important para anular cualquier CSS que intente mostrarlo */
@media (min-width: 1024px) {


  /* Drawer overlay - SIEMPRE oculto en desktop (todas las variantes posibles) */
  #mobileMenu.nav-overlay,
  #mobileMenu.nav-overlay[aria-expanded="true"],
  #mobileMenu.nav-overlay[aria-expanded="false"],
  #mobileMenu.nav-overlay[aria-expanded=""],
  #mobileMenu.nav-overlay:not([aria-expanded]),
  nav#mobileMenu.nav-overlay,
  nav#mobileMenu.nav-overlay[aria-expanded="true"],
  nav#mobileMenu.nav-overlay[aria-expanded="false"],
  body #mobileMenu.nav-overlay,
  html body #mobileMenu.nav-overlay,
  .header-modern ~ #mobileMenu.nav-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    max-height: 0 !important;
    height: 0 !important;
    transform: translateX(100%) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: -1 !important;
  }
  
  /* Panel móvil - SIEMPRE oculto en desktop (todas las variantes) */
  .nav-mobile,
  #mobileMenu .nav-mobile,
  nav#mobileMenu .nav-mobile,
  #mobileMenu.nav-overlay .nav-mobile,
  body .nav-mobile,
  html body .nav-mobile {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    pointer-events: none !important;
  }
  
  /* Overlay de menú móvil - SIEMPRE oculto */
  [data-mobile-menu-overlay="1"],
  [data-mobile-menu-overlay],
  body [data-mobile-menu-overlay] {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Botón hamburguesa - oculto en desktop */
  .hamburger.btn-menu,
  [data-menu-toggle],
  .header-modern .hamburger,
  .header-modern [data-menu-toggle],
  body .hamburger.btn-menu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  
  /* Asegurar que el body no tenga clase menu-open en desktop */
  body.menu-open {
    overflow: auto !important;
  }
}

/* ======================================== 
   🔧 CORRECCIÓN ESPECÍFICA PARA PÁGINAS DE HOTELES
   Asegurar que el header tenga el mismo estilo que la página principal
   ======================================== */
/* Versión WEB: Logo a la izquierda, botones en fila horizontal */
@media (min-width: 769px) {
  .header-modern .header-content {
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 2rem !important;
  }

  .header-modern .logo-section {
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
  }

  .header-modern .nav-main {
    margin-left: 0 !important;
    justify-content: flex-start !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  
  .header-modern .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
  }
}

/* Asegurar que el logo y texto estén alineados a la izquierda */
.header-modern .logo-section .logo,
.header-modern .logo-section .logo-text {
  margin-left: 0 !important;
  text-align: left !important;
}

/* ========================================
   🍔 MENÚ HAMBURGUESA Y NAVEGACIÓN MÓVIL
   ======================================== */

/* Botón hamburguesa */
.hamburger,
.btn-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
  gap: 4px;
  /* Mejoras para área táctil móvil */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.hamburger span,
.btn-menu span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.hamburger.active span:nth-child(1),
.btn-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger.active span:nth-child(3),
.btn-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Menú móvil overlay - FASE 1: Responsive real con max-height (sin display:none + JS) */
#mobileMenu.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 58, 138, 0.95);
  z-index: 9999;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(8px);
}

/* 🔒 FIX CRÍTICO: Ocultar drawer SIEMPRE en desktop (>=1024px) */
@media (min-width: 1024px) {
  #mobileMenu.nav-overlay,
  #mobileMenu.nav-overlay[aria-expanded="true"],
  #mobileMenu.nav-overlay[aria-expanded="false"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    max-height: 0 !important;
  }
  
  .nav-mobile {
    display: none !important;
  }
}

/* Estado abierto: max-height grande + opacity visible */
#mobileMenu.nav-overlay[aria-expanded="true"] {
  max-height: 100vh;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Estado cerrado: max-height 0 + opacity 0 */
/* 🔒 FIX CRÍTICO: Estado por defecto SIEMPRE cerrado */
#mobileMenu.nav-overlay[aria-expanded="false"],
#mobileMenu.nav-overlay:not([aria-expanded]),
#mobileMenu.nav-overlay {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Solo abrir si explícitamente aria-expanded="true" */
#mobileMenu.nav-overlay[aria-expanded="true"] {
  max-height: 100vh;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Fallback para atributo hidden (compatibilidad) */
#mobileMenu.nav-overlay[hidden] {
  max-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Panel de navegación móvil */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  z-index: 10000;
  padding: 1.5rem 1rem 2rem 1rem; /* Más padding arriba y abajo, menos en los lados */
  overflow-y: auto;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-sizing: border-box; /* Asegurar que el padding se incluya en el ancho */
}

/* Panel de navegación móvil - se muestra cuando menú está expandido */
#mobileMenu.nav-overlay[aria-expanded="true"] .nav-mobile {
  transform: translateX(0);
}

#mobileMenu.nav-overlay[aria-expanded="false"] .nav-mobile,
#mobileMenu.nav-overlay:not([aria-expanded]) .nav-mobile {
  transform: translateX(100%);
}

/* Botón de cerrar */
/* 🔒 FIX CRÍTICO: Asegurar que el botón cerrar siempre funcione */
.btn-close,
[data-menu-close] {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 44px; /* Área táctil mínima */
  height: 44px; /* Área táctil mínima */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
  z-index: 10001;
  pointer-events: auto !important; /* Siempre clickeable */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn-close:hover,
[data-menu-close]:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.btn-close:active,
[data-menu-close]:active {
  transform: scale(0.95);
}

/* Enlaces del menú móvil */
.nav-overlay .nav-links {
  list-style: none;
  padding: 0;
  margin: 3rem 0 1rem 0; /* Más margen superior para que no esté pegado arriba */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 8rem); /* Limitar altura para que quepa todo con scroll */
  overflow-y: auto;
  padding-right: 0.5rem; /* Espacio para scrollbar */
}

.nav-overlay .nav-links li {
  margin: 0;
}

.nav-overlay .nav-links a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: white !important;
  text-decoration: none;
  font-family: var(--font-elegant, 'Inter', sans-serif);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-overlay .nav-links a .nav-emoji {
  font-size: 1.5rem !important;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block !important;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Asegurar que los emojis se muestren en todos los navegadores */
.nav-overlay .nav-links a .nav-emoji,
#mobileMenu .nav-links a .nav-emoji {
  font-size: 1.5rem !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.nav-overlay .nav-links a:hover,
.nav-overlay .nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent) !important;
  transform: translateX(5px);
}

/* Bloquear scroll del body cuando el menú está abierto */
body.menu-open {
  overflow: hidden;
}

/* Mostrar hamburguesa solo en móvil */
@media (max-width: 768px) {
  .hamburger,
  .btn-menu {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .logo {
    width: 35px;
    height: 35px;
    padding: 3px;
  }

  .logo img {
    height: 30px;
    max-width: 30px;
  }
}

@media (max-width: 480px) {
  .header-modern {
    padding: 0.75rem 0;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .logo {
    width: 32px;
    height: 32px;
    padding: 2px;
  }

  .logo img {
    height: 28px;
    max-width: 28px;
  }

  .home-hero {
    padding: 2rem 0;
  }

  /* Asegurar que header no corte el menú */
  .header-modern, 
  .header-content, 
  .nav-main { 
    overflow: visible !important; 
  }
}

/* ======================================== 
   🎯 ESTILOS ESPECÍFICOS DEL LOGO (Consolidados de recargas-cuba.css)
   ======================================== */
.header-modern .logo-section .logo {
  width: 45px;
  height: 45px;
  padding: 4px;
}

.header-modern .logo-section .logo img {
  height: 38px;
  max-width: 38px;
  width: auto;
}

@media (max-width: 768px) {
  .header-modern .logo-section .logo {
    width: 35px;
    height: 35px;
    padding: 3px;
  }

  .header-modern .logo-section .logo img {
    height: 30px;
    max-width: 30px;
  }
}

@media (max-width: 480px) {
  .header-modern .logo-section .logo {
    width: 32px;
    height: 32px;
    padding: 2px;
  }

  .header-modern .logo-section .logo img {
    height: 28px;
    max-width: 28px;
  }
}

/* ======================================== 
   🌐 BOTÓN DE INTERNACIONALIZACIÓN (Language Switcher)
   Consolidado de todos los archivos CSS para evitar duplicaciones
   ======================================== */

/* Selector de idioma flotante (#language-selector) - usado en partials/language-selector.php */
#language-selector {
  position: fixed !important;
  top: 120px !important;
  right: 24px !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, opacity;
}

/* Estado cuando se hace scroll - se mueve y desaparece */
#language-selector.scrolling {
  transform: translateY(-10px) !important;
  opacity: 0.7 !important;
}

#language-selector.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-20px) !important;
  pointer-events: none !important;
}

#language-selector .lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #1E3A8A 0%, #22D3EE 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

/* Efecto de brillo al pasar el mouse */
#language-selector .lang-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

#language-selector .lang-button:hover::before {
  left: 100%;
}

#language-selector .lang-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  border-color: rgba(255, 255, 255, 0.5);
}

#language-selector .lang-button:active {
  transform: translateY(-1px) scale(1.02);
}

#language-selector .lang-flag {
  font-size: 1.3rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

#language-selector .lang-button:hover .lang-flag {
  transform: scale(1.1) rotate(5deg);
}

#language-selector .lang-text {
  font-size: 0.95rem;
  letter-spacing: 1px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Language switcher en header (.language-switcher) - usado en index.html */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 8px);
}

.language-switcher .current {
  color: #FACC15;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.language-switcher a {
  color: white;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  font-size: 0.9rem;
}

.language-switcher a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Lang switch (.lang-switch) - usado en componentes LangSwitch */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--background, #F9FAFB);
  border-radius: var(--radius-md, 8px);
  padding: var(--space-xs, 0.25rem);
}

.lang-switch a {
  padding: 0.5rem 1rem;
  background: var(--surface, white);
  border: 2px solid var(--border, #E5E7EB);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary, #1F2937);
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 50px;
  text-align: center;
}

.lang-switch a:hover,
.lang-switch a.active {
  background: var(--primary, #1E3A8A);
  border-color: var(--primary, #1E3A8A);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lang-switch a[aria-current="page"] {
  background: var(--primary, #1E3A8A);
  border-color: var(--primary, #1E3A8A);
  color: white;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.4);
}

/* Lang switch dentro del header */
.header-modern .lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.header-modern .lang-switch a {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  text-decoration: none;
  color: white !important;
  font-weight: 700;
  font-size: 0.875rem;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 50px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header-modern .lang-switch a:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-modern .lang-switch a.active {
  background: rgba(255, 255, 255, 0.35);
  border-color: #FACC15;
  color: white !important;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.4);
}

/* Responsive para language selector flotante */
@media (max-width: 768px) {
  #language-selector {
    top: 100px !important;
    right: 16px !important;
  }

  #language-selector .lang-button {
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
  }

  #language-selector .lang-flag {
    font-size: 1.15rem;
  }

  #language-selector .lang-text {
    font-size: 0.875rem;
    letter-spacing: 0.8px;
  }

  .language-switcher {
    display: none; /* Se muestra en el menú móvil */
  }
}

@media (max-width: 480px) {
  /* 📱 MÓVIL: Botón de idioma en esquina superior izquierda, más pequeño */
  /* IMPORTANTE: Usar !important para sobrescribir cualquier estilo inline o de JavaScript */
  #language-selector {
    position: fixed !important;
    top: 80px !important; /* Ajustado para estar más cerca del header */
    right: auto !important;
    left: 16px !important; /* Esquina superior izquierda */
    bottom: auto !important; /* Asegurar que no haya bottom definido */
    -webkit-transform: none !important; /* Safari */
    transform: none !important; /* Sin centrado */
    z-index: 9999 !important; /* Asegurar que esté por encima de otros elementos */
    margin: 0 !important; /* Sin márgenes que puedan desplazarlo */
    padding: 0 !important; /* Sin padding que pueda afectar el posicionamiento */
    /* Fix Safari: asegurar que el posicionamiento funcione */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }
  
  /* Ajustar transform cuando está en estado scrolling */
  #language-selector.scrolling {
    transform: translateY(-10px) !important; /* Solo movimiento vertical */
    opacity: 0.7 !important;
    left: 16px !important; /* Mantener posición izquierda */
    right: auto !important;
  }
  
  /* Ajustar transform cuando está hidden */
  #language-selector.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-20px) !important; /* Solo movimiento vertical */
    pointer-events: none !important;
    left: 16px !important; /* Mantener posición izquierda */
    right: auto !important;
  }

  /* Botón más pequeño en móvil */
  #language-selector .lang-button {
    padding: 0.5rem 0.9rem !important; /* Más pequeño que antes */
    font-size: 0.75rem !important;
    margin: 0 !important; /* Sin márgenes */
  }
  
  /* Ajustar hover en móvil */
  #language-selector .lang-button:hover {
    transform: translateY(-3px) scale(1.05) !important;
  }
  
  #language-selector .lang-button:active {
    transform: translateY(-1px) scale(1.02) !important;
  }

  /* Bandera más pequeña */
  #language-selector .lang-flag {
    font-size: 0.95rem !important;
  }

  /* Texto más pequeño */
  #language-selector .lang-text {
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
  }
}

/* Safari iPhone específico - usar media query con -webkit-device-pixel-ratio */
@media screen and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
  #language-selector {
    position: fixed !important;
    top: 80px !important;
    left: 16px !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  
  #language-selector.scrolling {
    left: 16px !important;
    right: auto !important;
  }
  
  #language-selector.hidden {
    left: 16px !important;
    right: auto !important;
  }
}

/* Estilos para el selector de idioma en menú móvil */
@media (max-width: 768px) {
  .header-modern .nav-main .lang-switch:not(.mobile-lang-switch) {
    display: none;
  }

  .nav-mobile .mobile-lang-switch {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    justify-content: center;
    align-items: center;
  }

  .nav-mobile .mobile-lang-switch a {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 50px;
  text-align: center;
  }

  .nav-mobile .mobile-lang-switch a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .nav-mobile .mobile-lang-switch a.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: #FACC15;
    color: white;
    box-shadow: 0 2px 6px rgba(250, 204, 21, 0.4);
  }
}

/* ========================================
   📱 PWA OPTIMIZATIONS (Standalone Mode)
   ======================================== */
@media (display-mode: standalone) {
  .header-modern {
    padding-top: env(safe-area-inset-top);
  }
  
/* ========================================
   🔔 NOTIFICACIONES IN-APP - DROPDOWN MÓVIL
   ======================================== */

/* Header notifications container - sin overflow para que dropdown no se corte */
.header-notifications {
  position: relative;
  z-index: 1000;
}

/* Desktop: dropdown posicionado normalmente */
.notifications-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 320px;
  max-width: 400px;
  max-height: 500px;
  overflow-y: auto;
  z-index: 1001;
}

/* Móvil: dropdown se renderiza en portal overlay */
@media (max-width: 1023px) {
  .header-notifications {
    overflow: visible !important; /* Permitir que dropdown escape */
  }
  
  .notifications-dropdown {
    /* En móvil se renderiza en portal, estos estilos son fallback */
    position: fixed;
    max-width: calc(100vw - 16px);
    max-height: 70vh;
  }
  
  /* Portal overlay para dropdown móvil */
  #notifications-dropdown-portal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10001;
  }
  
  #notifications-dropdown-mobile {
    position: fixed;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow-y: auto;
    pointer-events: auto;
    z-index: 10002;
    max-height: 70vh;
  }
}

  .whatsapp-float {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* ========================================
   🔒 FAILSAFE FINAL: Desktop drawer hide
   Añadido al final para máxima precedencia en cascada
   Este bloque garantiza que el drawer NUNCA sea visible en desktop
   ======================================== */
@media (min-width: 1024px) {
  /* Todas las variantes posibles del drawer */
  #mobileMenu.nav-overlay,
  #mobileMenu.nav-overlay[aria-expanded="true"],
  #mobileMenu.nav-overlay[aria-expanded="false"],
  #mobileMenu.nav-overlay[aria-expanded=""],
  #mobileMenu.nav-overlay:not([aria-expanded]),
  nav#mobileMenu.nav-overlay,
  .nav-overlay#mobileMenu,
  body #mobileMenu.nav-overlay,
  html body #mobileMenu.nav-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    max-height: 0 !important;
    height: 0 !important;
    transform: translateX(100%) !important;
    z-index: -9999 !important;
  }

  /* Panel interno del drawer */
  .nav-mobile,
  #mobileMenu .nav-mobile,
  body .nav-mobile,
  #mobileMenu .nav-mobile *,
  #mobileMenu * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateX(100%) !important;
    pointer-events: none !important;
  }

  /* Cualquier botón o elemento dentro del overlay móvil */
  #mobileMenu .btn-auth,
  #mobileMenu .header-auth,
  #mobileMenu .header-notifications,
  #mobileMenu button,
  #mobileMenu a.btn-auth,
  #mobileMenu .nav-links,
  #mobileMenu .nav-mobile,
  #mobileMenu ul,
  #mobileMenu li,
  #mobileMenu a {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }
  
  /* Asegurar que el overlay móvil completo esté oculto */
  #mobileMenu {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Botón hamburguesa - siempre oculto en desktop */
  .hamburger.btn-menu,
  button.hamburger,
  [data-menu-toggle],
  .header-modern .hamburger {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Asegurar que body no quede bloqueado */
  body.menu-open {
    overflow: auto !important;
  }
}

/* ========================================
   🔒 FIX ISSUE 3: Avatar, campana y username
   Fixes para evitar deformación y asegurar visibilidad
   ======================================== */

/* Avatar con imagen (si se agrega posteriormente) */
.header-auth .user-avatar,
.btn-auth .user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Nombre de usuario - truncar si muy largo */
.btn-auth-text[data-auth="logged-in"] {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block !important;
}

/* Campanita de notificaciones - asegurar visibilidad SOLO para usuarios logueados */
.header-notifications {
  display: inline-flex !important;
  align-items: center;
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  margin-right: 0.75rem;
  /* Sin padding ni border para mantener elegancia */
}

/* 🔒 FIX: Ocultar campana para invitados - protección adicional */
/* Nota: El PHP en header-es.php y header-en.php ya asegura que header-notifications
   solo se renderice dentro de if ($authState['is_logged_in']), pero este CSS
   sirve como protección en caso de errores de renderizado */
.header-content:has(.header-auth[data-auth="logged-out"]) .header-notifications {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.header-notifications .btn-notifications {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  padding: 0.5rem !important;
  position: relative;
  color: #023047 !important;
  font-size: 1.5rem !important; /* Tamaño fijo - mismo en ES y EN */
  transition: transform 0.2s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  line-height: 1 !important;
}

.header-notifications .btn-notifications span:first-child {
  display: inline-block !important;
  font-size: 1.5rem !important; /* Tamaño fijo del emoji - mismo en ES y EN */
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
}

.header-notifications .btn-notifications:hover {
  transform: scale(1.1);
}

/* Badge de notificaciones - Usar estilos de notifications.css */
/* Los estilos están centralizados en /assets/css/notifications.css */

/* Asegurar que el badge NO aparezca dentro del mobileMenu */
#mobileMenu .notification-badge,
#mobileMenu .header-notifications .notification-badge {
  display: none !important;
  visibility: hidden !important;
}

/* ========================================
   NOTIFICACIONES: Estados y Items
   ======================================== */

/* Item de notificación */
.notification-item {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background 0.15s ease;
  outline: none;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover,
.notification-item:focus {
  background: #F9FAFB;
  outline: 2px solid #E5E7EB;
  outline-offset: -2px;
}

.notification-item:active {
  background: #F3F4F6;
}

/* Notificación no leída */
.notification-item.notification-unread {
  background: #EFF6FF;
}

.notification-item.notification-unread:hover,
.notification-item.notification-unread:focus {
  background: #DBEAFE;
}

/* Punto indicador de no leída */
.notification-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #3B82F6;
  border-radius: 50%;
  margin-top: 0.375rem;
  flex-shrink: 0;
}

/* Estados del dropdown */
.notification-state {
  padding: 2rem;
  text-align: center;
}

.notification-loading {
  color: #6B7280;
}

.notification-loading > div:first-child {
  animation: pulse 1.5s ease-in-out infinite;
}

.notification-empty {
  color: #6B7280;
}

.notification-error {
  color: #EF4444;
}

/* Botón marcar todas como leídas */
.btn-mark-all-read {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  color: #374151;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  width: 100%;
  min-height: 44px; /* Touch-friendly */
}

.btn-mark-all-read:hover:not(:disabled) {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.btn-mark-all-read:active:not(:disabled) {
  background: #D1D5DB;
}

.btn-mark-all-read:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Animación pulse para loading */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Mejoras de accesibilidad */
.notification-item[role="button"] {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.notification-item[role="button"]:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* Responsive: ajustes móvil */
@media (max-width: 1023px) {
  .notification-item {
    padding: 1rem;
    min-height: 44px; /* Touch-friendly */
  }

  .notification-unread-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.5rem;
  }
}

/* Asegurar alineación del header-auth con gap consistente */
.header-modern .nav-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-modern .header-auth {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* === FIX: User area alignment === */
.header-auth .btn-auth {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

/* Avatar si es <img> */
.header-auth img.user-avatar,
.header-auth .user-avatar img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  object-fit: cover !important;
  flex: 0 0 auto !important;
}

/* Si el avatar es un div/span circular */
.header-auth .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex: 0 0 auto;
}

/* Nombre truncado */
.header-auth .btn-auth-text,
.header-auth .user-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========================================
   Trustpilot Footer Badge
   ======================================== */
.trustpilot-footer-wrapper {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.trustpilot-footer {
  background: rgba(0, 182, 122, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.trustpilot-footer:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 182, 122, 0.25);
}

.trustpilot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-decoration: none;
  color: white;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.trustpilot-logo-container,
.trustpilot-logo-icon {
  display: none;
}

.trustpilot-content {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.trustpilot-star-single {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trustpilot-star-emoji {
  font-size: 14px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 182, 122, 0.4));
  flex-shrink: 0;
}

.trustpilot-text-content {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.trustpilot-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.trustpilot-brand {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.3px;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.trustpilot-footer:hover .trustpilot-brand {
  color: #FACC15;
  text-shadow: 0 2px 6px rgba(250, 204, 21, 0.5);
}

/* ========================================
   Redes Sociales
   ======================================== */
.footer-social {
  text-align: center;
  padding: 2rem 0 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.footer-social h3 {
  color: white !important;
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.redes-sociales {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  max-width: 400px;
  flex-wrap: wrap;
}

.red-social {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.red-social img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.red-social:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* WhatsApp Floating Button */
#whatsapp-soporte-flotante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  transition: transform 0.3s ease;
}

#whatsapp-soporte-flotante:hover {
  transform: scale(1.1);
}

#whatsapp-soporte-flotante img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

@media (max-width: 768px) {
  .trustpilot-footer-wrapper { padding: 0 1rem; }
  .trustpilot-footer { padding: 1.5rem 1.25rem; margin-top: 1.5rem; }
  .trustpilot-link { flex-direction: row; gap: 0.75rem; text-align: center; width: 100%; }
  .trustpilot-content { flex-direction: row; gap: 0.5rem; width: 100%; }
  .trustpilot-star-emoji { font-size: 12px; }
  .trustpilot-label { font-size: 0.7rem; }
  .trustpilot-brand { font-size: 0.9rem; }
  
  #whatsapp-soporte-flotante {
    bottom: 15px;
    right: 15px;
  }

  #whatsapp-soporte-flotante img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .trustpilot-footer-wrapper { padding: 0 0.75rem; }
  .trustpilot-footer { padding: 1rem 0.75rem; border-width: 2px; }
  .trustpilot-star-emoji { font-size: 11px; }
  .trustpilot-label { font-size: 0.65rem; }
  .trustpilot-brand { font-size: 0.85rem; }
  .trustpilot-content, .trustpilot-text-content { gap: 0.4rem; }
  .red-social { width: 40px; height: 40px; }
}
