/* ====== Variables / Reset mínimo ====== */
:root{
  --brand:#fcc328;           /* amarillo corporativo panel */
  --ink:#0f172a;             /* texto principal */
  --muted:#64748b;           /* texto secundario */
  --paper:#ffffff;           /* tarjetas/resultados */
  --bg:#f6f7fb;              /* fondo app */
  --footer:#000000;          /* footer */
  --radius:14px;
  --shadow:0 10px 26px rgba(16,24,40,.08);
}

*{ box-sizing:border-box; }
* { font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important; }

html,body{ height:100%; }

/* ====== Layout base con footer push ====== */
body{
  margin:0;
  min-height:100vh;                /* clave para sticky footer */
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--ink);
  font-size:16px;
  line-height:1.5;
}

/* ====== Header ====== */
header{ display:flex; justify-content:center; margin:32px 0 8px; }
figure{ margin:0; }
header img{ max-width:220px; height:auto; display:block; }

/* ====== Contenido central ====== */
.containers{
  flex:1 0 auto;                   /* empuja el footer hacia abajo */
  display:flex;
  justify-content:center;
  align-items:flex-start;          /* evita centrar vertical y “huecos” */
  padding:24px 16px 56px;          /* espacio de respiración sobre el footer */
}

/* Panel principal */
.sub-container{
  background:var(--brand);
  padding:24px;
  border-radius:var(--radius);
  width:min(880px, 100%);
  box-shadow:var(--shadow);
}

.sub-container h2{
  margin:0 0 6px;
  font-weight:800;
}

/* Bloques de campos */
.eventos{
  display:grid;
  grid-template-columns:1fr;
  gap:8px 16px;
  margin-bottom:16px;
}

label{
  margin:0 0 4px;
  font-size:14px;
  color:#1f2937;
  font-weight:600;
}

select{
  width:100%;
  padding:12px;
  border-radius:10px;
  margin-bottom:6px;
  font-size:16px;
  border:1px solid #d1d5db;
  background:#fff;
}

/* Botones */
button{
  background-color:#3b3b3c;
  font-size:16px;
  color:white;
  padding:10px 16px;
  border-radius:10px;
  font-weight:700;
  border:0;
  cursor:pointer;
}
button:hover{ filter:brightness(1.05); }
.botones{ display:flex; justify-content:flex-end; gap:12px; margin-top:8px; }

/* ====== Resultados ====== */
.resultados{
  margin-top:20px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.resultados article{
  width:100%;
  padding:16px;
  text-align:center;
  border-radius:12px;
  background:var(--paper);
  box-shadow:var(--shadow);
  min-height:120px;
  display:flex; flex-direction:column; justify-content:center;
}
.resultados h6{ margin:0 0 6px; font-weight:800; color:#0f172a; }
.resultados h1{ margin:0; font-size:40px; }

/* ====== Colores por prioridad ====== */
.priority-p0 { background-color:#ff4d4d !important; color:#fff; }
.priority-p1 { background-color:#ff8c00 !important; color:#111; }
.priority-p2 { background-color:yellow !important;   color:#111; }
.priority-p3 { background-color:#43a047 !important;  color:#fff; }
.priority-p4 { background-color:#2196f3 !important;  color:#fff; }
.priority-p5 { background-color:#12b5ea !important;  color:#111; } /* nuevo P5 */
.priority-pl { background-color:#9e9e9e !important;  color:#111; }

.resultados h5{ margin:5px; }

/* ====== Utilidades ====== */
.hidden{ display:none; }

/* ====== Ajustes Bootstrap que ya usas ====== */
.btn{
  background-color:transparent !important;
  border:none !important;
  box-shadow:none !important;
}
.btn:hover{ border:none !important; box-shadow:none !important; }

/* Modal: mostramos la imagen al 100% del contenedor sin trucos de ancho */
#exampleModal .modal-body{ padding:0 !important; }
#exampleModal .modal-content{ width:auto !important; }
.intro-modal{
  border:0;
  border-radius:24px;
  padding:12px 12px 20px;
  box-shadow:0 25px 60px rgba(15,23,42,.18);
  background:var(--paper);
}
.intro-modal__header{
  border-bottom:none;
  align-items:flex-start;
}
.intro-modal__eyebrow{
  margin:0;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--brand);
  font-weight:700;
}
.intro-modal__body{
  padding-top:0;
  color:#1f2937;
  font-size:15px;
}
.intro-modal__list{
  margin:12px 0 16px;
  padding-left:18px;
}
.intro-modal__list li{ margin-bottom:6px; }
.intro-modal__note{
  margin:0;
  font-size:14px;
  color:var(--muted);
}
.intro-modal__footer{
  border-top:none;
  padding-top:0;
}

/* ====== Footer “sticky” ====== */
footer{
  background-color:var(--footer);
  color:#fff;
  text-align:center;
  padding:18px 16px;
  margin-top:auto;                 /* clave para sticky footer */
}
footer .logito{ width:140px; max-width:30vw; height:auto; display:block; margin:0 auto 8px; }
footer .matriz{ width:100%; height:auto; }

/* En pantallas muy anchas mantenemos comportamiento natural */
@media (min-width:1880px){
  footer{ position:static; }
}

/* ====== Responsivo ====== */
@media (max-width:900px){
  .sub-container{ padding:18px; }
  .resultados{ grid-template-columns:1fr; }
  .resultados h1{ font-size:34px; }
}

@media (max-width:480px){
  header{ margin:20px 0 0; }
  .containers{ padding:16px 12px 48px; }
  .sub-container{ padding:16px; }
  select{ font-size:15px; max-width: 100%; }
  .resultados h1{ font-size:30px; }
}