/* Diseño base 1080x1920 (vertical). 1rem = 10 px de diseño; escala con el ancho de pantalla. */
:root {
  --azul: #013763;
  --azul-2: #0a4a85;
  --azul-osc: #012a4c;
  --naranja: #ffa82d;
  --rojo: #d50407;
  --blanco: #fff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: min(calc(100vw / 108), calc(100vh / 150)); }
html, body { margin: 0; height: 100%; background: var(--azul); overflow: hidden; }
body {
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--blanco);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
img { -webkit-user-drag: none; user-drag: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.app { width: 108rem; max-width: 100vw; height: 100vh; margin: 0 auto; display: flex; flex-direction: column; background: var(--azul); position: relative; }
.top { background: #fff; flex: none; height: 15.5rem; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.top img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--azul); }
.hero { flex: none; height: 30rem; background: url(../media/img/fondo.png) no-repeat center 38% / cover; }

/* ---------- Portada ---------- */
.stats { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1.2rem 1.2rem 0; }
.stat { border: 0.3rem solid var(--azul-2); background: var(--azul); padding: 1.2rem 2rem; }
.stat.acc { display: flex; flex-direction: column; justify-content: center; }
.stat.acc div { font-size: 3.6rem; white-space: nowrap; font-weight: 700; line-height: 1.12; letter-spacing: 0.02em; text-transform: uppercase; }
.stat .o { color: var(--naranja); } .stat .r { color: var(--rojo); }
.stat.days { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stat.days .l { font-size: 4.6rem; font-weight: 700; color: var(--naranja); text-transform: uppercase; line-height: 1.1; }
.stat.days .n { font-size: 11rem; font-weight: 900; color: var(--naranja); line-height: 1; margin-top: 0.4rem; }

.carousel { flex: 1; min-height: 0; margin: 1.2rem 1.2rem 0; position: relative; background: #00284a; overflow: hidden; touch-action: pan-y; }
.carousel .track { height: 100%; display: flex; transition: transform 0.55s ease; will-change: transform; }
.carousel .slide { flex: none; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.carousel .slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.carousel .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 7rem; height: 12rem; border: 0; background: rgba(1, 42, 76, 0.55); color: #fff; font-size: 6rem; line-height: 1; }
.carousel .nav.prev { left: 0; } .carousel .nav.next { right: 0; }
.carousel .dots { position: absolute; left: 0; right: 0; bottom: 1rem; display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; padding: 0 8rem; }
.carousel .dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: rgba(255,255,255,.45); }
.carousel .dots i.on { background: var(--naranja); }

.menu { flex: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2rem; padding: 1.4rem 1.2rem 1.6rem; }
.menu .btn { grid-column: span 2; }
.menu .btn.w3 { grid-column: span 3; }
.btn { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 11rem; padding: 1rem 1.2rem;
  border: 0.3rem solid #fff; background: transparent; color: #fff; font-size: 3.4rem; font-weight: 700; text-transform: uppercase; line-height: 1.1;
  text-decoration: none; transition: background 0.12s, color 0.12s; }
.btn:active { background: #fff; color: var(--azul); }
.btn.empty { opacity: 0.55; }

/* ---------- Sección ---------- */
.sec-head { flex: none; text-align: center; padding: 2.2rem 2rem 1.2rem; }
.sec-head h1 { margin: 0; font-size: 5.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; text-shadow: 0 0.2rem 0.8rem rgba(0,0,0,.5); }
.sec-head p { margin: 0.6rem 0 0; font-size: 3rem; color: #cfe3f6; }
.grid-wrap { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 1rem 2rem 2rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.grid-wrap::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: start; }
.card { background: #fff; border: 0; padding: 0; text-align: left; color: #111; display: flex; flex-direction: column; box-shadow: 0 0.4rem 1.6rem rgba(0,0,0,.35); overflow: hidden; }
.card:active { outline: 0.5rem solid var(--naranja); }
.card .th { background: #e9eef3; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card .th img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card .ti { padding: 1.2rem 1.4rem 1.4rem; font-size: 2.5rem; font-weight: 700; line-height: 1.15; color: var(--azul); overflow-wrap: anywhere; }
.card .ti small { display: block; margin-top: 0.4rem; font-weight: 500; font-size: 2rem; color: #56708a; }
.vacio { text-align: center; font-size: 3.6rem; color: #cfe3f6; padding: 10rem 4rem; }
.foot { flex: none; padding: 1.6rem 2rem 2.4rem; }
.back { width: 100%; min-height: 11rem; background: #ff0000; border: 0; color: #fff; font-size: 4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.back:active { background: #b00000; }

/* ---------- Visor ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0b1622; display: flex; flex-direction: column; margin: 0 auto; width: 108rem; max-width: 100vw; }
.viewer[hidden], .toast[hidden] { display: none; }
.vbar { flex: none; display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.6rem; background: var(--azul); }
.vbar .vt { flex: 1; min-width: 0; font-size: 3rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbtn { min-width: 9rem; height: 9rem; border: 0.3rem solid #fff; background: transparent; color: #fff; font-size: 4.6rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0 1.4rem; }
.vbtn:active { background: #fff; color: var(--azul); }
.vbtn:disabled { opacity: 0.3; }
.vbtn.close { background: #ff0000; border-color: #ff0000; font-size: 3.4rem; }
.vstage { flex: 1; min-height: 0; position: relative; overflow: auto; background: #0b1622; touch-action: pan-x pan-y; scrollbar-width: none; }
.vstage::-webkit-scrollbar { display: none; }
.vpage { min-width: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; }
.vpage canvas, .vpage img { display: block; background: #fff; box-shadow: 0 0 2rem #000; }
.vpage img { max-width: none; }
.vload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: #cfe3f6; pointer-events: none; }
.vfoot { flex: none; display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.6rem 1.8rem; background: var(--azul); }
.vfoot .pg { min-width: 20rem; text-align: center; font-size: 3.6rem; font-weight: 700; }
.vfoot input[type=range] { flex: 1; min-width: 0; height: 6rem; accent-color: var(--naranja); }
.vfoot .zoom { display: flex; gap: 1.2rem; }

.toast { position: fixed; left: 50%; bottom: 4rem; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 1.4rem 3rem; font-size: 3rem; z-index: 99; border-radius: 1rem; }

@media (prefers-reduced-motion: reduce) { .carousel .track { transition: none; } }
.vload[hidden] { display: none; }

.card.cv { background: #fff; }
.card.cv .th { aspect-ratio: 5 / 6; background: #fff; }
.card.cv .th img { object-fit: contain; object-position: center; }
.grid { gap: 2.2rem; }

/* 6 columnas */
.grid-wrap { padding: 1rem 1.4rem 2rem; }
.grid { grid-template-columns: repeat(6, 1fr); gap: 1.2rem; }
.card .ti { padding: 0.7rem 0.8rem 0.9rem; font-size: 1.7rem; }
.card .ti small { font-size: 1.4rem; }
