/* styles.css - Estilos comunes para el sistema de inscripciones */

:root {
  --primary-color: #212529;
  --success-color: #198754;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --bg-light: #f8f9fa;
  --accent-color: #6c63ff;
  --gradient-start: #667eea;
  --gradient-end: #764ba2;
  --danger-color: #dc3545;
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--primary-color);
  min-height: 100vh;
}

/* Contenedor principal para páginas centradas */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.content-wrapper {
  width: 100%;
  max-width: 600px;
}

/* Tarjetas */
.custom-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Títulos */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
  color: var(--primary-color);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Formularios */
.form-section {
  margin-bottom: 2rem;
}

.form-label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-control, .custom-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  line-height: 1.5;
  min-height: calc(1.5em + 1.5rem + 2px);
}

/* Fix específico para selects */
select.form-control,
.custom-select {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  height: auto !important;
}

.form-control:focus, .custom-select:focus {
  border-color: var(--gradient-start);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
  outline: none;
}

/* Indicador de campo requerido */
.red {
  color: var(--danger-color);
  font-weight: 600;
}

/* Botones principales */
.btn-custom {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: white;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #48bb78, #6c63ff, #764ba2);
  border-radius: 8px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-custom:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

.btn-custom:hover::before {
  opacity: 0.3;
}

.btn-custom:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

/* Info cards */
.info-card {
  background-color: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.info-card .participant-name {
  font-size: 1.25rem;
  font-weight: 600;
  /* margin-bottom: 0.5rem; */
}

.info-card .participant-name i {
  color: var(--accent-color);
}

.info-card .participant-details {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.info-card .participant-details i {
  color: var(--gradient-start);
  font-size: 1rem;
}

.info-card .participant-details strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Success icon */
.success-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #48bb78, #38a169);
  border-radius: 50%;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 0 4px 20px rgba(72, 187, 120, 0.3);
}

.success-icon-wrapper::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid #48bb78;
  border-radius: 50%;
  opacity: 0.2;
}

.success-icon-wrapper i {
  font-size: 2.5rem;
  color: white;
}

/* Footer notes */
.footer-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-note i {
  color: var(--success-color);
  margin-right: 0.25rem;
}

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

.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Header específico para formularios */
.form-header {
  background-color: var(--bg-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.form-header h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .custom-card {
      padding: 2rem 1.5rem;
  }
  
  .page-title {
      font-size: 1.75rem;
  }
  
  .form-header h4 {
      font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  /* Sobrescribir estilos de card en móvil */
  .custom-card {
      background: #ffffff;
      border: none !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      padding: 2rem 1.25rem;
  }
  
  .btn-custom {
      width: 100%;
  }
}

/* Utilidades */
.text-primary-custom {
  color: var(--gradient-start) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.mt-section {
  margin-top: 3rem;
}

.mb-section {
  margin-bottom: 3rem;
}
.invisibles {
  display: none;
}

/* EXITO.PHP */
        /* Estilos específicos para la página de confirmación */
        body {
            background-color: #ffffff;
        }

        .confirmation-wrapper {
            width: 100%;
            /* max-width: 800px; Mismo ancho que el formulario */
            padding: 0 0 40px;
            margin: 0 auto;
        }

        .confirmation-card {
            background: #ffffff;
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 3rem 2rem;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
        }

        /* Header de confirmación con icono y título */
        .confirmation-header {
            display: flex;
            align-items: center;
            gap: 2rem;
            margin-bottom: 2.5rem;
        }

        .confirmation-content {
            flex: 1;
        }

        .confirmation-title {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            letter-spacing: -0.5px;
        }

        .confirmation-subtitle {
            color: var(--text-muted);
            font-size: 1.1rem;
            margin-bottom: 0;
        }

        .download-section {
            margin-top: 2rem;
        }

        .download-instruction {
            font-size: 1rem;
            color: var(--primary-color);
            /* margin-bottom: 1.5rem; */
            font-weight: 500;
        }

        .download-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn-download {
            min-width: 180px;
        }

        /* Responsive - Tablet */
        @media (max-width: 768px) {
            .confirmation-header {
                gap: 1.5rem;
            }
            
            .confirmation-title {
                font-size: 1.75rem;
            }
        }

        /* Responsive - Mobile */
        @media (max-width: 576px) {
            /* Sin padding en el wrapper */
            .confirmation-wrapper {
                padding: 0;
                max-width: 100%;
            }
            
            /* Card sin bordes y ocupando todo el ancho */
            .confirmation-card {
                border: none;
                border-radius: 0;
                box-shadow: none;
                padding: 2rem 1.5rem;
            }
            
            /* Header apilado verticalmente */
            .confirmation-header {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
            }
            
            .confirmation-title {
                font-size: 1.5rem;
            }
            
            .confirmation-subtitle {
                font-size: 1rem;
            }
            
            .btn-download {
                width: 100%;
                margin-bottom: 0.75rem;
            }
            
            /* Ajustar info-card para móvil */
            .info-card {
                border-radius: 8px;
                margin-left: -1.5rem;
                margin-right: -1.5rem;
                padding-left: 1.5rem;
                padding-right: 1.5rem;
            }
        }
        /* Voucher principal */
        .voucher-ticket {
            max-width: 400px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 20px;
            box-shadow: 0 8px 40px rgba(0,0,0,0.12);
            overflow: hidden;
            position: relative;
        }

        /* Borde decorativo superior */
        /* .voucher-ticket::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
        } */

        .voucher-content {
            padding: 40px 30px;
            text-align: center;
        }

        /* Header del voucher */
        .voucher-header {
            margin-bottom: 35px;
        }

        .event-badge {
            display: inline-block;
            background: #f8f9fc;
            color: #4a5568;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 15px;
            border: 1px solid #e2e8f0;
        }

        .voucher-title {
            font-size: 24px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 8px;
            letter-spacing: -0.5px;
        }

        .voucher-subtitle {
            font-size: 14px;
            color: #718096;
            font-weight: 500;
        }

        /* QR Section */
        .qr-section {
            margin: 35px 0;
            position: relative;
        }

        .qr-container {
            background: #ffffff;
            padding: 25px;
            border-radius: 16px;
            box-shadow: 0 0 0 1px #e2e8f0, 0 4px 20px rgba(0,0,0,0.08);
            display: inline-block;
            position: relative;
        }

        .qr-container::before {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
            border-radius: 16px;
            z-index: -1;
            opacity: 0.1;
        }

        #qrcode {
            display: block;
        }

        .qr-label {
            margin-top: 15px;
            font-size: 11px;
            color: #a0aec0;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        /* Participant Info */
        .participant-section {
            background: #f7fafc;
            border-radius: 12px;
            padding: 25px;
            margin: 30px 0;
            border: 1px solid #e2e8f0;
        }

        .participant-name {
            font-size: 20px;
            font-weight: 700;
            color: #2d3748;
            margin-bottom: 6px;
            letter-spacing: -0.3px;
        }

        .participant-id {
            font-size: 14px;
            color: #718096;
            margin-bottom: 15px;
        }

        .participant-id strong {
            color: #4a5568;
            font-weight: 700;
        }

        /* Info Grid */
        .info-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 15px;
            margin-top: 20px;
        }

        .info-item {
            text-align: center;
        }

        .info-label {
            font-size: 10px;
            color: #a0aec0;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .info-value {
            font-size: 13px;
            color: #4a5568;
            font-weight: 600;
        }

        /* Footer Instructions */
        .voucher-footer {
            padding-top: 25px;
            border-top: 1px solid #e2e8f0;
        }

        .instruction-text {
            font-size: 13px;
            color: #718096;
            font-weight: 500;
            margin-bottom: 10px;
        }

        .security-note {
            font-size: 11px;
            color: #a0aec0;
            font-style: italic;
        }

        /* Elementos decorativos sutiles */
        .decoration-dots {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 4px;
        }

        .decoration-dots span {
            width: 4px;
            height: 4px;
            background: #e2e8f0;
            border-radius: 50%;
        }

        /* Responsive */
        @media (max-width: 480px) {
            body {
                padding: 15px;
            }
            
            .voucher-content {
                padding: 30px 25px;
            }
            
            .info-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }
        }

        /* INDEX.PHP */
        /* Estilos específicos para el formulario de inscripción */
        main {
            /* padding: 40px 0; */
        }
        
        .form-container {
            padding-left: 20px;
            padding-right: 20px;
        }
        
        .registration-container {
            max-width: 800px;
            margin: 0 auto;
        }
        
        .event-info {
            background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
            color: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            text-align: center;
        }
        
        .event-info h5 {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }
        
        .event-info p {
            margin-bottom: 0;
            opacity: 0.9;
        }
        
        .event-info i {
            margin-right: 0.5rem;
        }
        
        .form-icon {
            color: var(--gradient-start);
            margin-right: 0.5rem;
        }
        
        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--bg-light);
        }
        
        .form-group {
            margin-bottom: 1.25rem;
        }
        
        /* Override Bootstrap para consistencia */
        .form-control:focus, .custom-select:focus {
            border-color: var(--gradient-start);
            box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
        }
        
        /* Override Bootstrap para select */
        select.form-control,
        .custom-select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 16px 12px;
            padding-right: 2.25rem;
        }
        
        /* Loading overlay */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.9);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }
        
        .loading-content {
            text-align: center;
        }
        
        .spinner {
            border: 3px solid var(--bg-light);
            border-top: 3px solid var(--gradient-start);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 1rem;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading-text {
            color: var(--primary-color);
            font-weight: 500;
        }

        /* Bordes de los check box */
        .form-check-input {
            border-color: rgb(33, 37, 41);
        }