/* ============================================================
   ohtli.css - La identidad visual de Ohtli en un solo lugar
   Todas las pantallas usan este archivo para verse iguales.
   ============================================================ */

/* --- Tipografias de la marca (Google Fonts) --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

/* --- Los colores de Ohtli --- */
:root {
  --naranja:    #FF6100;
  --amarillo:   #FFC107;
  --verde:      #34C709;
  --azul:       #0078D4;
  --turquesa:   #00C2B2;
  --morado:     #8B5CF6;
  --azul-oscuro:#0F2C52;
  --tinta:      #4B5668;
  --gris:       #D7DBE2;
  --gris-claro: #F0F3F7;
  --bg:         #FAFBFD;

  /* Tipografias */
  --fuente-titulo: 'Poppins', sans-serif;
  --fuente-texto:  'Inter', sans-serif;

  /* Detalles de la marca */
  --radio:       18px;   /* bordes redondeados */
  --radio-chico: 12px;
  --sombra:      0 8px 28px rgba(15, 44, 82, 0.12);
}

/* --- Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--fuente-texto);
  color: var(--azul-oscuro);
  background: var(--bg);
  min-height: 100vh;
}

/* --- Tarjeta central (la que usan casi todas las pantallas) --- */
.ohtli-fondo {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ohtli-tarjeta {
  background: #fff;
  border-radius: var(--radio);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--sombra);
  text-align: center;
  position: relative;
}

/* --- El logo en la cabecera --- */
.ohtli-logo {
  height: 48px;
  margin-bottom: 6px;
}
.ohtli-eslogan {
  font-size: 13px;
  color: var(--tinta);
  margin-bottom: 18px;
}

/* --- Titulos --- */
h1, h2, h3, .titulo {
  font-family: var(--fuente-titulo);
  color: var(--azul-oscuro);
}

/* --- Etiqueta de nivel / constructo --- */
.ohtli-cabecera {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ohtli-constructo {
  font-family: var(--fuente-titulo);
  font-size: 15px;
  color: var(--azul);
  font-weight: 600;
}
.ohtli-nivel {
  background: var(--amarillo);
  color: #6d4c00;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.ohtli-nivel.reto {
  background: var(--naranja);
  color: #fff;
}

/* --- Enunciado del ejercicio --- */
.ohtli-enunciado {
  font-family: var(--fuente-titulo);
  font-size: 26px;
  color: var(--azul-oscuro);
  margin: 26px 0;
  line-height: 1.4;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Opciones (opcion multiple) --- */
.ohtli-opciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ohtli-opcion {
  background: var(--azul);
  color: #fff;
  border: none;
  padding: 18px;
  font-size: 22px;
  font-family: var(--fuente-titulo);
  border-radius: var(--radio-chico);
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.ohtli-opcion:hover { transform: scale(1.04); background: #0063b1; }

/* --- Campo de respuesta corta --- */
.ohtli-campo {
  font-family: var(--fuente-titulo);
  font-size: 26px;
  padding: 14px;
  width: 100%;
  border: 3px solid var(--azul);
  border-radius: var(--radio-chico);
  text-align: center;
  margin-bottom: 16px;
  color: var(--azul-oscuro);
}
.ohtli-campo:focus { outline: none; border-color: var(--turquesa); }

/* --- Boton principal --- */
.ohtli-btn {
  background: var(--verde);
  color: #fff;
  border: none;
  padding: 16px 40px;
  font-size: 22px;
  font-family: var(--fuente-titulo);
  border-radius: var(--radio-chico);
  cursor: pointer;
  transition: background 0.15s;
}
.ohtli-btn:hover { background: #2ba807; }

.ohtli-btn-azul { background: var(--azul); }
.ohtli-btn-azul:hover { background: #0063b1; }

/* --- Mensaje flotante (correcto / incorrecto) --- */
.ohtli-feedback {
  position: fixed;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--fuente-titulo);
  font-size: 24px;
  font-weight: 600;
  padding: 18px 40px;
  border-radius: 20px;
  box-shadow: var(--sombra);
  z-index: 100;
  opacity: 0;
  animation: ohtli-aparecer 2s ease forwards;
}
.ohtli-feedback.bien { background: var(--verde); color: #fff; }
.ohtli-feedback.mal  { background: var(--naranja); color: #fff; }
@keyframes ohtli-aparecer {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* --- Barra de avance (los 6 constructos) --- */
.ohtli-barra {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}
.ohtli-paso {
  width: 30px; height: 8px;
  border-radius: 4px;
  background: var(--gris);
}
.ohtli-paso.ok { background: var(--verde); }

/* --- Aviso del reto --- */
.ohtli-reto-aviso {
  background: #fff3e0;
  color: var(--naranja);
  padding: 10px;
  border-radius: var(--radio-chico);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* --- Responsive: en celular, opciones en una columna --- */
@media (max-width: 420px) {
  .ohtli-opciones { grid-template-columns: 1fr; }
  .ohtli-enunciado { font-size: 22px; }
}

/* ============================================================
   AVATARES - estilo cuidado para verse profesional
   Se usa asi:  <span class="ohtli-avatar"><img src="..."></span>
   Variantes:   .chico (44px)  .grande (84px)
   ============================================================ */
.ohtli-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  /* Fondo suave con un toque de la marca, en vez del gris plano */
  background: linear-gradient(145deg, #ffffff 0%, #EEF3F9 100%);
  box-shadow: inset 0 0 0 2px rgba(15, 44, 82, 0.06),
              0 2px 8px rgba(15, 44, 82, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}
.ohtli-avatar img {
  width: 82%;
  height: 82%;
  object-fit: contain;   /* el animal se ve completo, sin recortes raros */
  display: block;
}
.ohtli-avatar.chico  { width: 44px; height: 44px; }
.ohtli-avatar.grande { width: 88px; height: 88px; }

/* Tarjeta de nino en la pantalla de seleccion */
.ohtli-nino {
  background: #fff;
  border-radius: var(--radio);
  padding: 18px 10px;
  text-decoration: none;
  box-shadow: var(--sombra);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: block;
}
.ohtli-nino:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 34px rgba(15, 44, 82, 0.18);
}
.ohtli-nino .nombre-nino {
  display: block;
  margin-top: 10px;
  font-family: var(--fuente-titulo);
  font-weight: 600;
  color: var(--azul-oscuro);
  font-size: 15px;
  line-height: 1.25;
}
