/* ==========================================================================
   Variables Globales / Tema Corporativo
   ========================================================================== */
:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --primary-light: rgba(26, 115, 232, 0.08);
  --secondary-color: #0d233a;
  
  --text-color: #2c3e50;
  --text-muted: #6c757d;
  --text-light: #4a5568;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-focus: #1a73e8;
  --error-color: #dc3545;
  --success-color: #28a745;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* Modo Oscuro (se activa automáticamente si el body tiene .dark-mode) */
body.dark-mode {
  --text-color: #e2e8f0;
  --text-muted: #a0aec0;
  --text-light: #cbd5e0;
  
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  
  --border-color: #334155;
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Base Body */
body {
  background-color: var(--bg-body);
  color: var(--text-color);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Estructura y Contenedores
   ========================================================================== */
.snd-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.snd-form-section {
  padding-bottom: 60px;
}

/* ==========================================================================
   Tarjetas del Formulario (.snd-card)
   ========================================================================== */
.snd-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  overflow: hidden;
  transition: var(--transition);
}

.snd-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Encabezado de Tarjeta */
.snd-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to right, var(--primary-light), transparent);
}

.snd-section-num {
  background: var(--primary-color);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.3);
}

.snd-header-text h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-color);
}

.snd-header-text p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cuerpo de Tarjeta */
.snd-card-body {
  padding: 30px;
}

.snd-intro-text {
  background-color: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--text-color);
  margin-bottom: 24px;
}

/* ==========================================================================
   Grilla de Campos y Formulario
   ========================================================================== */
.snd-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.snd-field {
  display: flex;
  flex-direction: column;
}

.snd-field--full {
  grid-column: span 2;
}

.snd-field label,
.snd-field-grid > label {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.required {
  color: var(--error-color);
  margin-left: 2px;
}

/* Inputs, Selects y Textareas */
.snd-field input[type="text"],
.snd-field input[type="email"],
.snd-field select,
.snd-field textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-color);
  transition: var(--transition);
  box-sizing: border-box;
}

.snd-field input:focus,
.snd-field select:focus,
.snd-field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.snd-field textarea {
  resize: vertical;
  min-height: 90px;
}

.field-error {
  color: var(--error-color);
  font-size: 0.8rem;
  margin-top: 6px;
  display: block;
  min-height: 18px;
}

/* ==========================================================================
   Opciones de Radio (Motivos Seleccionables)
   ========================================================================== */
.snd-motivos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.snd-motivo-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background-color: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.snd-motivo-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Check/Radio visual personalizado */
.motivo-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: var(--transition);
}

.motivo-check::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: var(--transition);
}

/* Estado Activo del Radio Button */
.snd-motivo-option input[type="radio"]:checked + .motivo-check {
  border-color: var(--primary-color);
}

.snd-motivo-option input[type="radio"]:checked + .motivo-check::after {
  transform: translate(-50%, -50%) scale(1);
}

.snd-motivo-option input[type="radio"]:checked ~ div strong {
  color: var(--primary-color);
}

.snd-motivo-option:has(input[type="radio"]:checked) {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.snd-motivo-option strong {
  display: block;
  font-size: 0.92rem;
  font-family: var(--font-heading);
  color: var(--text-color);
  margin-bottom: 2px;
  transition: var(--transition);
}

.snd-motivo-option span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   Sección III: Declaración Jurada & Checkbox
   ========================================================================== */
.snd-declaracion-list {
  padding-left: 20px;
  margin: 0 0 24px 0;
}

.snd-declaracion-list li {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}

.snd-accept-check {
  background: var(--bg-input);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.snd-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition);
  background: var(--bg-card);
}

.checkbox-custom::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #ffffff;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: var(--transition);
}

.snd-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.snd-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   Acciones y Botón Principal
   ========================================================================== */
.snd-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.btn-generar-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.35);
  transition: var(--transition);
}

.btn-generar-pdf:hover {
  box-shadow: 0 12px 25px rgba(26, 115, 232, 0.45);
}

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

.btn-icon {
  font-size: 1.5rem;
}

.btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex-grow: 1;
}

.btn-text strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.btn-text small {
  font-size: 0.78rem;
  opacity: 0.85;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-generar-pdf:hover .btn-arrow {
  transform: translateY(3px);
}

.snd-actions-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Efectos Reveal/Animaciones Básicas
   ========================================================================== */
.reveal {
  opacity: 1; /* Garantiza visibilidad si la librería JS tarda en cargar */
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Responsividad (Mobile First Adjustments)
   ========================================================================== */
@media (max-width: 768px) {
  .snd-card-header {
    padding: 18px 20px;
  }

  .snd-card-body {
    padding: 20px;
  }

  .snd-field-grid {
    grid-template-columns: 1fr;
  }

  .snd-field--full {
    grid-column: span 1;
  }

  .snd-motivos-grid {
    grid-template-columns: 1fr;
  }

  .btn-generar-pdf {
    padding: 14px 22px;
  }
  
  .btn-text strong {
    font-size: 0.95rem;
  }
}