/* Celular: barra inferior, progreso de lectura, lectura vertical y aparición
   suave (máx. 12 px). Sólo tinta / papel / rojo institucional. */
@media (max-width: 767px) {
  .fa-progreso {
    position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 3px;
    background: var(--gc-rojo-marca, #d6000c);
    transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
  }
  .fa-dock {
    position: fixed; z-index: 65;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px; gap: 4px; border-radius: 20px;
    background: color-mix(in srgb, var(--gc-tinta, #07101c) 92%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 12px 30px rgba(7, 16, 28, 0.3);
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .fa-dock.is-oculto { transform: translateY(calc(100% + 24px)); opacity: 0; }
  .fa-dock:focus-within { transform: none; opacity: 1; }
  body.nav-open .fa-dock, body.fa-fab-suppressed .fa-dock { display: none; }
  .fa-dock__item {
    min-height: 52px; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 14px; padding: 4px 2px;
    color: var(--gc-papel, #fff); text-decoration: none;
    font: 600 0.68rem/1.1 var(--sans, system-ui, sans-serif); letter-spacing: 0.01em;
    opacity: 0.78; transition: background-color 0.2s ease, opacity 0.2s ease;
  }
  .fa-dock__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fa-dock__item svg { width: 22px; height: 22px; }
  .fa-dock__item:active { background: rgba(255, 255, 255, 0.1); }
  .fa-dock__item[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, 0.08); }
  .fa-dock__item[aria-current="page"] svg { color: var(--gc-rojo-marca, #d6000c); }
  .fa-dock__item[data-dock="contacto"] { opacity: 1; background: var(--gc-rojo-accion, #b01018); }
  .fa-dock__item:focus-visible { outline: 2px solid var(--gc-papel, #fff); outline-offset: 2px; }
  body.fa-con-dock { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  html { scroll-padding-top: 72px; }
  .crit-card, .next-step-card, .home-analysis-list > article { min-width: 0; }
  h1, h2, h3, h4 { overflow-wrap: break-word; }

  .fa-revelar { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .fa-revelar.fa-visto { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fa-dock, .fa-revelar { transition: none !important; }
  .fa-revelar { opacity: 1 !important; transform: none !important; }
}

/* 9/10/2026 · Selector de idioma dentro de la cabecera en celular: globo +
   idioma actual; al tocar despliega los cuatro. */
@media (max-width: 767px) {
  html.js .lang-switch.fa-lang-head {
    position: fixed; left: auto !important; bottom: auto !important;
    top: var(--fa-lang-top, 18px); right: var(--fa-lang-right, 104px);
    z-index: 1001; flex-direction: column; gap: 2px; padding: 0;
    background: transparent; box-shadow: none; transition: none;
  }
  html.js .fa-lang-head a { display: none; min-width: 0; padding: 6px 8px; font-size: 11px; }
  html.js .fa-lang-head a[aria-current="true"] {
    display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
    color: inherit; background: transparent; border: 1px solid currentColor; opacity: 0.85;
  }
  html.js .fa-lang-head a[aria-current="true"]::before {
    content: ""; width: 13px; height: 13px; flex: none; background: currentColor;
    -webkit-mask: var(--fa-globo) center / contain no-repeat; mask: var(--fa-globo) center / contain no-repeat;
  }
  html.js .fa-lang-head.is-abierto {
    padding: 3px; border-radius: 16px; background: rgba(7, 16, 28, 0.95);
    box-shadow: 0 8px 24px rgba(7, 16, 28, 0.3);
  }
  html.js .fa-lang-head.is-abierto a { display: block; text-align: center; }
  html.js .fa-lang-head.is-abierto a[aria-current="true"] { color: #07101c; background: #fff; border-color: #fff; opacity: 1; justify-content: center; }
  body.nav-open .fa-lang-head { display: none; }
}
@media (max-width: 359px) {
  html.js .fa-lang-head a[aria-current="true"] { font-size: 0; gap: 0; padding: 6px; }
  html.js .fa-lang-head a[aria-current="true"]::before { width: 16px; height: 16px; }
  html.js .fa-lang-head.is-abierto a[aria-current="true"] { font-size: 11px; }
}
:root { --fa-globo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"); }
@media (max-width: 359px) {
  /* Espacio para el globo: el botón de menú conserva su icono y su nombre accesible. */
  html.js .site-header .nav-toggle > span:first-child { display: none; }
  html.js .site-header .nav-toggle { width: 44px !important; min-width: 44px !important; padding-inline: 0 !important; justify-content: center; }
}
