* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f5f5f5; color: #333; }
a { color: #FFB74D; text-decoration: none; }

/* Hero landing */
.hero {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(135deg,#FFB74D 0%,#FF8A65 100%);
  color: white;
}
.hero h1 { font-size: 3em; margin-bottom: 0.2em; }
.hero p { font-size: 1.2em; margin-bottom: 1em; }
.cta .btn {
  display: inline-block;
  margin: 0 .5em;
  padding: .8em 1.5em;
  background: white; color: #FF8A65; border-radius: 4px;
  font-weight: bold;
}
.cta .btn-secondary {
  background: transparent; border: 2px solid white; color: white;
}

/* Features */
.features { display: flex; justify-content: space-around; padding: 50px 20px; }
.feature { width: 30%; text-align: center; }
.feature h2 { margin-bottom: .5em; color: #FF8A65; }

/* Footer */
footer { text-align: center; padding: 20px; background: #eee; margin-top: 50px; }

/* Formularios */
.form-page {
  display: flex; justify-content: center; align-items: center;
  height: 100vh; background: #fafafa;
}
.form {
  background: white; padding: 2em; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1); width: 320px;
}
.form h2 { margin-bottom: 1em; color: #FF8A65; }
.form label { display: block; margin-bottom: .8em; }
.form input { width: 100%; padding: .6em; margin-top: .3em; }
.form button {
  width: 100%; padding: .8em; background: #FF8A65;
  border: none; color: white; font-size: 1em; border-radius: 4px;
  cursor: pointer; margin-top: 1em;
}
.form .errors { color: #c00; margin-bottom: 1em; }
.form .notice { color: #080; margin-bottom: 1em; }
.form .small { font-size: .9em; text-align: center; margin-top: .8em; }

/* Dashboard header */
.dashboard-header {
  background: #FFB74D; color: white; padding: 1em 2em;
  display: flex; justify-content: space-between; align-items: center;
}
.dashboard-header a { background: white; color: #FF8A65;
  padding: .5em 1em; border-radius: 4px; font-weight: bold; }
.dashboard-main {
  padding: 2em;
  text-align: center;
}

.dashboard-main h2 {
  margin-bottom: 1em;
  color: #FF8A65;
}

.questionnaire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5em;
  margin-top: 2em;
}

.card {
  display: block;
  background: #fff;
  border: 2px solid #FFB74D;
  border-radius: 8px;
  padding: 1.2em;
  font-size: 1.1em;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card:hover {
  background: #FFB74D;
  color: white;
  transform: scale(1.05);
}

/* ─── Estilos del cuestionario infantil ─── */
.slider-block {
  margin-bottom: 1.5em;
}
input[type="range"] {
  width: 100%;
  accent-color: #FFB74D;
  height: 8px;
  border-radius: 4px;
}
label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
/* 1. Número de pregunta más pequeño */
.slider-block label strong {
  font-size: 1rem;
  color: #333;
}

/* 2. Texto de afirmaciones más grande */
.semantic-scale span {
  font-size: 1.1rem;
  color: #444;
}

/* 3. “Normal” sobre el punto medio en vista vertical */
.center-line {
  position: relative;
}
.center-line::before {
  content: "Normal";
  position: absolute;
  top: -1.5em;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 0.25em;
  font-size: 0.9rem;
  color: #FF8A65;
}

/* ─── Ajustes específicos para formulario_infantil ─── */
/* Estructura en fila: afirmación izquierda, slider expansible, afirmación derecha */
.semantic-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Cada afirmación ocupa un ancho fijo y permite salto de línea */
.semantic-scale span {
  flex: 0 0 100px;          /* ajusta a tu medida de texto */
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.2em;
}

/* Slider ocupa todo el espacio restante */
.slider-wrapper {
  flex: 1;
  margin: 0 0.5em;
}

/* Asegurar que el rango llene su contenedor */
.slider-wrapper input[type=range] {
  width: 100%;
}

/* En vista horizontal, cada tarjeta mantiene ancho uniforme */
.response-area.horizontal-mode .slider-block {
  min-width: 340px;
  max-width: 340px;
}
/* ─── Sobrescribir para alinear correctamente ─── */
.semantic-scale {
  display: grid !important;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  column-gap: 12px;
  align-items: center;
}

/* Cada afirmación en hasta dos líneas, alineada a su lado */
.semantic-scale > span {
  word-break: break-word;
  line-height: 1.3em;
  text-align: center;
  font-size: 1.1rem;
}

/* Afirmación izquierda pegada al inicio */
.semantic-scale > span:first-child {
  justify-self: start;
  text-align: left;
}

/* Afirmación derecha pegada al final */
.semantic-scale > span:last-child {
  justify-self: end;
  text-align: right;
}

/* Slider ocupa siempre la columna central */
.slider-wrapper {
  width: auto !important;
}

/* Rellenar el contenedor */
.slider-wrapper input[type="range"] {
  width: 100% !important;
}
/* Ajustes específicos para el botón de imprimir */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9em;
  padding: 0.4em 0.8em;
  margin-left: 0.5em;
}

.print-btn .icon {
  font-size: 1.1em;
}

/* Opcional: colores alternos al hacer hover */
.print-btn:hover {
  background: var(--p);       /* mismo color primario que .card:hover */
  border-color: var(--p);
  color: white;
}

