:root {
  --navy: #00296b;
  --blue: #4F8CE6;
  --fecha: #076092;
  --knob: #0031cc;  /* azul del logo (color de selección) */
  --track: #e0e0e0;
  --label: #5e5e5e;
  --li-border: #ddd;
  --input-border: #ccc;
  --error: #b42318;
  --success: #067647;
}

* { box-sizing: border-box; }

body {
  font-family: "Raleway", system-ui, sans-serif;
  background: url(/static/fondo-ieaf.jpg);
  background-size: cover;
  background-attachment: fixed;
  margin: 40px 0;
  color: #1c2430;
}

/* ---- Tarjeta blanca central (equivale a body>form del original) ---- */
.page-card {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  padding: 40px;
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, .16), 0 3px 6px rgba(0, 0, 0, .23);
}

/* ---- Selector de idioma (arriba a la derecha) ---- */
.lang-switch {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 14px;
  color: #999;
}
.lang-switch a { color: var(--navy); text-decoration: none; padding: 2px 4px; }
.lang-switch a:hover { text-decoration: underline; }
.lang-switch a.active { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.lang-switch .sep { color: #bbb; }

/* ---- Cabecera con logo (configurable) ---- */
.headerLogo { height: 60px; width: 100%; text-align: center; }
.headerLogo img { width: auto; max-width: 40%; margin-bottom: 30px; }

.survey-title { color: #000; font-weight: 700; font-size: 24px; margin: 6px 0 12px; }
.intro { margin: 0 0 6px; color: #333; }
.intro p { margin: 0 0 8px; }
.muted { color: #777; }

/* ---- Datos del analista ---- */
.datos { margin: 20px 0 0; width: 100%; }
.datos .field-row { margin: 0 0 12px; }
.datos label { min-width: 160px; display: inline-block; vertical-align: middle; }
.datos input {
  font-family: "Raleway", sans-serif; font-size: 17px; padding: 5px 10px;
  border-radius: 5px; border: 1px solid var(--input-border); color: var(--blue); width: 40%;
}
.datos input[readonly] { background: #f2f4f8; color: #999; }

/* ---- Variables e indicadores ---- */
.mainTable { margin: 40px 0 0; width: 100%; }
.mainTable ol { margin: 0; padding-left: 30px; }
.mainTable li { border: 1px solid var(--li-border); padding: 3px 10px; margin-bottom: 40px; list-style: decimal; }
.mainTable li > p { display: block; margin: 10px 20px 8px; color: var(--navy); font-weight: 600; }
.mainTable li > p span { font-size: 13px; font-style: italic; color: #777; font-weight: 400; }
.mainTable li .var-desc { color: #777; font-weight: 400; margin: 0 20px 6px; font-size: 14px; }

/* ---- Slider (radios-to-slider): barra gris, puntos blancos, knob ámbar ---- */
.rts {
  box-sizing: content-box;  /* como el original: alto total 32px (22 + 5+5) */
  position: relative;
  height: 22px;
  background-color: var(--track);
  border-radius: 25px;
  padding: 5px;
  margin: 16px 0 80px 20px;
}
.rts-point { position: absolute; top: 5px; }  /* left lo fija el JS (px) */
.rts-input {
  position: absolute; top: 0; left: 0; width: 22px; height: 22px;
  margin: 0; opacity: 0; cursor: pointer; z-index: 3;
}
.rts-dot {
  display: block; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; position: relative; z-index: 2;
  transition: width .12s, height .12s, background .12s, margin .12s;
}
.rts-point:hover .rts-dot { box-shadow: 0 0 0 2px rgba(79, 140, 230, .5); }
.rts-input:checked ~ .rts-dot {  /* knob azul (32px) sobre el punto */
  width: 32px; height: 32px; background: var(--knob); margin: -5px;
}
.rts-input:focus-visible ~ .rts-dot { outline: 2px solid var(--navy); outline-offset: 2px; }
.rts-label {
  position: absolute; top: 34px; left: 11px; transform: translateX(-50%);
  width: 110px; text-align: center; color: var(--label); font-size: 14px; cursor: pointer;
  line-height: 1.25;
}
.rts-input:checked ~ .rts-label { font-weight: 700; color: var(--navy); }
.rts-cap { display: inline; }

/* ---- Consentimiento / privacidad ---- */
.privacy { margin: 10px 20px; }
.privacy summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.consent { margin: 10px 20px; }
.consent label { display: inline-flex; gap: 10px; align-items: flex-start; }

.valoracion { margin: 24px 20px 8px; font-style: italic; color: #555; font-size: 14px; }
.edit-notice { margin: 8px 20px; color: #777; font-size: 14px; }
.readonly-notice { margin: 12px 20px; color: var(--error); }
.edit-intro { color: #777; margin: 0 0 8px; }

input[type="submit"], .btn {
  background: var(--navy); border: 0; color: #fff; font-size: 17px;
  padding: 10px 15px; border-radius: 0; cursor: pointer; font-family: inherit;
  display: inline-block; text-decoration: none; margin: 10px 20px;
}
input[type="submit"]:hover, .btn:hover { background: #000; }

/* ---- Errores ---- */
.errors {
  background: #fdecea; border: 1px solid var(--error); color: var(--error);
  border-radius: 6px; padding: 12px 16px; margin: 0 20px 16px;
}

/* ---- Selector de idioma / mensajes ---- */
.lang-select { text-align: center; padding: 10px 0 20px; }
.lang-buttons { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.btn-lang { margin: 0; }
.message { text-align: center; padding: 60px 20px 50px; }
.message .survey-title { margin-bottom: 16px; }
.message p { max-width: 620px; margin: 0 auto; color: #444; }
.message.success h1 { color: var(--success); }

/* ---- Pie ---- */
.footer { max-width: 1100px; margin: 0 auto; padding: 0 40px; overflow: hidden; }
.footer .txt { float: right; line-height: 43px; font-size: 12px; color: #000; margin-right: 10px; }
.footer .txt a, .footer .txt a:visited { color: var(--navy); }

/* ---- Responsive: el slider pasa a lista vertical ---- */
@media (max-width: 720px) {
  body { margin: 10px 0; }
  .page-card { padding: 20px 16px; margin: 0 10px; }
  .headerLogo img { max-width: 80%; }
  .datos label { min-width: 0; display: block; margin-bottom: 4px; }
  .datos input { width: 100%; }
  .mainTable ol { padding-left: 20px; }

  .rts { height: auto; background: transparent; border-radius: 0; padding: 0; margin: 8px 0 8px; }
  .rts-point { position: static !important; display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid #eee; }
  .rts-point:first-of-type { border-top: none; }
  .rts-input { position: static; opacity: 1; width: 18px; height: 18px; accent-color: var(--navy); }
  .rts-dot { display: none; }
  .rts-label { position: static; transform: none; width: auto; text-align: left; }
  .footer .txt { float: none; text-align: center; color: #000; }
}
