/* static/css/encuesta.css */

/* Reset y Base */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--omni-bg-blue);
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--negro-texto);
  background-color: var(--omni-bg-blue);
  background-attachment: fixed;
  padding-bottom: 60px; /* Reducido para compactar */
}

* {
  box-sizing: border-box;
}

/* Envoltorio Maestro para Diseño Integrado */
.main-card-wrapper {
  max-width: 850px;
  margin: 30px auto; /* Reducido de 40px */
  box-shadow: var(--shadow-lg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--blanco);
  position: relative;
}

/* Header Institucional Compacto y Elegante */
.encuesta-header {
  text-align: center;
  padding: 30px 20px 20px 20px; /* Compactado verticalmente */
  position: relative;
  overflow: hidden;
  background-color: var(--omni-azul-dark);
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.encuesta-header::before,
.encuesta-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  z-index: 1;
}

.encuesta-header::before {
  width: 220px;
  height: 220px;
  top: -110px;
  left: -50px;
}

.encuesta-header::after {
  width: 320px;
  height: 320px;
  bottom: -160px;
  right: -80px;
}

.logo-omnisalud, .encuesta-titulo, .encuesta-subtitulo {
  position: relative;
  z-index: 2;
}

.logo-omnisalud {
  max-width: 180px; /* Aumentado de 140px — margen eliminado para compensar altura */
  height: auto;
  margin-bottom: 0px;
}

.encuesta-titulo {
  color: var(--blanco);
  font-size: 28px; /* Un punto menos para balancear la compactación */
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}

.encuesta-subtitulo {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px; /* Un punto menos para balancear */
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.3;
}

/* Contenedores de Vista Compactos */
.form-container, .success-container {
  background: var(--blanco);
  padding: 25px 50px; /* Reducido verticalmente de 40px */
  position: relative;
  z-index: 10;
}

/* Pantalla de Éxito (Success UI) */
.success-container {
  display: none; 
  text-align: center;
  padding: 80px 50px; /* Compactado de 100px */
  animation: fadeIn 0.6s ease-out forwards;
}

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

.success-icon {
  width: 80px;
  height: 80px;
  background: #e7f4e9;
  color: #2e7d32;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 25px;
}

.success-title {
  color: var(--omni-azul-primary);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 20px;
}

.success-message {
  color: #444;
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 35px auto;
}

.btn-finish {
  background: var(--omni-azul-primary);
  color: var(--blanco);
  border: none;
  padding: 15px 45px;
  border-radius: 35px;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.btn-finish:hover {
  background: var(--omni-azul-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Bienvenida Compacta */
.bienvenida {
  background: #fafafa;
  border-left: 4px solid var(--omni-rosa-accent); /* Sutilmente más delgada */
  padding: 15px 20px;
  margin-bottom: 25px; /* Reducido de 35px */
  border-radius: 6px;
  border: 1px solid #eee;
}

.bienvenida h3 {
  color: var(--omni-azul-primary);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.bienvenida p {
  color: #444;
  line-height: 1.5;
  font-size: 14.5px;
}

/* Secciones de Formulario */
.seccion-header {
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.seccion-header h2 {
  color: var(--omni-azul-primary);
  font-size: 13.5px;
  font-weight: 700;
  border-left: 3px solid var(--omni-rosa-accent);
  padding-left: 10px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grilla Compacta */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;

gap: 15px; /* Reducido de 25px */
  margin-bottom: 12px;
}

/* Form Groups e Inputs Optimizados */
.form-group {
  margin-bottom: 18px; /* Reducido de 25px */
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13px;
}

.form-control {
  width: 100%;
  padding: 12px 15px; /* Más compacto */
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: var(--omni-azul-primary);
  box-shadow: 0 0 0 3px rgba(38, 128, 194, 0.08);
}

/* Preguntas y Calificación Compactas */
.pregunta {
  margin-bottom: 25px; /* Significativamente reducido de 40px */
}

.pregunta-titulo {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.pregunta-numero {
  width: 28px;
  height: 28px;
  background: var(--omni-azul-primary);
  color: var(--blanco);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-right: 12px;
  flex-shrink: 0;
}

.pregunta-texto {
  font-weight: 700;
  color: var(--omni-azul-dark);
  font-size: 15px;
}

.opciones-lista {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Reducido de 12px */
  padding-left: 40px;
}

/* Ocultar radio nativo — el label cubre toda el área de clic */
.opcion-radio input[type="radio"] {
  display: none;
}

.opcion-radio label {
  display: block;
  padding: 11px 18px; /* Más compacto verticalmente */
  background: #f8fbff;
  border: 1px solid #eef4fb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.opcion-radio input[type="radio"]:checked + label {
  background: var(--omni-azul-primary);
  border-color: var(--omni-azul-primary);
  color: var(--blanco);
  font-weight: 700;
}

.opcion-radio label:hover {
  background: #f0f7ff;
}

/* Área de Envío Compacta */
.leyenda-envio {
  text-align: center;
  color: #555;
  font-size: 14.5px;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 15px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.btn-submit-container {
  text-align: center;
  padding-top: 5px;
}

.btn-submit {
  background: var(--omni-azul-primary);
  color: var(--blanco);
  border: none;
  padding: 18px 0;
  width: 60%; /* Ligeramente más estrecho para desktop */
  border-radius: 35px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-md);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.btn-submit:hover {
  background: var(--omni-azul-dark);
  transform: translateY(-2px);
}

/* Footer Legales Compacto */
.footer-encuesta {
  border-top: 1px solid #eee;
  padding-top: 25px; /* Reducido de 40px */
  margin-top: 25px;
}

.politica-privacidad {
  font-size: 13.5px;
  color: #555;
  background: #f9f9f9;
  padding: 15px 20px; /* Reducido de 25px */
  border-radius: 10px;
  margin-bottom: 20px; /* Reducido de 35px */
  line-height: 1.6;
}

.politica-privacidad a {
  color: var(--omni-azul-primary);
  font-weight: 700;
  text-decoration: underline;
}

.checkbox-privacidad {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.checkbox-privacidad input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-privacidad label {
  font-size: 14.5px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
}

.footer-copyright {
    font-size: 11px;
    color: #BBB;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 880px) {
  .main-card-wrapper {
    margin: 15px 10px;
    border-radius: 12px;
  }

  .form-container, .success-container {
    padding: 20px 15px;
  }

  .btn-submit {
    width: 100%;
  }
}
