/* assets/triage.css */

/* 1. RESET CRÍTICO: Esto evita que los botones se salgan */
*, *::before, *::after {
  box-sizing: border-box; 
}

:root {
  --primary: #0f2f57;
  --bg-color: #f0f2f5;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- HEADER --- */
.app-header {
  background-color: var(--primary);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  flex-shrink: 0; /* No encoger */
}

.header-logo {
  height: 28px;
  width: auto;
  /* Filtro para volver blanco el logo negro si no carga el light */
  filter: brightness(0) invert(1); 
}

.back-link {
  position: absolute;
  left: 15px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0.8;
}

/* --- CONTENEDOR PRINCIPAL (RESPONSIVO) --- */
.triage-container {
  flex: 1;
  width: 100%;
  max-width: 500px; /* Ancho máximo de "App" */
  margin: 0 auto;
  padding: 20px; /* Espacio a los lados en móvil */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Barra de Progreso */
.progress-wrapper {
  background: #cbd5e1;
  height: 6px;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: #3b82f6;
  width: 0%;
  transition: width 0.4s ease;
}

/* --- TARJETA --- */
.triage-card {
  background: white;
  border-radius: 20px;
  padding: 30px 20px; /* Relleno interno seguro */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  width: 100%; /* Asegura que no crezca más que el contenedor */
}

/* --- TEXTOS --- */
.title-lg {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.5rem;
  margin: 0 0 15px 0;
  line-height: 1.2;
}

.text-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 25px;
}

.question-title {
  font-family: var(--font-heading);
  color: var(--primary);
  font-size: 1.3rem;
  margin: 0 0 10px 0;
}

/* --- ELEMENTOS UI --- */
.icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px auto;
}
.bg-blue { background: #e0f2fe; color: #0369a1; }
.bg-red { background: #fee2e2; color: #dc2626; animation: pulse 2s infinite; }
.bg-yellow { background: #fef3c7; color: #d97706; }
.bg-green { background: #dcfce7; color: #16a34a; }

.alert-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 15px;
  border-radius: 12px;
  text-align: left;
  font-size: 0.85rem;
  display: flex;
  gap: 12px;
  line-height: 1.4;
  margin-bottom: 25px;
}

.edu-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 15px;
  text-align: left;
  margin: 20px 0;
  border-left: 4px solid var(--primary);
}
.edu-header {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.edu-text { font-size: 0.85rem; color: #334155; margin: 0; line-height: 1.5; }

/* --- BOTONES (CORREGIDO EL DESBORDE) --- */
.options-grid, .action-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%; /* Asegura ajuste al padre */
}

.opt-btn {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 15px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%; /* Ocupa todo el ancho disponible */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.opt-btn:active { transform: scale(0.98); }

.opt-icon {
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0; /* Evita que el icono se aplaste */
}

/* Botones Principales */
.btn {
  border: none;
  border-radius: 50px;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%; /* Ajuste al padre */
  max-width: 100%; /* Evita desborde */
  white-space: normal; /* Permite texto en varias líneas si es muy largo en móvil */
  line-height: 1.2;
  text-align: center;
}

.btn--lg { font-size: 1.1rem; padding: 16px 24px; }

.btn--primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.btn--danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
  animation: pulse-btn 2s infinite;
}

.btn--whatsapp {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn--ghost {
  background: white;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
}

.btn-text {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 15px;
}

/* Animaciones */
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { transform: scale(1); } }
@keyframes pulse-btn { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }