/* ---- Layout general y centrado ---- */
body {
  margin: 0;
  padding: 24px 8px;
  font-family: Arial, sans-serif;
  color: #222;
  background: linear-gradient(135deg, #e7ecf5 0%, #f5f7fb 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
}

/* Contenedor corporativo */
#form-wrapper {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d0d4e4;
  box-shadow: 0 8px 22px rgba(11, 44, 115, 0.12);
  padding: 24px 22px 28px 22px;
  box-sizing: border-box;
}

/* ---- Tipografía y títulos ---- */
h1,
h2,
h3 {
  font-family: Arial, sans-serif;
}

.titulo-general {
  font-size: 22px;
  color: #0b2c73;
  margin: 18px 0 4px;
  text-align: center;
}

.titulo-form {
  font-size: 20px;
  color: #0b2c73;
  margin-top: 0;
  text-align: center;
}

h2 {
  font-size: 18px;
  color: #0b2c73;
  margin-top: 0;
}

a {
  color: #0b3bb3;
}

/* ---- Bloques/secciones ---- */
.section {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 18px;
  border: 1px solid #dce1f0;
}

.section-barra {
  border-left: 5px solid #0b2c73;
}

label {
  display: block;
  margin: 6px 0;
}

select,
input[type="email"],
input[type="text"],
input[type="tel"],
textarea {
  margin-top: 4px;
  padding: 6px 8px;
  font-size: 14px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #c5cad8;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* ---- Botones ---- */
.btn {
  display: inline-block;
  margin-top: 12px;
  margin-right: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.btn-primario {
  background: #0b2c73;
  color: #ffffff;
}

.btn-primario:hover {
  background: #0d3a98;
  box-shadow: 0 3px 8px rgba(11, 44, 115, 0.35);
  transform: translateY(-1px);
}

.btn-secundario {
  background: #616161;
  color: #ffffff;
}

.btn-secundario:hover {
  background: #4a4a4a;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

/* ---- Estados ocultos ---- */
.hidden {
  display: none;
}

/* ---- Mensajes ---- */
.msg {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  background: #fff9dd;
  border-left: 4px solid #f2c200;
  font-size: 13px;
}

.msg-ok {
  background: #e8f5e9;
  border-left-color: #2e7d32;
}

.msg-alerta {
  background: #ffebee;
  border-left-color: #c62828;
}

/* ---- Barra de obligación ---- */
#barra-container {
  width: 100%;
  height: 16px;
  background: #e0e0e0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

#barra-nivel {
  height: 100%;
  width: 33%;
  background: #2e7d32;
  transition: width 0.3s ease, background-color 0.3s ease;
}

#texto-nivel {
  margin-top: 6px;
  font-size: 13px;
}

/* ---- Círculo MTGE ---- */
#mtge-contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
}

#mtge-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

#mtge-svg {
  transform: rotate(-90deg);
}

#mtge-svg circle {
  fill: none;
  stroke-width: 8;
}

#mtge-bg {
  stroke: #e0e0e0;
}

#mtge-progress {
  stroke: #1976d2;
  stroke-linecap: round;
  stroke-dasharray: 0 999;
  transition: stroke-dasharray 0.3s ease;
}

#mtge-circulo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  margin-top: -40px;
  margin-left: -40px;
  border-radius: 50%;
  background: #9e9e9e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: bold;
}

#mtge-valor {
  display: inline-block;
}

#mtge-texto {
  font-size: 13px;
  max-width: 460px;
}

.mtge-selectores {
  margin-top: 10px;
  font-size: 14px;
}

/* ---- Intro, textos, logos ---- */
.logo-header {
  text-align: center;
  margin-bottom: 10px;
}

.logo-corpece {
  max-width: 260px;
  width: 100%;
  height: auto;
}

.intro-text {
  font-size: 14px;
}

.intro-text.small {
  font-size: 12px;
  color: #555;
}

.label-bold {
  font-weight: bold;
}

.label-small {
  font-size: 13px;
  margin-top: 4px;
}

.intro-sub {
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 4px;
}

.base-legal {
  font-size: 13px;
}

.texto-seccion {
  font-size: 13px;
}

.subtitulo {
  font-size: 15px;
  margin-bottom: 4px;
  color: #0b2c73;
}

.nota-pequena {
  font-size: 12px;
  color: #555;
}

.separador {
  margin: 16px 0;
}

.resultado-resumen {
  margin-bottom: 12px;
}

.resultado-detalle {
  font-size: 14px;
}

.acciones-dpd {
  margin-top: 10px;
}

.detalle-acciones {
  margin-top: 10px;
  font-size: 13px;
}

.bloque-suscripcion {
  margin-bottom: 8px;
}

.chk-acepto-intro {
  margin-top: 10px;
}

/* Honeypot */
.honeypot {
  display: none;
}

/* ---- Responsivo ---- */
@media (max-width: 600px) {
  body {
    padding: 16px 4px;
  }

  #form-wrapper {
    padding: 16px 14px 20px 14px;
  }

  .logo-corpece {
    max-width: 220px;
  }

  .titulo-general {
    font-size: 18px;
  }

  .titulo-form {
    font-size: 18px;
  }
}


/* ---- Leyenda SPDP y calificación directa (MTGE) ---- */
.leyenda-spdp {
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: #eef3ff;
  border-left: 4px solid #0b2c73;
  font-size: 13px;
}

.mtge-directo {
  margin: 10px 0 14px;
  padding: 10px;
  border-radius: 10px;
  background: #fff9dd;
  border-left: 4px solid #f2c200;
  font-size: 13px;
}

.mtge-directo label {
  display: block;
  margin: 6px 0;
}
