/* MOVANTA · app.css · aspecto de aplicación: todo centrado, naranja de marca, barra inferior en el teléfono, zonas seguras y botones grandes.
   Se carga DESPUÉS de los demás estilos. */

/* ---------- Tipografía y botones ---------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
.boton { min-height: 48px; letter-spacing: .005em; }
.boton-primario { background: linear-gradient(135deg, #fb923c, #ea580c); box-shadow: 0 8px 20px rgba(234, 88, 12, .34); }
.boton-primario:hover { background: linear-gradient(135deg, #f97316, #c2410c); }
.boton-azul { background: var(--azul-600); box-shadow: 0 6px 16px rgba(234, 88, 12, .22); }
.boton-azul:hover { background: var(--azul-700); }
.boton-borde { border-color: var(--azul-600); color: var(--azul-700); }
button, input, select, textarea { font-family: inherit; }
.campo input, .campo textarea, .campo select { min-height: 48px; font-size: 1rem; }

/* ---------- Todo centrado ---------- */
.hero, .pagina-titulo, .seccion-titulo, .cta, .tarjeta.servicio, .tile, .caja, .auth > h1, .auth > p, .pie, .portal-main > h1, .portal-main > p { text-align: center; }
.pagina-titulo p, .seccion-titulo p, .hero .lema, .hero-texto > p { margin-inline: auto; }
.seccion-titulo { margin-inline: auto; }
.hero-acciones { justify-content: center; }
.cta { flex-direction: column; justify-content: center; }
.icono, .tarjeta.servicio .icono, .caja .icono { margin-inline: auto; }
.tarjeta.servicio .boton { margin-top: 6px; }
.lista-check { display: inline-block; text-align: left; }
.lista-check li { text-align: left; }
.dos-columnas { text-align: center; justify-items: center; }
.dos-columnas > ul { text-align: left; }
.pie-grilla { justify-items: center; }
.pie-grilla > div { text-align: center; }
.pie .logo-pie { margin-inline: auto; }
.pie-legal { text-align: center; }
.faq, .pasos li, .bloque, .tabla-lista, .formulario, .detalle-lista, .campo { text-align: left; }
.pasos li { text-align: left; }
.dato { text-align: left; }
.cabecera-fila { min-height: 76px; }
.marca { flex: 0 0 auto; margin-right: auto; }
.marca img { height: 64px; width: auto; border-radius: 0; }
@media (max-width: 700px) { .cabecera-fila { min-height: 68px; } .marca img { height: 54px; } }

/* ---------- Portada con la imagen de campaña ---------- */
.hero { background: linear-gradient(180deg, var(--azul-50), #fff); padding: 20px 0 48px; }
.hero-banner { width: 100%; height: auto; border-radius: 26px; box-shadow: var(--sombra); display: block; }
.hero-texto { max-width: 760px; margin: 28px auto 0; }
.hero-texto h1 { margin-bottom: 10px; }
.hero-texto .lema { font-size: 1.15rem; }
.hero-texto .hero-zona { margin-top: 18px; }
@media (max-width: 700px) { .hero { padding-top: 12px; } .hero-banner { border-radius: 18px; } }

/* ---------- Instalar la app ---------- */
/* pequeño y a un lado (esquina), para no tapar el contenido */
.instalar { position: fixed; left: auto; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90; background: #fff; border: 1px solid var(--azul-100); border-radius: 999px; box-shadow: 0 6px 20px rgba(42, 18, 6, .22);
  padding: 6px 8px 6px 6px; display: none; align-items: center; gap: 8px; width: auto; max-width: calc(100vw - 20px); text-align: left; }
.instalar > div:not(.acciones) { display: none; }
.instalar.sin-boton { border-radius: 16px; padding: 10px 12px; }
.instalar.sin-boton > div:not(.acciones) { display: block; max-width: 230px; }
.instalar.sin-boton strong { font-size: .85rem; } .instalar.sin-boton small { font-size: .78rem; }
.instalar.visible { display: flex; }
.instalar img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.instalar .boton { min-height: 36px !important; padding: 4px 14px !important; font-size: .9rem; }
.instalar .boton-borde { padding: 4px 10px !important; }
.instalar strong { display: block; color: var(--azul-900); }
.instalar small { color: var(--gris-700); display: block; line-height: 1.3; }
.instalar .acciones { margin-left: auto; display: flex; gap: 8px; flex: none; }
body.portal .instalar { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* ---------- Pantalla de inicio del cliente (como la app) ---------- */
.app-saludo { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; border-radius: 22px; padding: 20px; display: flex; align-items: center; gap: 14px; text-align: left; box-shadow: 0 10px 26px rgba(234, 88, 12, .30); }
.app-saludo .avatar { width: 58px; height: 58px; border-radius: 50%; background: #fff; color: var(--azul-600); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; flex: none; border: 3px solid rgba(255,255,255,.7); }
.app-saludo h1 { color: #fff; font-size: 1.35rem; margin: 0; text-align: left; }
.app-saludo p { margin: 2px 0 0; color: #ffe8d4; text-align: left; }
/* Botón pequeño de WhatsApp (atención al cliente): esquina inferior derecha, pequeño, sin tapar contenido; en el teléfono sube sobre la barra inferior */
.wa-flotante { position: fixed; left: auto; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 70; width: 46px; height: 46px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); text-decoration: none; opacity: .92; transition: transform .12s ease, opacity .12s ease; }
.wa-flotante:hover, .wa-flotante:focus-visible { opacity: 1; transform: scale(1.06); }
body.con-tabbar .wa-flotante { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
/* WhatsApp a la DERECHA (no tapa lo que el cliente ve). Si el aviso de "Instalar" está visible (también a la derecha), WhatsApp queda justo encima de él */
body.con-tabbar .instalar { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
body:has(.instalar.visible) .wa-flotante { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
body.con-tabbar:has(.instalar.visible) .wa-flotante { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
body:has(.instalar.sin-boton.visible) .wa-flotante { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
body.con-tabbar:has(.instalar.sin-boton.visible) .wa-flotante { bottom: calc(230px + env(safe-area-inset-bottom, 0px)); }
}
@media print { .wa-flotante { display: none; } }
/* 4 accesos del panel: 2 × 2 en el teléfono y 4 en una fila en pantallas grandes (antes 3 columnas dejaban uno solo abajo) */
.app-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
@media (min-width: 760px) { .app-tiles { grid-template-columns: repeat(4, 1fr); } }
.app-tile { background: #fff; border: 1px solid var(--gris-300); border-radius: 20px; padding: 16px 8px 14px; text-align: center; text-decoration: none; color: var(--azul-900); font-weight: 700; font-size: .95rem; box-shadow: var(--sombra-sm); transition: transform .12s ease; display: block; }
.app-tile:active { transform: scale(.97); }
.app-tile .icono { margin: 0 auto 8px; width: 52px; height: 52px; }
.app-tile small { display: block; font-weight: 500; color: var(--gris-500); font-size: .78rem; margin-top: 2px; }
.app-cta { display: flex; width: 100%; min-height: 56px; font-size: 1.1rem; }

/* ---------- Barra inferior en el teléfono ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  body.portal.con-tabbar { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--gris-300); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -6px 24px rgba(42, 18, 6, .08); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; color: var(--gris-500); font-size: .7rem; font-weight: 700; border-radius: 12px; min-width: 0; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar a[aria-current="page"] { color: var(--azul-600); }
  .tabbar a.central { margin-top: -22px; }
  .tabbar a.central .burbuja { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(234, 88, 12, .4); border: 4px solid #fff; }
  .tabbar a.central { color: var(--azul-600); }
  .portal .cabecera .nav .usuario-nombre { display: none; }
}

/* ---------- Zonas seguras (teléfonos con muesca) y modo app instalada ---------- */
@supports (padding: max(0px)) {
  .cabecera { padding-top: env(safe-area-inset-top); }
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
@media (display-mode: standalone) {
  .cabecera { position: sticky; }
  .instalar { display: none !important; }
}
@media (max-width: 620px) {
  .seccion { padding: 44px 0; }
  .boton { width: auto; }
  .hero-acciones .boton { flex: 1 1 100%; }
  .portal-main { padding-top: 20px; }
}

/* Objetivos tactiles: los enlaces del pie miden al menos 44 px de alto en el telefono (accesibilidad). No cambia colores. */
@media (max-width: 700px) { .pie li a { display: inline-block; padding: 11px 0; min-height: 44px; box-sizing: border-box; } }
