/* ==========================================================
   FORMULARIO PÚBLICO DE EVALUACIÓN DE CAPACITACIÓN (ASISTENTES)
   Diseño Móvil-Primero, Moderno e Intuitivo
   ========================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --success: #10b981;
  --dark: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 16px -2px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 32px -4px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--gray-800);
  min-height: 100vh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.survey-wrapper {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

/* LOGO INSTITUCIONAL */
.survey-branding {
  text-align: center;
  margin-bottom: 1.25rem;
}

.survey-branding-logo {
  max-height: 65px;
  max-width: 250px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: inline-block;
}

/* HEADER DEL EVENTO */
.event-header-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.event-header-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c7d2fe;
  margin-bottom: 0.75rem;
}

.event-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.event-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 480px) {
  .event-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: #e0e7ff;
}

.event-meta-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

/* FORMULARIO */
.survey-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.survey-intro {
  font-size: 0.925rem;
  color: var(--gray-600);
  margin-bottom: 1.75rem;
  line-height: 1.5;
  border-left: 3px solid var(--primary);
  padding-left: 0.85rem;
}

.question-block {
  margin-bottom: 2rem;
}

.question-block:last-of-type {
  margin-bottom: 1.5rem;
}

.question-header {
  margin-bottom: 0.85rem;
}

.question-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  display: block;
  margin-bottom: 0.2rem;
}

.question-text {
  font-size: 1.025rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
}

/* OPCIONES DE EVALUACIÓN (RATING TILES) */
.rating-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .rating-options-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rating-option {
  position: relative;
}

.rating-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rating-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 0.5rem;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
  min-height: 76px;
  user-select: none;
}

.rating-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.rating-option:hover .rating-label {
  border-color: var(--gray-400);
  background: var(--white);
}

/* ESTADOS ACTIVOS DE BOTONES */
.rating-option.excelente input[type="radio"]:checked + .rating-label {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px);
}

.rating-option.bueno input[type="radio"]:checked + .rating-label {
  border-color: #3b82f6;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.rating-option.regular input[type="radio"]:checked + .rating-label {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
}

.rating-option.malo input[type="radio"]:checked + .rating-label {
  border-color: #ef4444;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}

/* CAMPO DE SUGERENCIAS */
.textarea-styled {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--dark);
  resize: vertical;
  min-height: 110px;
  transition: all 0.2s ease;
}

.textarea-styled:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* BOTÓN DE ENVÍO */
.btn-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
}

.btn-submit:active {
  transform: translateY(1px);
}

/* PANTALLA DE AGRADECIMIENTO */
.thankyou-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  margin: 3rem auto;
}

.thankyou-icon {
  width: 80px;
  height: 80px;
  background: #dcfce7;
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.25);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.thankyou-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.thankyou-message {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.survey-footer {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.8rem;
  padding: 1rem 0;
}
