/* ── Aires Mobile Polish — v1.0 ────────────────────────────────────
   Solo mejoras de fluidez móvil. No sobreescribe layout ni colores.
   Incluido en cabecera_unificada.php (todas las páginas) y login.php.
─────────────────────────────────────────────────────────────────── */

/* 1. Eliminar flash azul/gris al tocar en Android/iOS */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
}

/* 2. Eliminar delay de 300ms en taps (todos los elementos interactivos) */
a, button, input, select, textarea, label, [role="button"], [tabindex] {
  touch-action: manipulation;
}

/* 3. Prevenir zoom automático de iOS al hacer foco en inputs con font-size < 16px */
input, select, textarea {
  font-size: max(16px, 1em);
}

/* 4. Safe area — soporte para notch, Dynamic Island y barra home de iOS */
header, .header-content {
  padding-left:  max(10px, env(safe-area-inset-left));
  padding-right: max(10px, env(safe-area-inset-right));
}
body {
  padding-bottom: env(safe-area-inset-bottom);
}

/* 5. Scroll suave nativo */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* 6. Feedback táctil visual en cards (en dispositivos sin hover real) */
@media (hover: none) {
  .modulo:active {
    transform: scale(0.95) !important;
    transition: transform 0.08s ease !important;
    opacity: 0.92;
  }
  a:active, button:active {
    opacity: 0.75;
    transition: opacity 0.08s ease !important;
  }
}

/* 7. Evitar que el body haga scroll cuando hay un modal abierto */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* 8. Reducir/eliminar animaciones si el usuario lo prefiere (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:       0.01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto  !important;
  }
}

/* 9. Evitar que el scroll de un modal "se pase" al body */
.modal,
.modal-backdrop,
[class*="modal"],
.modal-overlay {
  overscroll-behavior: contain;
}

/* 10. Texto más nítido en pantallas retina (antialiasing) */
body {
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering:          optimizeLegibility;
}
