/* ==========================================
   BANK.CSS - Encuesta Anchor
   Versión 2.0 - Completamente reescrito
   Colores: #2a6a8a (primary), #a7d5f3 (accent)
   ========================================== */

/* ==========================================
   1. VARIABLES Y RESET
   ========================================== */

:root {
  --primary: #2a6a8a;
  --primary-dark: #1e5366;
  --accent: #a7d5f3;
  --bg: #f7fbff;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --success: #10b981;
  --error: #ef4444;
  --border: rgba(42, 106, 138, 0.12);
  --shadow: 0 4px 20px rgba(42, 106, 138, 0.08);
  --gradient: linear-gradient(135deg, #2a6a8a, #a7d5f3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Montserrat", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden !important;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

p {
  font-weight: 300;
}

/* ==========================================
   2. NAVBAR
   ========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(42, 106, 138, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand img {
  height: 42px;
  width: auto;
  transition: transform 0.3s ease;
}

.brand:hover img {
  transform: scale(1.05);
}

.desktop-nav {
  display: none;
  gap: 2.5rem;
}

.desktop-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(249, 250, 251, 0.7);
  transition: color 0.3s ease;
  position: relative;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #f9fafb;
  transition: width 0.3s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #f9fafb;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
  .menu-toggle {
    display: none !important;
  }
}

/* Menu overlay mobile */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 79, 106, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.menu-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.menu-overlay__list {
  list-style: none;
  text-align: center;
}

.menu-overlay__list li {
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.menu-overlay[aria-hidden="false"] .menu-overlay__list li {
  opacity: 1;
  transform: translateY(0);
}

.menu-overlay__list a {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(249, 250, 251, 0.7);
  transition: color 0.3s ease;
}

.menu-overlay__list a:hover {
  color: #f9fafb;
}

/* ==========================================
   3. HERO
   ========================================== */

.survey-hero {
  position: relative;
  padding: 10rem 2rem 3rem;
  background: linear-gradient(180deg, #e1f0f7 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: floatGlow 8s ease-in-out infinite;
}

.hero-glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary), transparent);
  top: -150px;
  left: -100px;
}

.hero-glow-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent), transparent);
  bottom: -100px;
  right: -80px;
  animation-delay: -4s;
}

@keyframes floatGlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(42, 106, 138, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(42, 106, 138, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-light);
  margin: 0;
}

/* ==========================================
   4. PROGRESS BAR
   ========================================== */

.progress-container {
  position: sticky;
  top: 73px;
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.progress {
  height: 4px;
  background: rgba(42, 106, 138, 0.1);
  position: relative;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--gradient);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   5. MAIN CONTAINER
   ========================================== */

.survey-main {
  flex: 1;
  padding: 3rem 0;
  width: 100%;
  max-width: 100vw;
}

.survey-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ==========================================
   6. STEPS & CARDS
   ========================================== */

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

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

.step-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  border-radius: 20px 20px 0 0;
}

.step-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(42, 106, 138, 0.3);
}

.step-header h2 {
  font-size: 2rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.step-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  margin: 0;
}

.muted {
  color: var(--text-light);
}

/* ==========================================
   7. QUESTIONS GRID
   ========================================== */

.questions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .questions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

/* ==========================================
   8. QUESTION GROUPS
   ========================================== */

.question-group {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.question-group:hover {
  border-color: rgba(42, 106, 138, 0.25);
  box-shadow: 0 2px 12px rgba(42, 106, 138, 0.08);
}

.question-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(42, 106, 138, 0.15);
  background: #fff;
  transform: translateY(-2px);
}

.question-group.full-width {
  grid-column: 1 / -1;
}

/* Espaciado extra para preguntas con radio groups */
.question-group.full-width:has(.radio-group) {
  margin-bottom: 1rem;
}

.question-label {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  cursor: pointer;
  width: 100%;
}

.question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.required {
  color: var(--error);
  font-weight: 700;
}

.helper-text {
  font-size: 0.85rem;
  color: var(--text-light);
  background: rgba(42, 106, 138, 0.05);
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ==========================================
   9. INPUTS (SELECTS & TEXT)
   ========================================== */

.input-select,
.input-text,
.input-textarea {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.875rem 1.125rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.input-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232a6a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  padding-right: 3rem !important;
}

.input-select:hover,
.input-text:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(42, 106, 138, 0.08);
}

.input-select:focus,
.input-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.12);
}

.input-select option {
  padding: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  white-space: normal;
  word-wrap: break-word;
}

.input-text::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

/* ==========================================
   10. RADIO GROUPS
   ========================================== */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.radio-option:hover {
  border-color: var(--primary);
  background: rgba(42, 106, 138, 0.02);
  box-shadow: 0 2px 8px rgba(42, 106, 138, 0.08);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
  margin-top: 2px;
}

.radio-option input[type="radio"]:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.08);
}

.radio-option input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.12);
}

.radio-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(42, 106, 138, 0.05);
  box-shadow: 0 2px 12px rgba(42, 106, 138, 0.12);
}

.radio-option span {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.radio-option:has(input:checked) span {
  font-weight: 500;
  color: var(--primary-dark);
}

/* Focus states for accessibility */
.radio-option input[type="radio"]:focus {
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.15);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Touch-friendly sizing for mobile */
@media (max-width: 768px) {
  .radio-group {
    gap: 0.65rem;
  }

  .radio-option {
    padding: 1rem 1rem;
    gap: 0.75rem;
    min-height: 50px;
    align-items: flex-start;
  }

  .radio-option input[type="radio"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 0;
  }

  .radio-option span {
    font-size: 0.875rem;
    line-height: 1.45;
    padding-top: 1px;
  }

  .checkbox-option {
    padding: 1rem 1rem;
    min-height: 50px;
    align-items: flex-start;
  }

  .checkbox-custom {
    margin-top: 1px;
  }

  .checkbox-label {
    line-height: 1.45;
    padding-top: 2px;
  }
}

@media (max-width: 480px) {
  .radio-group {
    gap: 0.4rem;
    margin-top: 0.5rem;
  }

  .radio-option {
    padding: 0.7rem 0.6rem;
    gap: 0.5rem;
    min-height: auto;
    border-radius: 8px;
  }

  .radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    flex-shrink: 0;
  }

  .radio-option span {
    font-size: 0.78rem;
    line-height: 1.35;
    padding-top: 0;
  }

  .checkbox-option {
    padding: 0.7rem 0.6rem;
    gap: 0.5rem;
    min-height: auto;
  }

  .checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }

  .checkbox-label {
    font-size: 0.78rem;
    line-height: 1.35;
    padding-top: 0;
  }

  .question-text {
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
  }

  .question-group {
    padding: 0.75rem 0.6rem !important;
  }
}

@media (max-width: 375px) {
  .radio-group {
    gap: 0.35rem;
  }

  .radio-option {
    padding: 0.6rem 0.5rem;
    gap: 0.45rem;
    border-radius: 6px;
  }

  .radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 1px;
  }

  .radio-option span {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .checkbox-option {
    padding: 0.6rem 0.5rem;
    gap: 0.45rem;
  }

  .checkbox-custom {
    width: 16px;
    height: 16px;
    min-width: 16px;
  }

  .checkbox-label {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .question-text {
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
  }

  .question-group {
    padding: 0.6rem 0.5rem !important;
  }

  .step-card {
    padding: 1rem 0.5rem !important;
  }
}

/* ==========================================
   11. CHECKBOX GROUPS
   ========================================== */

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.checkbox-option:hover {
  border-color: var(--primary);
  background: rgba(42, 106, 138, 0.02);
  box-shadow: 0 2px 8px rgba(42, 106, 138, 0.08);
}

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

.checkbox-custom {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-option:hover .checkbox-custom {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.08);
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.12);
}

.checkbox-option input[type="checkbox"]:checked ~ .checkbox-custom::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  top: 3px;
  left: 7px;
}

.checkbox-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(42, 106, 138, 0.05);
  box-shadow: 0 2px 12px rgba(42, 106, 138, 0.12);
}

.checkbox-label {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 400;
  user-select: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.checkbox-option:has(input:checked) .checkbox-label {
  font-weight: 500;
  color: var(--primary-dark);
}

/* Focus states for accessibility */
.checkbox-option input[type="checkbox"]:focus ~ .checkbox-custom {
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.15);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Touch-friendly sizing for mobile */
@media (max-width: 768px) {
  .checkbox-group {
    gap: 0.65rem;
  }

  .checkbox-option {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .checkbox-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .checkbox-label {
    font-size: 0.875rem;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .checkbox-group {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .checkbox-option {
    padding: 0.75rem 0.875rem;
    gap: 0.65rem;
  }

  .checkbox-custom {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .checkbox-label {
    font-size: 0.825rem;
    line-height: 1.35;
  }
}

@media (max-width: 375px) {
  .checkbox-group {
    gap: 0.45rem;
  }

  .checkbox-option {
    padding: 0.65rem 0.75rem;
    gap: 0.6rem;
  }

  .checkbox-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  .checkbox-label {
    font-size: 0.8rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* ==========================================
   12. TABLA BÍBLICA (Radio Buttons)
   ========================================== */

.bible-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: relative;
}

.bible-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.matrix-info {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: rgba(42, 106, 138, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.matrix-info strong {
  font-size: 0.9rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.bible-table thead {
  background: var(--gradient);
  color: #fff;
}

.bible-table th {
  padding: 0.6rem 0.3rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.7rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1.2;
}

.bible-table th:first-child {
  text-align: left;
  padding-left: 0.5rem;
  min-width: 100px;
  max-width: 110px;
}

.bible-table th:last-child {
  border-right: none;
}

.bible-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.bible-table tbody tr:hover {
  background: rgba(42, 106, 138, 0.03);
}

.bible-table tbody tr:last-child {
  border-bottom: none;
}

.bible-table td {
  padding: 0.5rem 0.25rem;
  text-align: center;
}

.bible-table td.table-label {
  text-align: left;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text);
  padding-left: 0.5rem;
  padding-right: 0.25rem;
  line-height: 1.25;
  word-wrap: break-word;
}

.bible-table input[type="radio"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ==========================================
   13. BOTONES
   ========================================== */

.step-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(42, 106, 138, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.75rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  min-width: 140px;
  justify-content: center;
  /* Optimización CRÍTICA para Android/Redmi */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* Evitar lag en Android */
  will-change: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(42, 106, 138, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(42, 106, 138, 0.35);
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(42, 106, 138, 0.25);
  background: linear-gradient(135deg, #1e6a8a, #2a6a8a);
}

.btn-secondary {
  background: rgba(42, 106, 138, 0.08);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(42, 106, 138, 0.12);
  border-color: var(--primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  min-width: 180px;
  padding: 1.1rem 2rem;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.btn-success:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-success:active {
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #047857, #065f46);
}

.btn-success:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 3px;
}

.btn-success svg {
  width: 22px;
  height: 22px;
}

.btn:disabled,
.btn.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
}

.btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   12. MENSAJE FINAL
   ========================================== */

.final-message {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(42, 106, 138, 0.05), rgba(167, 213, 243, 0.1));
  border-radius: 16px;
  margin: 2rem 0;
}

.final-icon {
  width: 80px;
  height: 80px;
  line-height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--gradient);
  color: #fff;
  font-size: 3rem;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(42, 106, 138, 0.3);
}

.final-message h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.final-message p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin: 0;
}

/* ==========================================
   14. FOOTER
   ========================================== */

.survey-footer {
  background: linear-gradient(135deg, #0a1929, #1e3a5f);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-content p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(167, 213, 243, 0.9);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* ==========================================
   15. RESPONSIVE - OPTIMIZADO PARA MÓVIL
   ========================================== */

/* Tablet y móvil grande */
@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .survey-hero {
    padding: 8rem 1.25rem 2.5rem;
  }

  .hero-content h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero-content p {
    font-size: 1rem;
  }

  .survey-container {
    padding: 0 1rem;
  }

  .step-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }

  .step-header {
    margin-bottom: 2rem;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .step-header h2 {
    font-size: 1.5rem;
  }

  .step-header p {
    font-size: 0.95rem;
  }

  .questions-grid {
    gap: 0.875rem;
    grid-template-columns: 1fr !important;
  }

  .question-group {
    padding: 1.125rem;
  }

  .question-group.full-width {
    margin-bottom: 0.5rem;
  }

  .question-group.full-width:has(.radio-group) {
    margin-bottom: 1.25rem;
  }

  .question-text {
    font-size: 0.9rem;
  }

  .question-label {
    gap: 0.5rem;
  }

  .input-select,
  .input-text {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .input-select {
    padding-right: 2.75rem !important;
    background-size: 16px;
  }

  .step-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }

  /* Tabla Bíblica responsive */
  .bible-table-wrapper {
    margin-top: 0.75rem;
    border-radius: 8px;
    max-width: 100%;
  }

  .bible-table {
    min-width: 380px;
  }

  .bible-table th,
  .bible-table td {
    padding: 0.45rem 0.2rem;
    font-size: 0.65rem;
  }

  .bible-table th {
    font-size: 0.6rem;
    line-height: 1.15;
  }

  .bible-table th:first-child,
  .bible-table td.table-label {
    padding-left: 0.4rem;
    padding-right: 0.2rem;
    min-width: 90px;
    max-width: 95px;
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .bible-table input[type="radio"] {
    width: 14px;
    height: 14px;
  }

  .matrix-info {
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  .matrix-info strong {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .helper-text {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }

  .footer-content {
    padding: 0 1.5rem;
  }
}

/* Móvil medio */
@media (max-width: 600px) {
  .survey-hero {
    padding: 7rem 1rem 2rem;
  }

  .step-card {
    padding: 1.5rem 1rem;
  }

  .step-header {
    margin-bottom: 1.75rem;
  }

  .step-number {
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .step-header h2 {
    font-size: 1.35rem;
  }

  .questions-grid {
    gap: 0.75rem;
    grid-template-columns: 1fr !important;
  }

  .question-group {
    padding: 1rem;
    border-radius: 10px;
  }

  .question-group.full-width {
    margin-bottom: 0.75rem;
  }

  .question-group.full-width:has(.radio-group) {
    margin-bottom: 1.5rem;
  }

  .question-text {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .question-label {
    gap: 0.45rem;
  }

  .input-select,
  .input-text {
    padding: 0.75rem 0.95rem;
    font-size: 16px !important; /* Previene zoom en iOS */
    border-radius: 8px;
  }

  .input-select {
    padding-right: 2.5rem !important;
    background-size: 15px !important;
    background-position: right 0.85rem center !important;
  }

  .input-select option {
    font-size: 0.9rem;
    padding: 0.7rem;
  }

  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  .bible-table {
    min-width: 340px;
  }

  .bible-table th,
  .bible-table td {
    padding: 0.4rem 0.15rem;
    font-size: 0.58rem;
  }

  .bible-table th {
    font-size: 0.55rem;
    line-height: 1.1;
  }

  .bible-table th:first-child,
  .bible-table td.table-label {
    padding-left: 0.35rem;
    padding-right: 0.15rem;
    font-size: 0.56rem;
    min-width: 80px;
    max-width: 85px;
    line-height: 1.15;
    word-wrap: break-word;
  }

  .bible-table input[type="radio"] {
    width: 13px;
    height: 13px;
  }

  .matrix-info {
    padding: 0.5rem;
    font-size: 0.78rem;
  }

  .matrix-info strong {
    font-size: 0.8rem;
    line-height: 1.25;
  }
}

/* Móvil pequeño */
@media (max-width: 480px) {
  .nav {
    padding: 0.875rem 1rem;
  }

  .brand img {
    height: 38px;
  }

  .survey-hero {
    padding: 6.5rem 1rem 1.75rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
  }

  .hero-content h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 0.75rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .survey-main {
    padding: 2rem 0;
  }

  .survey-container {
    padding: 0 0.875rem;
  }

  .step-card {
    padding: 1.25rem 0.875rem;
    border-radius: 14px;
  }

  .step-header {
    margin-bottom: 1.5rem;
  }

  .step-number {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    margin-bottom: 0.65rem;
  }

  .step-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
  }

  .step-header p {
    font-size: 0.875rem;
  }

  .questions-grid {
    gap: 0.65rem;
    grid-template-columns: 1fr !important;
  }

  .question-group {
    padding: 0.875rem;
    border-radius: 8px;
  }

  .question-group.full-width {
    margin-bottom: 0.5rem;
  }

  .question-group.full-width:has(.radio-group) {
    margin-bottom: 1.25rem;
  }

  .question-label {
    gap: 0.5rem;
  }

  .question-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .input-select,
  .input-text,
  .input-textarea {
    padding: 0.7rem 0.875rem;
    font-size: 16px !important;
    border-radius: 8px;
  }

  .input-select {
    padding-right: 2.4rem !important;
    background-size: 14px !important;
    background-position: right 0.75rem center !important;
  }

  .input-select option {
    font-size: 0.875rem;
    padding: 0.65rem 0.7rem;
  }

  .helper-text {
    font-size: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
  }

  .step-actions {
    gap: 0.65rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
  }

  .btn {
    padding: 0.8rem 1.125rem;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  .btn svg {
    width: 18px;
    height: 18px;
  }

  /* Tabla Bíblica muy compacta */
  .bible-table-wrapper {
    margin-top: 0.5rem;
    border-radius: 6px;
    max-width: calc(100vw - 1.5rem);
  }

  .bible-table {
    min-width: 310px;
  }

  .bible-table th,
  .bible-table td {
    padding: 0.35rem 0.12rem;
    font-size: 0.52rem;
  }

  .bible-table th {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.5rem;
    line-height: 1.1;
  }

  .bible-table th:first-child,
  .bible-table td.table-label {
    padding-left: 0.3rem;
    padding-right: 0.1rem;
    font-size: 0.5rem;
    min-width: 70px;
    max-width: 75px;
    line-height: 1.1;
  }

  .bible-table input[type="radio"] {
    width: 12px;
    height: 12px;
  }

  .matrix-info {
    padding: 0.45rem;
    font-size: 0.72rem;
  }

  .matrix-info strong {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .final-message {
    padding: 2rem 1.25rem;
  }

  .final-icon {
    width: 65px;
    height: 65px;
    line-height: 65px;
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
  }

  .final-message h3 {
    font-size: 1.5rem;
  }

  .final-message p {
    font-size: 1rem;
  }

  .footer-content {
    padding: 0 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Móvil extra pequeño */
@media (max-width: 375px) {
  body {
    font-size: 15px;
  }

  .survey-hero {
    padding: 6rem 0.875rem 1.5rem;
  }

  .survey-container {
    padding: 0 0.75rem;
  }

  .step-card {
    padding: 1.125rem 0.75rem;
  }

  .question-group {
    padding: 0.75rem;
  }

  .question-text {
    font-size: 0.8rem;
  }

  .input-select,
  .input-text {
    font-size: 16px !important;
    padding: 0.65rem 0.75rem;
  }

  .input-select {
    padding-right: 2.3rem !important;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .bible-table {
    min-width: 290px;
  }

  .bible-table th,
  .bible-table td {
    padding: 0.3rem 0.1rem;
    font-size: 0.48rem;
  }

  .bible-table th {
    font-size: 0.46rem;
    line-height: 1.05;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .bible-table th:first-child,
  .bible-table td.table-label {
    padding-left: 0.25rem;
    padding-right: 0.1rem;
    font-size: 0.46rem;
    min-width: 60px;
    max-width: 65px;
    line-height: 1.05;
  }

  .bible-table input[type="radio"] {
    width: 11px;
    height: 11px;
  }

  .matrix-info {
    padding: 0.4rem;
    font-size: 0.68rem;
  }

  .matrix-info strong {
    font-size: 0.72rem;
    line-height: 1.15;
  }
}

/* Landscape móvil */
@media (max-width: 900px) and (orientation: landscape) {
  .survey-hero {
    padding: 5.5rem 1.5rem 2rem;
  }

  .step-card {
    padding: 1.5rem 2rem;
  }

  .questions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .question-group.full-width {
    grid-column: 1 / -1;
  }
}

/* ==========================================
   16. UTILIDADES Y ESTADOS
   ========================================== */

/* Estados disabled */
.input-select:disabled,
.input-text:disabled,
.input-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(42, 106, 138, 0.03);
  border-color: rgba(42, 106, 138, 0.08);
}

/* Validación visual */
.input-select:invalid:not(:placeholder-shown),
.input-text:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.03);
}

.input-select:valid:not(:placeholder-shown):not([value=""]),
.input-text:valid:not(:placeholder-shown) {
  border-color: rgba(16, 185, 129, 0.3);
}

/* Indicador de error para radio buttons */
input[type="radio"]:invalid {
  outline: 1px solid rgba(239, 68, 68, 0.3);
  outline-offset: 2px;
  border-radius: 50%;
}

input[type="radio"]:checked {
  outline: none;
}

/* Animación para campos requeridos */
@keyframes pulse-required {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.question-text .required {
  animation: pulse-required 2s ease-in-out infinite;
  display: inline-block;
  margin-left: 0.15rem;
}

/* Feedback táctil para móviles */
@media (hover: none) and (pointer: coarse) {
  .input-select,
  .input-text,
  .btn,
  .bible-table input[type="radio"],
  .radio-option,
  .checkbox-option {
    -webkit-tap-highlight-color: rgba(42, 106, 138, 0.1);
  }

  .btn:active {
    transform: scale(0.98);
  }

  .question-group:active {
    transform: scale(0.995);
  }

  .bible-table input[type="radio"]:active {
    transform: scale(1.1);
  }

  .radio-option:active {
    transform: scale(0.99);
  }

  .radio-option input[type="radio"]:active {
    transform: scale(1.15);
  }

  .checkbox-option:active {
    transform: scale(0.99);
  }

  .checkbox-option:active .checkbox-custom {
    transform: scale(1.1);
  }
}

/* Scroll suave para la página */
.survey-container {
  scroll-padding-top: 100px;
}

/* Prevenir selección de texto en elementos de UI */
.btn,
.step-number,
.bible-table th {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Mejora de legibilidad en pantallas pequeñas */
@media (max-width: 375px) {
  .question-text,
  .helper-text,
  .bible-table td.table-label {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

/* Animación de entrada para question groups */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-group {
  animation: slideIn 0.3s ease-out;
}

/* Indicador visual para campos con valor */
.input-select:not([value=""]):not(:focus),
.input-text:not(:placeholder-shown):not(:focus) {
  background: rgba(16, 185, 129, 0.02);
}

/* Estilos para autocompletado del navegador */
.input-select:-webkit-autofill,
.input-text:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: var(--text) !important;
}

/* Loading state para botones */
.btn.loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 0.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   17. ALERTAS Y CONFIRMACIONES PERSONALIZADAS
   ========================================== */

/* Alertas personalizadas */
.custom-alert {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 10000;
  min-width: 320px;
  max-width: 500px;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

.custom-alert-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.custom-alert-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.custom-alert-message {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
}

.custom-alert-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-alert-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

/* Variantes de alerta */
.custom-alert-error .custom-alert-content {
  border-left-color: var(--error);
  background: #fff5f5;
}

.custom-alert-error .custom-alert-icon {
  color: var(--error);
}

.custom-alert-success .custom-alert-content {
  border-left-color: var(--success);
  background: #f0fdf4;
}

.custom-alert-success .custom-alert-icon {
  color: var(--success);
}

.custom-alert-warning .custom-alert-content {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.custom-alert-warning .custom-alert-icon {
  color: #f59e0b;
}

.custom-alert-info .custom-alert-content {
  border-left-color: var(--primary);
  background: var(--bg);
}

.custom-alert-info .custom-alert-icon {
  color: var(--primary);
}

/* Confirmaciones personalizadas */
.custom-confirm {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.custom-confirm-box {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.3s ease-out;
  text-align: center;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.custom-confirm-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.custom-confirm-message {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 2rem;
  font-weight: 500;
}

.custom-confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.custom-confirm-btn {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.custom-confirm-cancel {
  background: rgba(42, 106, 138, 0.08);
  color: var(--text);
}

.custom-confirm-cancel:hover {
  background: rgba(42, 106, 138, 0.15);
  transform: translateY(-1px);
}

.custom-confirm-accept {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(42, 106, 138, 0.25);
}

.custom-confirm-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 106, 138, 0.35);
}

/* ==========================================
   18. CONSENTIMIENTO DE DATOS PERSONALES
   ========================================== */

/* Sección del checkbox de consentimiento */
.consent-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(42, 106, 138, 0.04);
  border: 2px solid rgba(42, 106, 138, 0.15);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  position: relative;
}

.consent-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-checkmark {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid var(--primary);
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.consent-checkbox:hover .consent-checkmark {
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.1);
}

.consent-checkbox input[type="checkbox"]:checked ~ .consent-checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.consent-checkbox input[type="checkbox"]:checked ~ .consent-checkmark::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  top: 3px;
  left: 7px;
}

.consent-checkbox input[type="checkbox"]:focus ~ .consent-checkmark {
  box-shadow: 0 0 0 4px rgba(42, 106, 138, 0.2);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.consent-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 500;
}

.consent-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.consent-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Modal de Consentimiento */
.consent-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.consent-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.consent-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.consent-modal-container {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.consent-modal[aria-hidden="false"] .consent-modal-container {
  transform: scale(1) translateY(0);
}

.consent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(42, 106, 138, 0.05), rgba(167, 213, 243, 0.1));
  border-radius: 16px 16px 0 0;
}

.consent-modal-titles {
  flex: 1;
}

.consent-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
}

.consent-subtitle {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0.25rem 0 0;
  font-weight: 500;
}

.consent-org {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.consent-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.consent-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.consent-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  line-height: 1.7;
}

.consent-section-block {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(42, 106, 138, 0.1);
}

.consent-section-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.consent-section-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.75rem;
}

.consent-section-block p {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.consent-section-block p:last-child {
  margin-bottom: 0;
}

.consent-section-block ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.consent-section-block li {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.consent-section-block li:last-child {
  margin-bottom: 0;
}

.consent-section-block a {
  color: var(--primary);
  text-decoration: underline;
}

.consent-section-block a:hover {
  color: var(--primary-dark);
}

.consent-section-block h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0.5rem;
}

.consent-contact-list {
  list-style: none;
  padding-left: 0;
  background: rgba(42, 106, 138, 0.04);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 0.75rem 0;
}

.consent-contact-list li {
  margin-bottom: 0.35rem;
}

.consent-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.consent-table-row {
  display: flex;
}

.consent-table-header {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.consent-table-cell {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.consent-table-cell:last-child {
  border-right: none;
}

.consent-table-row:not(.consent-table-header) .consent-table-cell {
  border-right: 1px solid var(--border);
  background: #fff;
}

/* Grid de categorías de datos en 2 columnas */
.consent-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin-top: 1rem;
}

.consent-category {
  background: rgba(42, 106, 138, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(42, 106, 138, 0.1);
}

.consent-category h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.consent-category ul {
  margin: 0;
  padding-left: 1.25rem;
}

.consent-category li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.consent-category li:last-child {
  margin-bottom: 0;
}

.consent-category-full {
  grid-column: 1 / -1;
}

.consent-category-full ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.consent-category-full li {
  margin-bottom: 0;
}

.consent-modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  background: rgba(42, 106, 138, 0.02);
  border-radius: 0 0 16px 16px;
}

.consent-modal-accept {
  min-width: 200px;
}

/* Responsive para consentimiento */
@media (max-width: 768px) {
  .consent-section {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }

  .consent-checkbox {
    gap: 0.875rem;
  }

  .consent-checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }

  .consent-text {
    font-size: 0.9rem;
  }

  .consent-modal-container {
    width: 92%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: 12px;
  }

  .consent-modal-header {
    padding: 1rem 1.25rem;
  }

  .consent-modal-header h2 {
    font-size: 1rem;
  }

  .consent-subtitle {
    font-size: 0.8rem;
  }

  .consent-org {
    font-size: 0.75rem;
  }

  .consent-modal-body {
    padding: 1rem 1.25rem;
  }

  .consent-section-block {
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
  }

  .consent-section-block h3 {
    font-size: 0.9rem;
  }

  .consent-section-block h4 {
    font-size: 0.8rem;
    margin: 0.75rem 0 0.35rem;
  }

  .consent-section-block p,
  .consent-section-block li {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .consent-section-block ul {
    padding-left: 1.1rem;
    margin: 0.5rem 0;
  }

  .consent-section-block li {
    margin-bottom: 0.2rem;
  }

  .consent-contact-list {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  .consent-contact-list li {
    margin-bottom: 0.25rem;
  }

  .consent-table-cell {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .consent-modal-footer {
    padding: 0.875rem 1.25rem;
  }

  .consent-modal-accept {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .consent-categories-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .consent-category {
    padding: 0.75rem;
  }

  .consent-category h4 {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
  }

  .consent-category ul {
    padding-left: 1rem;
  }

  .consent-category li {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
  }
}

@media (max-width: 480px) {
  .consent-section {
    padding: 1rem;
    margin-top: 1.25rem;
    border-radius: 10px;
  }

  .consent-checkbox {
    gap: 0.75rem;
  }

  .consent-checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 1px;
  }

  .consent-text {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .consent-modal-container {
    width: 90%;
    max-width: 380px;
    max-height: 80vh;
    border-radius: 10px;
  }

  .consent-modal-header {
    padding: 0.875rem 1rem;
  }

  .consent-modal-header h2 {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .consent-subtitle {
    font-size: 0.72rem;
  }

  .consent-org {
    font-size: 0.68rem;
  }

  .consent-modal-close {
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
  }

  .consent-modal-body {
    padding: 0.875rem 1rem;
  }

  .consent-section-block {
    margin-bottom: 0.875rem;
    padding-bottom: 0.75rem;
  }

  .consent-section-block h3 {
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
  }

  .consent-section-block h4 {
    font-size: 0.75rem;
    margin: 0.6rem 0 0.3rem;
  }

  .consent-section-block p {
    font-size: 0.72rem;
    line-height: 1.45;
    margin-bottom: 0.5rem;
  }

  .consent-section-block li {
    font-size: 0.72rem;
    line-height: 1.4;
    margin-bottom: 0.15rem;
  }

  .consent-section-block ul {
    padding-left: 1rem;
    margin: 0.4rem 0;
  }

  .consent-contact-list {
    padding: 0.6rem 0.8rem;
  }

  .consent-contact-list li {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
  }

  .consent-table {
    margin: 0.5rem 0;
  }

  .consent-table-cell {
    padding: 0.4rem 0.6rem;
    font-size: 0.68rem;
  }

  .consent-modal-footer {
    padding: 0.75rem 1rem;
  }

  .consent-modal-accept {
    width: 100%;
    min-width: auto;
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }

  .consent-categories-grid {
    gap: 0.5rem;
  }

  .consent-category {
    padding: 0.6rem;
  }

  .consent-category h4 {
    font-size: 0.72rem;
    margin-bottom: 0.3rem;
  }

  .consent-category ul {
    padding-left: 0.9rem;
  }

  .consent-category li {
    font-size: 0.68rem;
    line-height: 1.35;
    margin-bottom: 0.1rem;
  }
}

@media (max-width: 375px) {
  .consent-modal-container {
    width: 88%;
    max-width: 320px;
    max-height: 78vh;
  }

  .consent-modal-header {
    padding: 0.75rem 0.875rem;
  }

  .consent-modal-header h2 {
    font-size: 0.82rem;
  }

  .consent-subtitle {
    font-size: 0.68rem;
  }

  .consent-org {
    font-size: 0.65rem;
  }

  .consent-modal-close {
    width: 28px;
    height: 28px;
    font-size: 1.3rem;
  }

  .consent-modal-body {
    padding: 0.75rem 0.875rem;
  }

  .consent-section-block h3 {
    font-size: 0.75rem;
  }

  .consent-section-block p,
  .consent-section-block li {
    font-size: 0.68rem;
  }

  .consent-category h4 {
    font-size: 0.68rem;
  }

  .consent-category li {
    font-size: 0.65rem;
  }

  .consent-table-cell {
    font-size: 0.62rem;
    padding: 0.35rem 0.5rem;
  }

  .consent-modal-footer {
    padding: 0.65rem 0.875rem;
  }

  .consent-modal-accept {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
}

/* Responsive para alertas */
@media (max-width: 600px) {
  .custom-alert {
    top: 80px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }

  .custom-alert-content {
    padding: 1rem 1.25rem;
  }

  .custom-alert-message {
    font-size: 0.9rem;
  }

  .custom-confirm-box {
    padding: 1.5rem;
  }

  .custom-confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .custom-confirm-message {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .custom-confirm-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .custom-confirm-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

/* ==========================================
   OPTIMIZACIONES PARA ANDROID/REDMI
   ========================================== */

/* Asegurar que TODOS los elementos interactivos funcionen en touch */
button,
.btn,
[data-next],
[data-prev],
input[type="submit"],
input[type="button"] {
  /* Eliminar delays de tap en iOS y Android */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;

  /* Optimizar rendering en Android */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);

  /* Mejorar performance de animaciones */
  will-change: auto;

  /* Asegurar que los eventos touch funcionen */
  touch-action: manipulation;
}

/* Feedback visual inmediato al presionar (Android) */
.btn:active,
button:active {
  opacity: 0.85;
}

/* Asegurar altura mínima para touch targets (recomendación de Google) */
@media (max-width: 768px) {
  .btn,
  button {
    min-height: 48px;
    min-width: 48px;
  }

  /* Agregar más espacio entre botones en móviles */
  .btn-group,
  .step-actions {
    gap: 1rem !important;
  }
}
