/* Kiosko GTI — identidad de Grupo Terrestre Interpuerto: rojo y grises del logo, tipografía geométrica.
   Pensado para pantalla táctil, computadora y celular. Sin dependencias externas. */
:root {
  --rojo: #bf0411; --rojo-osc: #9a030e; --rojo-suave: #fdf1f2;
  --gris: #727175; --gris-osc: #4c4b4b; --texto: #2b2a2c; --tenue: #67666a;
  --fondo: #f5f5f6; --tarjeta: #ffffff; --linea: #e1e0e3;
  --fuente: "Century Gothic", "URW Gothic", "URW Gothic L", "Avant Garde", "Futura", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; background: var(--fondo); color: var(--texto);
  font: 16px/1.4 var(--fuente); }

/* Barra superior: logotipo y reloj */
.barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 56px);
  background: #fff; border-bottom: 5px solid var(--rojo); }
.logo { display: block; height: clamp(40px, 6vh, 64px); width: auto; }
.reloj { display: grid; justify-items: end; line-height: 1.15; color: var(--gris-osc); min-height: 2.6em; }
.reloj b { font-size: clamp(1.5rem, 3.4vh, 2.4rem); font-variant-numeric: tabular-nums; }
.reloj span { font-size: clamp(.8rem, 1.6vh, 1rem); color: var(--tenue); }

/* Saludo y rejilla de botones */
main { display: grid; align-content: center; gap: clamp(18px, 3.5vh, 40px); padding: clamp(18px, 4vh, 48px) clamp(16px, 4vw, 56px); }
.saludo { text-align: center; }
.saludo h1 { margin: 0; font-size: clamp(1.7rem, 4.6vh, 3.2rem); color: var(--gris-osc); letter-spacing: -.01em; text-wrap: balance; }
.saludo p { margin: 6px 0 0; font-size: clamp(1rem, 2.2vh, 1.4rem); color: var(--tenue); }
.rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.2vh, 24px); width: 100%; max-width: 1280px; margin: 0 auto; }
.rejilla.n1, .rejilla.n2, .rejilla.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.rejilla.n1 { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
.rejilla.n7 { grid-template-columns: repeat(8, minmax(0, 1fr)); max-width: 1440px; }   /* 4 arriba y 3 centrados abajo */
.rejilla.n7 > * { grid-column: span 2; }
.rejilla.n7 > :nth-child(5) { grid-column: 2 / span 2; }
.rejilla.n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 1440px; }   /* 4 y 4 */

.boton { position: relative; display: grid; justify-items: center; align-content: center; gap: 6px; text-align: center; min-height: clamp(170px, 26vh, 290px);
  padding: clamp(16px, 2.6vh, 30px) 18px; background: var(--tarjeta); color: var(--texto); text-decoration: none; border: 2px solid var(--linea);
  border-radius: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.boton .dibujo { display: grid; place-items: center; width: clamp(72px, 11vh, 112px); height: clamp(72px, 11vh, 112px); border-radius: 50%;
  background: var(--rojo-suave); color: var(--rojo); transition: background-color .12s ease, color .12s ease; }
.boton .icono { width: 52%; height: 52%; }
.boton .nombre { margin-top: 6px; font-size: clamp(1.3rem, 3vh, 2rem); font-weight: 700; color: var(--gris-osc); }
.boton .descripcion { font-size: clamp(.9rem, 1.9vh, 1.1rem); color: var(--tenue); max-width: 26ch; text-wrap: balance; }
.boton .entrar { margin-top: 8px; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rojo); }
.boton .entrar::after { content: " \2192"; }
.boton .tecla { position: absolute; top: 12px; left: 14px; min-width: 26px; padding: 2px 7px; border: 1px solid var(--linea); border-radius: 6px;
  font-size: .8rem; font-weight: 700; color: var(--tenue); background: var(--fondo); }
.boton:hover, .boton:focus-visible { border-color: var(--rojo); box-shadow: 0 10px 26px rgba(191, 4, 17, .14); transform: translateY(-3px); }
.boton:hover .dibujo, .boton:focus-visible .dibujo { background: var(--rojo); color: #fff; }
.boton:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
.boton:active { transform: scale(.98); border-color: var(--rojo-osc); }

/* Pie */
.pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; padding: 12px 16px 16px; text-align: center;
  font-size: .82rem; color: var(--tenue); }
.pie img { height: 18px; width: auto; opacity: .8; }
/* el número de versión lleva al control de versiones */
.pie .version { color: inherit; text-decoration: none; padding: 1px 10px; border: 1px solid var(--linea); border-radius: 999px; background: #fff; }
.pie .version:hover, .pie .version:focus-visible { color: var(--rojo); border-color: var(--rojo); }

/* Control de versiones (/versiones) */
.barra .marca { display: block; }
.volver { color: var(--rojo); font-weight: 700; text-decoration: none; white-space: nowrap; padding: 10px 18px; border: 2px solid var(--rojo); border-radius: 999px; }
.volver:hover, .volver:focus-visible { background: var(--rojo); color: #fff; }
main.documento { align-content: start; gap: 16px; width: 100%; max-width: 900px; margin: 0 auto; }
.documento h1 { margin: 0; font-size: clamp(1.6rem, 3.6vh, 2.4rem); color: var(--gris-osc); letter-spacing: -.01em; }
.documento .entrada { margin: -8px 0 4px; font-size: 1.05rem; color: var(--tenue); }
.version, .creditos { background: var(--tarjeta); border: 2px solid var(--linea); border-radius: 16px; padding: 18px 22px; }
.version h2, .creditos h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 1.2rem; color: var(--gris-osc); }
.version .num { padding: 2px 10px; border-radius: 8px; background: var(--rojo-suave); color: var(--rojo); font-variant-numeric: tabular-nums; }
.version .actual { padding: 2px 10px; border-radius: 999px; background: var(--rojo); color: #fff; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.version .fecha { margin: 4px 0 8px; font-size: .9rem; color: var(--tenue); }
.version ul { margin: 0; padding-left: 20px; }
.version li { margin: 4px 0; }
.creditos p { margin: 8px 0 0; font-size: .95rem; color: var(--tenue); }
.creditos a { color: var(--rojo); }
.aviso { margin: 0; padding: 14px 18px; border: 2px dashed var(--linea); border-radius: 12px; color: var(--tenue); }

/* Tableta y celular */
@media (max-width: 980px) {
  .rejilla, .rejilla.n4, .rejilla.n7, .rejilla.n8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rejilla.n7 > *, .rejilla.n7 > :nth-child(5) { grid-column: auto; }
  .rejilla.n7 > :nth-child(7) { grid-column: 1 / -1; justify-self: center; width: calc(50% - clamp(6px, 1.1vh, 12px)); }
  main { padding-block: clamp(14px, 2.4vh, 32px); gap: clamp(14px, 2.4vh, 28px); }
  .saludo h1 { font-size: clamp(1.6rem, 3.4vh, 2.6rem); }
  .boton { min-height: 0; padding: clamp(14px, 1.6vh, 22px) 16px; gap: 4px; }
  .boton .dibujo { width: clamp(64px, 7vh, 88px); height: clamp(64px, 7vh, 88px); }
  .boton .nombre { font-size: clamp(1.25rem, 2.2vh, 1.6rem); margin-top: 4px; }
  .boton .descripcion { font-size: clamp(.9rem, 1.5vh, 1.05rem); }
  .boton .entrar { margin-top: 4px; }
}
@media (max-width: 560px) {
  .rejilla, .rejilla.n2, .rejilla.n4, .rejilla.n7, .rejilla.n8 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rejilla.n7 > :nth-child(7) { grid-column: auto; width: auto; justify-self: stretch; }
  .barra { padding-block: 10px; }
  .logo { height: 40px; }
  .reloj { min-height: 0; }
  .reloj b { font-size: 1.5rem; }
  main { padding-block: 16px; gap: 14px; }
  .saludo h1 { font-size: 1.5rem; }
  .saludo p { font-size: 1rem; margin-top: 2px; }
  .boton { grid-template-columns: auto 1fr; grid-template-areas: "dibujo nombre" "dibujo descripcion"; justify-items: start; text-align: left; column-gap: 14px;
    min-height: 0; padding: 14px 16px; }
  .boton .dibujo { grid-area: dibujo; width: 64px; height: 64px; }
  .boton .nombre { grid-area: nombre; margin: 0; align-self: end; }
  .boton .descripcion { grid-area: descripcion; align-self: start; max-width: none; }
  .boton .entrar, .boton .tecla { display: none; }
  .reloj span { display: none; }
  main { align-content: start; }
}
/* El número de tecla solo ayuda donde hay teclado */
@media (hover: none) { .boton .tecla { display: none; } }
@media (prefers-reduced-motion: reduce) { .boton, .boton .dibujo { transition: none; } .boton:hover, .boton:focus-visible { transform: none; } }
@media print { .reloj, .boton .tecla, .boton .entrar { display: none; } body { background: #fff; } }
/* Pantallas anchas pero bajas (laptop, televisor a 768 px): todo cabe sin desplazar */
@media (min-width: 981px) and (max-height: 840px) {
  .barra { padding-block: 10px; }
  main { padding-block: 14px; gap: 14px; }
  .saludo h1 { font-size: 1.9rem; }
  .saludo p { margin-top: 2px; font-size: 1.05rem; }
  .rejilla { gap: 14px; }
  .boton { min-height: 0; padding: 14px 18px; gap: 3px; }
  .boton .dibujo { width: 68px; height: 68px; }
  .boton .nombre { font-size: 1.4rem; margin-top: 4px; }
  .boton .entrar { margin-top: 4px; }
  .pie { padding-block: 6px 10px; }
}
