@font-face {
  font-family: "Gotham Medium";
  src: url("fonts/GothamMedium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  padding-top: 110px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.43;
  color: #333;
  background: #fff;
}

a { color: #333; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header / footer ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 11;
  height: 80px;
  padding-top: 4px;
  background: #ffd100;
  box-shadow: 1px 0 3px 0 rgba(0, 0, 0, .2);
}

.site-header-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 160px;
}

.site-header img {
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  max-height: 72px;
  max-width: 180px;
}

.site-header-title,
.site-footer,
.busqueda label {
  font-family: "Gotham Medium", Gotham, Arial, sans-serif;
}

.site-header-title {
  color: #144b99;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

.site-footer {
  padding: 12px 30px;
  background: #ffd100;
  color: #144b99;
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

/* ---------- Contenido ---------- */

.container {
  max-width: 1170px;
  min-height: 600px;
  margin: 0 auto;
  padding: 0 15px 30px;
}

.busqueda form { max-width: 480px; }

.busqueda label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-group { display: flex; margin-bottom: 15px; }

.input-group input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 6px 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.input-group input:focus { outline: 2px solid #66afe9; outline-offset: -1px; }
.input-group .btn { border-radius: 0 4px 4px 0; }

#captcha_cont { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
#captcha_cont .ayuda-contenido { flex-basis: 100%; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font: inherit;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #e6e6e6; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-warning { color: #fff; background: #f0ad4e; border-color: #eea236; }
.btn-warning:hover { background: #ec971f; }
.btn-success { color: #fff; background: #5cb85c; border-color: #4cae4c; }
.btn-success:hover { background: #449d44; }

.ayuda {
  width: 24px;
  height: 24px;
  margin-left: 4px;
  padding: 0;
  font-weight: bold;
  color: #fff;
  background: #144b99;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
}

.ayuda-contenido {
  margin: 0 0 15px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
}
.ayuda-contenido img { max-width: 250px; height: auto; display: block; }
.ayuda-contenido p { margin: 6px 0 0; }

/* ---------- Resultado ---------- */

.resultado { margin-top: 30px; }

.alerta {
  max-width: 970px;
  padding: 15px;
  color: #8a6d3b;
  background: #fcf8e3;
  border: 1px solid #faebcc;
  border-radius: 4px;
}

.pestanias { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.pestanias button {
  padding: 10px 15px;
  font: inherit;
  color: #144b99;
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.pestanias button:hover { background: #eee; }
.pestanias button.activo { color: #fff; background: #144b99; }

.paneles { padding: 20px; border: 1px solid #ddd; border-radius: 10px; }

.panel { display: flex; gap: 20px; }
.panel iframe { flex: 1; min-width: 0; height: 600px; border: 1px solid #ddd; }
.acciones { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }

/* ---------- Diálogo enviar ---------- */

dialog {
  width: min(500px, 92vw);
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog h4 { margin: 0 0 15px; font-size: 18px; }
dialog input[type="text"] { width: 100%; height: 36px; padding: 6px 12px; font: inherit; border: 1px solid #ccc; border-radius: 4px; }
.dlg-msg { min-height: 20px; margin: 10px 0; }
.dlg-botones { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  body { padding-top: 150px; }
  .site-header { height: 120px; }
  .site-header-content { flex-direction: column; gap: 2px; padding: 0 16px; }
  .site-header img { position: static; transform: none; }
  .site-header-title { max-width: 100%; font-size: clamp(18px, 6vw, 22px); line-height: 1.1; }
  .container { min-height: 0; }
  .panel { flex-direction: column; }
  .panel iframe { height: 450px; }
  .acciones { flex-direction: row; flex-wrap: wrap; }
  .acciones .btn { flex: 1; }
}
