/* ── FONTS: GOTHAM ── */
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Thin.otf') format('opentype'); font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-ThinItalic.otf') format('opentype'); font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-XLight.otf') format('opentype'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-XLightItalic.otf') format('opentype'); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-LightItalic.otf') format('opentype'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Book.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-BookItalic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-MediumItalic.otf') format('opentype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-BoldItalic.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-Black.otf') format('opentype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham'; src: url('../fonts/Gotham-BlackItalic.otf') format('opentype'); font-weight: 900; font-style: italic; font-display: swap; }
/* Ultra is heavier than Black but CSS weight tops out at 900, so it gets its own family name for explicit opt-in use */
@font-face { font-family: 'Gotham Ultra'; src: url('../fonts/Gotham-Ultra.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Gotham Ultra'; src: url('../fonts/Gotham-UltraItalic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --azul:    #0e2356;
  --azul2:   #2264dc;
  --celeste: #5a8cff;
  --negro:   #0f1027;
  --blanco:  #ffffff;
  --gris:    #e8edf8;
  --gris2:   #f5f7ff;
  --verde:   #1b5e20;
  --verde2:  #2e7d32;
  --amarillo:#f59e0b;
  --rojo:    #b71c1c;
}

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

body {
  font-family: 'Gotham', 'Segoe UI', Arial, sans-serif;
  background: var(--negro) url('../img/bg-blue.jpg') center center / cover no-repeat;
  color: var(--blanco);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
.header {
  background: rgba(14,35,86,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-wrap: wrap; gap: 6px 16px;
}
.logo { height: 32px; width: auto; display: block; }
.header-tag { font-size: 11px; color: var(--celeste); letter-spacing: 1px; text-transform: uppercase; }

/* ── PROGRESS ── */
.progress-bar { height: 4px; background: rgba(255,255,255,0.1); flex-shrink: 0; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azul2), var(--celeste));
  transition: width 0.4s ease;
}

/* ── MAIN ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  overflow-y: auto;
}

/* ── SCREENS ── */
.screen { display: none; width: 100%; max-width: 680px; flex-direction: column; gap: 24px; }
.screen.active { display: flex; animation: fadeIn 0.3s ease; }

.contacts-screen { display: none; width: 100%; max-width: 960px; flex-direction: column; gap: 20px; }
.contacts-screen.active { display: flex; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── WELCOME ── */
.welcome-tag {
  font-size: 11px; letter-spacing: 3px; color: var(--celeste);
  text-transform: uppercase; font-weight: 600;
}
.welcome-title { font-size: 36px; font-weight: 800; line-height: 1.15; color: var(--blanco); }
.welcome-title span { color: var(--celeste); }
.welcome-sub { font-size: 16px; color: rgba(255,255,255,0.65); line-height: 1.6; }
.welcome-items { display: flex; flex-direction: column; gap: 10px; }
.welcome-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,0.8); }
.welcome-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--celeste); flex-shrink: 0; }

/* ── QUESTION ── */
.q-number { font-size: 11px; letter-spacing: 3px; color: var(--celeste); text-transform: uppercase; font-weight: 600; }
.q-text { font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--blanco); }
.q-sub { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: -8px; }

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 18px 22px;
  font-size: 16px;
  color: var(--blanco);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.option:hover { border-color: var(--celeste); background: rgba(94,140,255,0.1); }
.option.selected { border-color: var(--celeste); background: rgba(34,100,220,0.25); }
.option-letter {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--celeste);
  flex-shrink: 0;
}
.option.selected .option-letter { background: var(--celeste); color: var(--negro); }

/* ── FORM ── */
.form-title { font-size: 26px; font-weight: 700; color: var(--blanco); }
.form-sub { font-size: 15px; color: rgba(255,255,255,0.55); }
.form-grid { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--celeste); }
.form-input {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 16px;
  color: var(--blanco);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus { border-color: var(--celeste); background: rgba(94,140,255,0.08); }
.form-input::placeholder { color: rgba(255,255,255,0.3); }

/* ── RESULT ── */
.result-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.result-title { font-size: 28px; font-weight: 800; line-height: 1.2; color: var(--blanco); }
.result-sub { font-size: 15px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.result-areas { display: flex; flex-direction: column; gap: 10px; }
.result-area {
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--celeste);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.result-area strong {
  color: var(--celeste); display: block; margin-bottom: 2px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
}
.result-info-box {
  background: rgba(34,100,220,0.15);
  border: 1.5px solid rgba(34,100,220,0.4);
  border-radius: 12px;
  padding: 20px 22px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}
.section-label {
  font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--celeste); font-weight: 600;
}

/* ── CONTACTS ── */
.contacts-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.contacts-eyebrow { font-size: 11px; letter-spacing: 2px; color: var(--celeste); text-transform: uppercase; margin-bottom: 4px; }
.contacts-title { font-size: 22px; font-weight: 700; }
.contacts-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.contacts-count {
  font-size: 13px; color: var(--celeste);
  background: rgba(94,140,255,0.12);
  padding: 6px 14px; border-radius: 99px;
}
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--azul); color: var(--celeste);
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 16px; text-align: left; font-weight: 600; white-space: nowrap;
}
td { padding: 13px 16px; border-top: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); vertical-align: top; }
tr:hover td { background: rgba(255,255,255,0.03); }

.nivel-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.nivel-alto   { background: rgba(183,28,28,0.2);  color: #ef9a9a; }
.nivel-medio  { background: rgba(245,158,11,0.2); color: #fcd34d; }
.nivel-bajo   { background: rgba(27,94,32,0.2);   color: #a5d6a7; }
.areas-cell   { font-size: 11px; color: rgba(255,255,255,0.55); line-height: 1.5; }
.date-cell    { color: rgba(255,255,255,0.35); font-size: 12px; white-space: nowrap; }

.empty-state  { text-align: center; padding: 48px 24px; color: rgba(255,255,255,0.3); }
.empty-icon   { font-size: 48px; margin-bottom: 12px; }
.empty-text   { font-size: 15px; }

/* ── BUTTONS ── */
.btn {
  padding: 18px 32px; border-radius: 12px; border: none;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.btn-primary { background: var(--azul2); color: var(--blanco); }
.btn-primary:hover { background: var(--celeste); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-outline {
  background: transparent; color: var(--celeste);
  border: 1.5px solid var(--celeste);
  padding: 12px 24px; font-size: 14px;
}
.btn-outline:hover { background: rgba(94,140,255,0.1); }
.btn-ghost {
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(255,255,255,0.1);
  padding: 12px 20px; font-size: 13px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn-full { width: 100%; text-align: center; }

/* ── DIVIDER ── */
.divider { height: 1px; background: rgba(255,255,255,0.08); }

/* ── FOOTER ── */
.footer {
  padding: 16px 28px; display: flex;
  align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  flex-wrap: wrap; gap: 8px 16px;
}
.footer-logo { font-size: 13px; font-weight: 300; color: var(--blanco); letter-spacing: 1px; }
.footer-btn {
  font-size: 13px; color: var(--blanco);
  cursor: pointer; background: none; border: none; letter-spacing: 1px;
}
.footer-btn:hover { color: var(--celeste); }

/* ── RESPONSIVE ── */

/* Tablet / large phone (portrait tablets keep the desktop card layout
   naturally, since it's already centered with a 680px max-width;
   this tier only smooths the step down for narrower tablets/phablets) */
@media (max-width: 767px) {
  .main { padding: 28px 20px; }
  .welcome-title { font-size: 32px; }
  .q-text { font-size: 23px; }
  .form-title { font-size: 24px; }
  .result-title { font-size: 26px; }
  .contacts-title { font-size: 20px; }
  th, td { padding: 12px 14px; }
}

/* Mobile phones */
@media (max-width: 480px) {
  .welcome-title { font-size: 28px; }
  .q-text { font-size: 21px; }
  .btn { padding: 16px 24px; font-size: 15px; }
  .main { padding: 24px 16px; }
  .header { padding: 14px 20px; }
  .footer { padding: 14px 20px; }
  .footer-logo, .footer-btn { font-size: 12px; }
  th, td { padding: 10px 12px; font-size: 12px; }
  th { font-size: 10px; }
}
